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
- CvAIEnemyTerritoryOperation::Init(int, PlayerTypes, PlayerTypes, int, CvCity *, CvCity *)
- CvAIEscortedOperation::Init(int, PlayerTypes, PlayerTypes, int, CvCity *, CvCity *)
- CvAIEscortedOperation::RetargetCivilian(CvUnit *, CvArmyAI *)
- CvAINavalEscortedOperation::Init(int, PlayerTypes, PlayerTypes, int, CvCity *, CvCity *)
- CvAINavalEscortedOperation::RetargetCivilian(CvUnit *, CvArmyAI *)
- CvAIOperationBasicCityAttack::Init(int, PlayerTypes, PlayerTypes, int, CvCity *, CvCity *)
- CvAIOperationCityCloseDefense::Init(int, PlayerTypes, PlayerTypes, int, CvCity *, CvCity *)
- CvAIOperationConcertTour::ArmyInPosition(CvArmyAI *)
- CvAIOperationDestroyBarbarianCamp::ArmyInPosition(CvArmyAI *)
- CvAIOperationFoundCity::ArmyInPosition(CvArmyAI *)
- CvAIOperationFoundCity::Init(int, PlayerTypes, PlayerTypes, int, CvCity *, CvCity *)
- CvAIOperationMerchantDelegation::ArmyInPosition(CvArmyAI *)
- CvAIOperationNavalAttack::Init(int, PlayerTypes, PlayerTypes, int, CvCity *, CvCity *)
- CvAIOperationNavalBombardment::ArmyInPosition(CvArmyAI *)
- CvAIOperationNavalBombardment::Init(int, PlayerTypes, PlayerTypes, int, CvCity *, CvCity *)
- CvAIOperationNavalSuperiority::ArmyInPosition(CvArmyAI *)
- CvAIOperationNavalSuperiority::Init(int, PlayerTypes, PlayerTypes, int, CvCity *, CvCity *)
- CvAIOperationNukeAttack::Init(int, PlayerTypes, PlayerTypes, int, CvCity *, CvCity *)
- CvAIOperationPillageEnemy::ArmyMoved(CvArmyAI *)
- CvAIOperationPureNavalCityAttack::Init(int, PlayerTypes, PlayerTypes, int, CvCity *, CvCity *)
- CvAIOperationQuickColonize::Init(int, PlayerTypes, PlayerTypes, int, CvCity *, CvCity *)
- CvAIOperationRapidResponse::Init(int, PlayerTypes, PlayerTypes, int, CvCity *, CvCity *)
- CvAIOperationRapidResponse::RetargetDefensiveArmy(CvArmyAI *)