Bazaar developer reference

CvPlayer::HasNaturalWonder(FeatureTypes)

Defined in
CvPlayer.cpp, line 28201
Class
CvPlayer
Hook name
CivHooks::CvPlayer_HasNaturalWonder

Hooks

static bool BeforeCvPlayer_HasNaturalWonder(CvPlayer* self, FeatureTypes iFeatureType, bool& result);static void AfterCvPlayer_HasNaturalWonder(CvPlayer* self, FeatureTypes iFeatureType, bool& result);static bool ReplaceCvPlayer_HasNaturalWonder(bool (*original)(CvPlayer*, FeatureTypes), CvPlayer* self, FeatureTypes iFeatureType);CivRegisterBefore<CivHooks::CvPlayer_HasNaturalWonder>(host, &BeforeCvPlayer_HasNaturalWonder);CivRegisterAfter<CivHooks::CvPlayer_HasNaturalWonder>(host, &AfterCvPlayer_HasNaturalWonder);CivRegisterReplace<CivHooks::CvPlayer_HasNaturalWonder>(host, &ReplaceCvPlayer_HasNaturalWonder);

Code

28201bool CvPlayer::HasNaturalWonder(FeatureTypes iFeatureType)28202{28203	int iLoopCity;28204	for (CvCity* pLoopCity = firstCity(&iLoopCity); pLoopCity != NULL; pLoopCity = nextCity(&iLoopCity)) {28205		if (pLoopCity->HasNaturalWonder(iFeatureType)) {28206			return true;28207		}28208	}2820928210	return false;28211}

Calls

Called by