Bazaar developer reference

CvGame::AnyoneHasBelief(BeliefTypes) const

Defined in
CvGame.cpp, line 12001
Class
CvGame
Hook name
CivHooks::CvGame_AnyoneHasBelief

Hooks

static bool BeforeCvGame_AnyoneHasBelief(const CvGame* self, BeliefTypes iBeliefType, bool& result);static void AfterCvGame_AnyoneHasBelief(const CvGame* self, BeliefTypes iBeliefType, bool& result);static bool ReplaceCvGame_AnyoneHasBelief(bool (*original)(const CvGame*, BeliefTypes), const CvGame* self, BeliefTypes iBeliefType);CivRegisterBefore<CivHooks::CvGame_AnyoneHasBelief>(host, &BeforeCvGame_AnyoneHasBelief);CivRegisterAfter<CivHooks::CvGame_AnyoneHasBelief>(host, &AfterCvGame_AnyoneHasBelief);CivRegisterReplace<CivHooks::CvGame_AnyoneHasBelief>(host, &ReplaceCvGame_AnyoneHasBelief);

Code

12000#if defined(MOD_API_EXTENSIONS)12001bool CvGame::AnyoneHasBelief(BeliefTypes iBeliefType) const12002{12003	for (int i = 0; i < MAX_PLAYERS; ++i) {12004		CvPlayer& player = GET_PLAYER(static_cast<PlayerTypes>(i));1200512006		if(player.isAlive() && player.HasBelief(iBeliefType)) {12007			return true;12008		}12009	}1201012011	return false;12012}

Calls

Called by