Bazaar developer reference

CvDllMap::GetPlotByIndex(int) const

Defined in
CvDllMap.cpp, line 157
Class
CvDllMap
Hook name
CivHooks::CvDllMap_GetPlotByIndex

Hooks

static bool BeforeCvDllMap_GetPlotByIndex(const CvDllMap* self, int iIndex, ICvPlot1*& result);static void AfterCvDllMap_GetPlotByIndex(const CvDllMap* self, int iIndex, ICvPlot1*& result);static ICvPlot1* ReplaceCvDllMap_GetPlotByIndex(ICvPlot1* (*original)(const CvDllMap*, int), const CvDllMap* self, int iIndex);// CivHooks.h gives this hook point no types, so nothing checks these hooks' parameters.host->RegisterHook(host->pluginIndex, CivHooks::CvDllMap_GetPlotByIndex::ID, CIV_HOOK_BEFORE, (void*)&BeforeCvDllMap_GetPlotByIndex);host->RegisterHook(host->pluginIndex, CivHooks::CvDllMap_GetPlotByIndex::ID, CIV_HOOK_AFTER, (void*)&AfterCvDllMap_GetPlotByIndex);host->RegisterHook(host->pluginIndex, CivHooks::CvDllMap_GetPlotByIndex::ID, CIV_HOOK_REPLACE, (void*)&ReplaceCvDllMap_GetPlotByIndex);

Code

157ICvPlot1* CvDllMap::GetPlotByIndex(int iIndex) const158{159	if (m_pMap->numPlots() != 0)160	{161		CvPlot* pkPlot = m_pMap->plotByIndex(iIndex);162		return (NULL != pkPlot)? new CvDllPlot(pkPlot) : NULL;163	}164	return NULL;165}

Calls