Bazaar developer reference

CvCity::isAddsFreshWater() const

Defined in
CvCity.cpp, line 7243
Class
CvCity
Hook name
CivHooks::CvCity_isAddsFreshWater

Hooks

static bool BeforeCvCity_isAddsFreshWater(const CvCity* self, bool& result);static void AfterCvCity_isAddsFreshWater(const CvCity* self, bool& result);static bool ReplaceCvCity_isAddsFreshWater(bool (*original)(const CvCity*), const CvCity* self);CivRegisterBefore<CivHooks::CvCity_isAddsFreshWater>(host, &BeforeCvCity_isAddsFreshWater);CivRegisterAfter<CivHooks::CvCity_isAddsFreshWater>(host, &AfterCvCity_isAddsFreshWater);CivRegisterReplace<CivHooks::CvCity_isAddsFreshWater>(host, &ReplaceCvCity_isAddsFreshWater);

Code

7243bool CvCity::isAddsFreshWater() const {7244	VALIDATE_OBJECT72457246	for (int iI = 0; iI < GC.getNumBuildingInfos(); iI++) {7247		if (m_pCityBuildings->GetNumBuilding((BuildingTypes)iI) > 0) {7248			if (GC.getBuildingInfo((BuildingTypes)iI)->IsAddsFreshWater()) {7249				return true;7250			}7251		}7252	}72537254	return false;7255}

Calls

Called by