Bazaar developer reference

CvPlot::getUnitByIndex(int) const

Defined in
CvPlot.cpp, line 10247
Class
CvPlot
Hook name
CivHooks::CvPlot_getUnitByIndex

Hooks

static bool BeforeCvPlot_getUnitByIndex(const CvPlot* self, int iIndex, CvUnit*& result);static void AfterCvPlot_getUnitByIndex(const CvPlot* self, int iIndex, CvUnit*& result);static CvUnit* ReplaceCvPlot_getUnitByIndex(CvUnit* (*original)(const CvPlot*, int), const CvPlot* self, int iIndex);CivRegisterBefore<CivHooks::CvPlot_getUnitByIndex>(host, &BeforeCvPlot_getUnitByIndex);CivRegisterAfter<CivHooks::CvPlot_getUnitByIndex>(host, &AfterCvPlot_getUnitByIndex);CivRegisterReplace<CivHooks::CvPlot_getUnitByIndex>(host, &ReplaceCvPlot_getUnitByIndex);

Code

10247CvUnit* CvPlot::getUnitByIndex(int iIndex) const10248{10249	const IDInfo* pUnitNode;1025010251	pUnitNode = m_units.nodeNum(iIndex);1025210253	if(pUnitNode != NULL)10254	{10255		return (CvUnit*)GetPlayerUnit(*pUnitNode);10256	}10257	else10258	{10259		return NULL;10260	}10261}

Calls

Called by

33 functions in 16 files