Bazaar developer reference

CvDllPlot::GetUnitByIndex(int) const

Defined in
CvDllPlot.cpp, line 318
Class
CvDllPlot
Hook name
CivHooks::CvDllPlot_GetUnitByIndex

Hooks

static bool BeforeCvDllPlot_GetUnitByIndex(const CvDllPlot* self, int iIndex, ICvUnit1*& result);static void AfterCvDllPlot_GetUnitByIndex(const CvDllPlot* self, int iIndex, ICvUnit1*& result);static ICvUnit1* ReplaceCvDllPlot_GetUnitByIndex(ICvUnit1* (*original)(const CvDllPlot*, int), const CvDllPlot* self, int iIndex);// CivHooks.h gives this hook point no types, so nothing checks these hooks' parameters.host->RegisterHook(host->pluginIndex, CivHooks::CvDllPlot_GetUnitByIndex::ID, CIV_HOOK_BEFORE, (void*)&BeforeCvDllPlot_GetUnitByIndex);host->RegisterHook(host->pluginIndex, CivHooks::CvDllPlot_GetUnitByIndex::ID, CIV_HOOK_AFTER, (void*)&AfterCvDllPlot_GetUnitByIndex);host->RegisterHook(host->pluginIndex, CivHooks::CvDllPlot_GetUnitByIndex::ID, CIV_HOOK_REPLACE, (void*)&ReplaceCvDllPlot_GetUnitByIndex);

Code

318ICvUnit1* CvDllPlot::GetUnitByIndex(int iIndex) const319{320	CvUnit* pkUnit = m_pPlot->getUnitByIndex(iIndex);321	return (NULL != pkUnit)? new CvDllUnit(pkUnit) : NULL;322}

Calls