Bazaar developer reference

CvGame::AnyoneIsInEra(EraTypes) const

Defined in
CvGame.cpp, line 12079
Class
CvGame
Hook name
CivHooks::CvGame_AnyoneIsInEra

Hooks

static bool BeforeCvGame_AnyoneIsInEra(const CvGame* self, EraTypes iEraType, bool& result);static void AfterCvGame_AnyoneIsInEra(const CvGame* self, EraTypes iEraType, bool& result);static bool ReplaceCvGame_AnyoneIsInEra(bool (*original)(const CvGame*, EraTypes), const CvGame* self, EraTypes iEraType);CivRegisterBefore<CivHooks::CvGame_AnyoneIsInEra>(host, &BeforeCvGame_AnyoneIsInEra);CivRegisterAfter<CivHooks::CvGame_AnyoneIsInEra>(host, &AfterCvGame_AnyoneIsInEra);CivRegisterReplace<CivHooks::CvGame_AnyoneIsInEra>(host, &ReplaceCvGame_AnyoneIsInEra);

Code

12079bool CvGame::AnyoneIsInEra(EraTypes iEraType) const12080{12081	for (int i = 0; i < MAX_PLAYERS; ++i) {12082		CvPlayer& player = GET_PLAYER(static_cast<PlayerTypes>(i));1208312084		if(player.isAlive() && player.IsInEra(iEraType)) {12085			return true;12086		}12087	}1208812089	return false;12090}

Calls

Called by