Bazaar developer reference

CvGame::AnyoneHasNaturalWonder(FeatureTypes) const

Defined in
CvGame.cpp, line 12118
Class
CvGame
Hook name
CivHooks::CvGame_AnyoneHasNaturalWonder

Hooks

static bool BeforeCvGame_AnyoneHasNaturalWonder(const CvGame* self, FeatureTypes iFeatureType, bool& result);static void AfterCvGame_AnyoneHasNaturalWonder(const CvGame* self, FeatureTypes iFeatureType, bool& result);static bool ReplaceCvGame_AnyoneHasNaturalWonder(bool (*original)(const CvGame*, FeatureTypes), const CvGame* self, FeatureTypes iFeatureType);CivRegisterBefore<CivHooks::CvGame_AnyoneHasNaturalWonder>(host, &BeforeCvGame_AnyoneHasNaturalWonder);CivRegisterAfter<CivHooks::CvGame_AnyoneHasNaturalWonder>(host, &AfterCvGame_AnyoneHasNaturalWonder);CivRegisterReplace<CivHooks::CvGame_AnyoneHasNaturalWonder>(host, &ReplaceCvGame_AnyoneHasNaturalWonder);

Code

12118bool CvGame::AnyoneHasNaturalWonder(FeatureTypes iFeatureType) const12119{12120	for (int i = 0; i < MAX_PLAYERS; ++i) {12121		CvPlayer& player = GET_PLAYER(static_cast<PlayerTypes>(i));1212212123		if(player.isAlive() && player.HasNaturalWonder(iFeatureType)) {12124			return true;12125		}12126	}1212712128	return false;12129}

Calls

Called by