Bazaar developer reference

CvGame::AnyoneHasWonder(BuildingTypes) const

Defined in
CvGame.cpp, line 12053
Class
CvGame
Hook name
CivHooks::CvGame_AnyoneHasWonder

Hooks

static bool BeforeCvGame_AnyoneHasWonder(const CvGame* self, BuildingTypes iBuildingType, bool& result);static void AfterCvGame_AnyoneHasWonder(const CvGame* self, BuildingTypes iBuildingType, bool& result);static bool ReplaceCvGame_AnyoneHasWonder(bool (*original)(const CvGame*, BuildingTypes), const CvGame* self, BuildingTypes iBuildingType);CivRegisterBefore<CivHooks::CvGame_AnyoneHasWonder>(host, &BeforeCvGame_AnyoneHasWonder);CivRegisterAfter<CivHooks::CvGame_AnyoneHasWonder>(host, &AfterCvGame_AnyoneHasWonder);CivRegisterReplace<CivHooks::CvGame_AnyoneHasWonder>(host, &ReplaceCvGame_AnyoneHasWonder);

Code

12053bool CvGame::AnyoneHasWonder(BuildingTypes iBuildingType) const12054{12055	for (int i = 0; i < MAX_PLAYERS; ++i) {12056		CvPlayer& player = GET_PLAYER(static_cast<PlayerTypes>(i));1205712058		if(player.isAlive() && player.HasWonder(iBuildingType)) {12059			return true;12060		}12061	}1206212063	return false;12064}

Calls

Called by