Bazaar developer reference

CvPlotManager::AddUnit(const IDInfo &, int, int, uint)

Defined in
CvPlotManager.cpp, line 244
Class
CvPlotManager
Hook name
CivHooks::CvPlotManager_AddUnit

Hooks

static bool BeforeCvPlotManager_AddUnit(CvPlotManager* self, const IDInfo& kInfo, int iX, int iY, uint uiLayerID);static void AfterCvPlotManager_AddUnit(CvPlotManager* self, const IDInfo& kInfo, int iX, int iY, uint uiLayerID);static void ReplaceCvPlotManager_AddUnit(void (*original)(CvPlotManager*, const IDInfo&, int, int, uint), CvPlotManager* self, const IDInfo& kInfo, int iX, int iY, uint uiLayerID);CivRegisterBefore<CivHooks::CvPlotManager_AddUnit>(host, &BeforeCvPlotManager_AddUnit);CivRegisterAfter<CivHooks::CvPlotManager_AddUnit>(host, &AfterCvPlotManager_AddUnit);CivRegisterReplace<CivHooks::CvPlotManager_AddUnit>(host, &ReplaceCvPlotManager_AddUnit);

Code

244void CvPlotManager::AddUnit(const IDInfo& kInfo, int iX, int iY, uint uiLayerID)245{246	CvSparseIDInfoGrid* pkLayer = AddLayer(uiLayerID);247	if (pkLayer)248	{249		pkLayer->Add(kInfo, iX, iY);250	}251}

Calls

Called by