Bazaar developer reference

CvPlotManager::GetLayerIDIndex(uint) const

Defined in
CvPlotManager.cpp, line 142
Class
CvPlotManager
Hook name
CivHooks::CvPlotManager_GetLayerIDIndex

Hooks

static bool BeforeCvPlotManager_GetLayerIDIndex(const CvPlotManager* self, uint uiLayerID, int& result);static void AfterCvPlotManager_GetLayerIDIndex(const CvPlotManager* self, uint uiLayerID, int& result);static int ReplaceCvPlotManager_GetLayerIDIndex(int (*original)(const CvPlotManager*, uint), const CvPlotManager* self, uint uiLayerID);CivRegisterBefore<CivHooks::CvPlotManager_GetLayerIDIndex>(host, &BeforeCvPlotManager_GetLayerIDIndex);CivRegisterAfter<CivHooks::CvPlotManager_GetLayerIDIndex>(host, &AfterCvPlotManager_GetLayerIDIndex);CivRegisterReplace<CivHooks::CvPlotManager_GetLayerIDIndex>(host, &ReplaceCvPlotManager_GetLayerIDIndex);

Code

142int CvPlotManager::GetLayerIDIndex(uint uiLayerID) const143{144	int iIndex = 0;145	for (CvSparseIDInfoGridVector::const_iterator itr = m_aLayers.begin(); itr != m_aLayers.end(); ++itr)146	{147		if ((*itr).m_uiID == uiLayerID)148		{149			return iIndex;150		}151		++iIndex;152	}153154	return -1;155}

Calls