Bazaar developer reference

CvPlot::countNumAirUnits(TeamTypes) const

Defined in
CvPlot.cpp, line 11571
Class
CvPlot
Hook name
CivHooks::CvPlot_countNumAirUnits

Hooks

static bool BeforeCvPlot_countNumAirUnits(const CvPlot* self, TeamTypes eTeam, int& result);static void AfterCvPlot_countNumAirUnits(const CvPlot* self, TeamTypes eTeam, int& result);static int ReplaceCvPlot_countNumAirUnits(int (*original)(const CvPlot*, TeamTypes), const CvPlot* self, TeamTypes eTeam);CivRegisterBefore<CivHooks::CvPlot_countNumAirUnits>(host, &BeforeCvPlot_countNumAirUnits);CivRegisterAfter<CivHooks::CvPlot_countNumAirUnits>(host, &AfterCvPlot_countNumAirUnits);CivRegisterReplace<CivHooks::CvPlot_countNumAirUnits>(host, &ReplaceCvPlot_countNumAirUnits);

Code

11571int CvPlot::countNumAirUnits(TeamTypes eTeam) const11572{11573	int iCount = 0;1157411575	const IDInfo* pUnitNode = headUnitNode();11576	while(pUnitNode != NULL)11577	{11578		const CvUnit* pLoopUnit = GetPlayerUnit(*pUnitNode);11579		pUnitNode = nextUnitNode(pUnitNode);1158011581		if(pLoopUnit && DOMAIN_AIR == pLoopUnit->getDomainType() && !pLoopUnit->isCargo() && pLoopUnit->getTeam() == eTeam)11582		{11583			iCount += pLoopUnit->getUnitInfo().GetAirUnitCap();11584		}11585	}1158611587	return iCount;11588}

Calls

Called by