Bazaar developer reference

CvWonderProductionAI::HaveCityToBuild(BuildingTypes) const

Defined in
CvWonderProductionAI.cpp, line 584
Class
CvWonderProductionAI
Hook name
CivHooks::CvWonderProductionAI_HaveCityToBuild

Hooks

static bool BeforeCvWonderProductionAI_HaveCityToBuild(const CvWonderProductionAI* self, BuildingTypes eBuilding, bool& result);static void AfterCvWonderProductionAI_HaveCityToBuild(const CvWonderProductionAI* self, BuildingTypes eBuilding, bool& result);static bool ReplaceCvWonderProductionAI_HaveCityToBuild(bool (*original)(const CvWonderProductionAI*, BuildingTypes), const CvWonderProductionAI* self, BuildingTypes eBuilding);CivRegisterBefore<CivHooks::CvWonderProductionAI_HaveCityToBuild>(host, &BeforeCvWonderProductionAI_HaveCityToBuild);CivRegisterAfter<CivHooks::CvWonderProductionAI_HaveCityToBuild>(host, &AfterCvWonderProductionAI_HaveCityToBuild);CivRegisterReplace<CivHooks::CvWonderProductionAI_HaveCityToBuild>(host, &ReplaceCvWonderProductionAI_HaveCityToBuild);

Code

583/// Check to make sure some city can build this wonder584bool CvWonderProductionAI::HaveCityToBuild(BuildingTypes eBuilding) const585{586	CvCity* pLoopCity;587	int iLoop;588	for(pLoopCity = m_pPlayer->firstCity(&iLoop); pLoopCity != NULL; pLoopCity = m_pPlayer->nextCity(&iLoop))589	{590		if(pLoopCity->canConstruct(eBuilding))591		{592			return true;593		}594	}595	return false;596}

Calls

Called by