Bazaar developer reference

CvTacticalAI::ExecuteMoveToPlot(CvPlot *, bool)

Defined in
CvTacticalAI.cpp, line 7470
Class
CvTacticalAI
Hook name
CivHooks::CvTacticalAI_ExecuteMoveToPlot

Hooks

static bool BeforeCvTacticalAI_ExecuteMoveToPlot(CvTacticalAI* self, CvPlot* pTarget, bool bSaveMoves);static void AfterCvTacticalAI_ExecuteMoveToPlot(CvTacticalAI* self, CvPlot* pTarget, bool bSaveMoves);static void ReplaceCvTacticalAI_ExecuteMoveToPlot(void (*original)(CvTacticalAI*, CvPlot*, bool), CvTacticalAI* self, CvPlot* pTarget, bool bSaveMoves);CivRegisterBefore<CivHooks::CvTacticalAI_ExecuteMoveToPlot>(host, &BeforeCvTacticalAI_ExecuteMoveToPlot);CivRegisterAfter<CivHooks::CvTacticalAI_ExecuteMoveToPlot>(host, &AfterCvTacticalAI_ExecuteMoveToPlot);CivRegisterReplace<CivHooks::CvTacticalAI_ExecuteMoveToPlot>(host, &ReplaceCvTacticalAI_ExecuteMoveToPlot);

Code

7469/// Move unit to protect a specific tile (retrieve unit from first entry in m_CurrentMoveUnits)7470void CvTacticalAI::ExecuteMoveToPlot(CvPlot* pTarget, bool bSaveMoves)7471{7472	// Move first one to target7473	UnitHandle pUnit = m_pPlayer->getUnit(m_CurrentMoveUnits[0].GetID());7474	if(pUnit)7475	{7476		ExecuteMoveToPlot(pUnit, pTarget, bSaveMoves);7477	}7478}

Calls

Called by