Bazaar developer reference

CvPlayer::HasSpecialist(SpecialistTypes)

Defined in
CvPlayer.cpp, line 28344
Class
CvPlayer
Hook name
CivHooks::CvPlayer_HasSpecialist

Hooks

static bool BeforeCvPlayer_HasSpecialist(CvPlayer* self, SpecialistTypes iSpecialistType, bool& result);static void AfterCvPlayer_HasSpecialist(CvPlayer* self, SpecialistTypes iSpecialistType, bool& result);static bool ReplaceCvPlayer_HasSpecialist(bool (*original)(CvPlayer*, SpecialistTypes), CvPlayer* self, SpecialistTypes iSpecialistType);CivRegisterBefore<CivHooks::CvPlayer_HasSpecialist>(host, &BeforeCvPlayer_HasSpecialist);CivRegisterAfter<CivHooks::CvPlayer_HasSpecialist>(host, &AfterCvPlayer_HasSpecialist);CivRegisterReplace<CivHooks::CvPlayer_HasSpecialist>(host, &ReplaceCvPlayer_HasSpecialist);

Code

28344bool CvPlayer::HasSpecialist(SpecialistTypes iSpecialistType)28345{28346	int iLoopCity;28347	for (CvCity* pLoopCity = firstCity(&iLoopCity); pLoopCity != NULL; pLoopCity = nextCity(&iLoopCity)) {28348		if (pLoopCity->HasSpecialist(iSpecialistType)) {28349			return true;28350		}28351	}2835228353	return false;28354}

Calls

Called by