CvArmyAI::GetFormationIndex() const
- Defined in
- CvArmyAI.cpp, line 338
- Class
- CvArmyAI
- Hook name
CivHooks::CvArmyAI_GetFormationIndex
Hooks
static bool BeforeCvArmyAI_GetFormationIndex(const CvArmyAI* self, int& result);static void AfterCvArmyAI_GetFormationIndex(const CvArmyAI* self, int& result);static int ReplaceCvArmyAI_GetFormationIndex(int (*original)(const CvArmyAI*), const CvArmyAI* self);CivRegisterBefore<CivHooks::CvArmyAI_GetFormationIndex>(host, &BeforeCvArmyAI_GetFormationIndex);CivRegisterAfter<CivHooks::CvArmyAI_GetFormationIndex>(host, &AfterCvArmyAI_GetFormationIndex);CivRegisterReplace<CivHooks::CvArmyAI_GetFormationIndex>(host, &ReplaceCvArmyAI_GetFormationIndex);
Code
337/// Retrieve index of the formation used by this army338int CvArmyAI::GetFormationIndex() const339{340 return m_iFormationIndex;341}
Called by
- CvAIOperation::BuildListOfUnitsWeStillNeedToBuild()
- CvAIOperation::BuyFinalUnit()
- CvAIOperation::FindBestFitReserveUnit(OperationSlot, CvPlot *, CvPlot *, bool *)
- CvAIOperation::UnitWasRemoved(int, int)
- CvCity::CommitToBuildingUnitForOperation()
- CvCity::GetUnitForOperation()
- CvTacticalAI::ExecuteFleetMoveToTarget(CvArmyAI *, CvPlot *)
- CvTacticalAI::PlotEnemyTerritoryOperationMoves(CvAIEnemyTerritoryOperation *)
- CvTacticalAI::PlotFreeformNavalOperationMoves(CvAINavalOperation *)
- CvTacticalAI::PlotNavalEscortOperationMoves(CvAINavalEscortedOperation *)