Bazaar developer reference

CvArmyAI::SetGoalPlot(CvPlot *)

Defined in
CvArmyAI.cpp, line 616
Class
CvArmyAI
Hook name
CivHooks::CvArmyAI_SetGoalPlot

Hooks

static bool BeforeCvArmyAI_SetGoalPlot(CvArmyAI* self, CvPlot* pGoalPlot);static void AfterCvArmyAI_SetGoalPlot(CvArmyAI* self, CvPlot* pGoalPlot);static void ReplaceCvArmyAI_SetGoalPlot(void (*original)(CvArmyAI*, CvPlot*), CvArmyAI* self, CvPlot* pGoalPlot);CivRegisterBefore<CivHooks::CvArmyAI_SetGoalPlot>(host, &BeforeCvArmyAI_SetGoalPlot);CivRegisterAfter<CivHooks::CvArmyAI_SetGoalPlot>(host, &AfterCvArmyAI_SetGoalPlot);CivRegisterReplace<CivHooks::CvArmyAI_SetGoalPlot>(host, &ReplaceCvArmyAI_SetGoalPlot);

Code

615/// Set target plot for army movement616void CvArmyAI::SetGoalPlot(CvPlot* pGoalPlot)617{618	CvAssertMsg(pGoalPlot, "Setting army goal to a NULL plot - please show Ed and send save.");619620	if(pGoalPlot)621	{622		m_iGoalX = pGoalPlot->getX();623		m_iGoalY = pGoalPlot->getY();624	}625	else626	{627		m_iGoalX = -1;628		m_iGoalY = -1;629	}630}

Calls

Called by