Bazaar developer reference

CvPlot::SetWorldAnchor(GenericWorldAnchorTypes, int)

Defined in
CvPlot.cpp, line 7161
Class
CvPlot
Hook name
CivHooks::CvPlot_SetWorldAnchor

Hooks

static bool BeforeCvPlot_SetWorldAnchor(CvPlot* self, GenericWorldAnchorTypes eAnchor, int iData1);static void AfterCvPlot_SetWorldAnchor(CvPlot* self, GenericWorldAnchorTypes eAnchor, int iData1);static void ReplaceCvPlot_SetWorldAnchor(void (*original)(CvPlot*, GenericWorldAnchorTypes, int), CvPlot* self, GenericWorldAnchorTypes eAnchor, int iData1);CivRegisterBefore<CivHooks::CvPlot_SetWorldAnchor>(host, &BeforeCvPlot_SetWorldAnchor);CivRegisterAfter<CivHooks::CvPlot_SetWorldAnchor>(host, &AfterCvPlot_SetWorldAnchor);CivRegisterReplace<CivHooks::CvPlot_SetWorldAnchor>(host, &ReplaceCvPlot_SetWorldAnchor);

Code

7161void CvPlot::SetWorldAnchor(GenericWorldAnchorTypes eAnchor, int iData1)7162{7163	GenericWorldAnchorTypes eOldAnchor = (GenericWorldAnchorTypes) m_eWorldAnchor;71647165	// Set the new anchor7166	m_eWorldAnchor = eAnchor;7167	m_cWorldAnchorData = iData1;71687169	// Remove old7170	if(eOldAnchor != NO_WORLD_ANCHOR)7171		gDLL->GameplayWorldAnchor(eOldAnchor, /*bAdd*/ false, getX(), getY(), iData1);71727173	// Add new7174	if(eAnchor == WORLD_ANCHOR_NATURAL_WONDER)7175		gDLL->GameplayWorldAnchor(eAnchor, /*bAdd*/ true, getX(), getY(), iData1);7176}

Calls

Called by