Bazaar developer reference

CvPlayer::HasWonder(BuildingTypes)

Defined in
CvPlayer.cpp, line 28162
Class
CvPlayer
Hook name
CivHooks::CvPlayer_HasWonder

Hooks

static bool BeforeCvPlayer_HasWonder(CvPlayer* self, BuildingTypes iBuildingType, bool& result);static void AfterCvPlayer_HasWonder(CvPlayer* self, BuildingTypes iBuildingType, bool& result);static bool ReplaceCvPlayer_HasWonder(bool (*original)(CvPlayer*, BuildingTypes), CvPlayer* self, BuildingTypes iBuildingType);CivRegisterBefore<CivHooks::CvPlayer_HasWonder>(host, &BeforeCvPlayer_HasWonder);CivRegisterAfter<CivHooks::CvPlayer_HasWonder>(host, &AfterCvPlayer_HasWonder);CivRegisterReplace<CivHooks::CvPlayer_HasWonder>(host, &ReplaceCvPlayer_HasWonder);

Code

28162bool CvPlayer::HasWonder(BuildingTypes iBuildingType)28163{28164	int iLoopCity;28165	for (CvCity* pLoopCity = firstCity(&iLoopCity); pLoopCity != NULL; pLoopCity = nextCity(&iLoopCity)) {28166		if (pLoopCity->HasWonder(iBuildingType)) {28167			return true;28168		}28169	}2817028171	return false;28172}

Calls

Called by