Bazaar developer reference

CvPlayer::HasCapturedHolyCity(ReligionTypes)

Defined in
CvPlayer.cpp, line 28503
Class
CvPlayer
Hook name
CivHooks::CvPlayer_HasCapturedHolyCity

Hooks

static bool BeforeCvPlayer_HasCapturedHolyCity(CvPlayer* self, ReligionTypes eReligion, bool& result);static void AfterCvPlayer_HasCapturedHolyCity(CvPlayer* self, ReligionTypes eReligion, bool& result);static bool ReplaceCvPlayer_HasCapturedHolyCity(bool (*original)(CvPlayer*, ReligionTypes), CvPlayer* self, ReligionTypes eReligion);CivRegisterBefore<CivHooks::CvPlayer_HasCapturedHolyCity>(host, &BeforeCvPlayer_HasCapturedHolyCity);CivRegisterAfter<CivHooks::CvPlayer_HasCapturedHolyCity>(host, &AfterCvPlayer_HasCapturedHolyCity);CivRegisterReplace<CivHooks::CvPlayer_HasCapturedHolyCity>(host, &ReplaceCvPlayer_HasCapturedHolyCity);

Code

28503bool CvPlayer::HasCapturedHolyCity(ReligionTypes eReligion)28504{28505	int iLoop;28506	for (CvCity* pLoopCity = firstCity(&iLoop); pLoopCity != NULL; pLoopCity = nextCity(&iLoop)) {28507		if (pLoopCity->GetCityReligions()->IsHolyCityForReligion(eReligion)) {28508			return (pLoopCity->getOriginalOwner() != GetID());28509		}28510	}2851128512	return false;28513}

Calls

Called by