Bazaar developer reference

CvGame::AnyoneHasReachedEra(EraTypes) const

Defined in
CvGame.cpp, line 12092
Class
CvGame
Hook name
CivHooks::CvGame_AnyoneHasReachedEra

Hooks

static bool BeforeCvGame_AnyoneHasReachedEra(const CvGame* self, EraTypes iEraType, bool& result);static void AfterCvGame_AnyoneHasReachedEra(const CvGame* self, EraTypes iEraType, bool& result);static bool ReplaceCvGame_AnyoneHasReachedEra(bool (*original)(const CvGame*, EraTypes), const CvGame* self, EraTypes iEraType);CivRegisterBefore<CivHooks::CvGame_AnyoneHasReachedEra>(host, &BeforeCvGame_AnyoneHasReachedEra);CivRegisterAfter<CivHooks::CvGame_AnyoneHasReachedEra>(host, &AfterCvGame_AnyoneHasReachedEra);CivRegisterReplace<CivHooks::CvGame_AnyoneHasReachedEra>(host, &ReplaceCvGame_AnyoneHasReachedEra);

Code

12092bool CvGame::AnyoneHasReachedEra(EraTypes iEraType) const12093{12094	for (int i = 0; i < MAX_PLAYERS; ++i) {12095		CvPlayer& player = GET_PLAYER(static_cast<PlayerTypes>(i));1209612097		if(player.isAlive() && player.HasReachedEra(iEraType)) {12098			return true;12099		}12100	}1210112102	return false;12103}

Calls

Called by