Bazaar developer reference

CvPlayer::HasSpecialistSlot(SpecialistTypes)

Defined in
CvPlayer.cpp, line 28332
Class
CvPlayer
Hook name
CivHooks::CvPlayer_HasSpecialistSlot

Hooks

static bool BeforeCvPlayer_HasSpecialistSlot(CvPlayer* self, SpecialistTypes iSpecialistType, bool& result);static void AfterCvPlayer_HasSpecialistSlot(CvPlayer* self, SpecialistTypes iSpecialistType, bool& result);static bool ReplaceCvPlayer_HasSpecialistSlot(bool (*original)(CvPlayer*, SpecialistTypes), CvPlayer* self, SpecialistTypes iSpecialistType);CivRegisterBefore<CivHooks::CvPlayer_HasSpecialistSlot>(host, &BeforeCvPlayer_HasSpecialistSlot);CivRegisterAfter<CivHooks::CvPlayer_HasSpecialistSlot>(host, &AfterCvPlayer_HasSpecialistSlot);CivRegisterReplace<CivHooks::CvPlayer_HasSpecialistSlot>(host, &ReplaceCvPlayer_HasSpecialistSlot);

Code

28332bool CvPlayer::HasSpecialistSlot(SpecialistTypes iSpecialistType)28333{28334	int iLoopCity;28335	for (CvCity* pLoopCity = firstCity(&iLoopCity); pLoopCity != NULL; pLoopCity = nextCity(&iLoopCity)) {28336		if (pLoopCity->HasSpecialistSlot(iSpecialistType)) {28337			return true;28338		}28339	}2834028341	return false;28342}

Calls

Called by