CvUnitEntry::GetUnitAIType(int) const
- Defined in
- CvUnitClasses.cpp, line 1148
- Class
- CvUnitEntry
- Hook name
CivHooks::CvUnitEntry_GetUnitAIType
Hooks
static bool BeforeCvUnitEntry_GetUnitAIType(const CvUnitEntry* self, int i, bool& result);static void AfterCvUnitEntry_GetUnitAIType(const CvUnitEntry* self, int i, bool& result);static bool ReplaceCvUnitEntry_GetUnitAIType(bool (*original)(const CvUnitEntry*, int), const CvUnitEntry* self, int i);CivRegisterBefore<CivHooks::CvUnitEntry_GetUnitAIType>(host, &BeforeCvUnitEntry_GetUnitAIType);CivRegisterAfter<CivHooks::CvUnitEntry_GetUnitAIType>(host, &AfterCvUnitEntry_GetUnitAIType);CivRegisterReplace<CivHooks::CvUnitEntry_GetUnitAIType>(host, &ReplaceCvUnitEntry_GetUnitAIType);
Code
1147/// What AIs strategies can this unit adopt1148bool CvUnitEntry::GetUnitAIType(int i) const1149{1150 CvAssertMsg(i < NUM_UNITAI_TYPES, "Index out of bounds");1151 CvAssertMsg(i > -1, "Index out of bounds");1152 return m_pbUnitAIType ? m_pbUnitAIType[i] : false;1153}
Called by
- CvAINavalOperation::FindInitialUnit()
- CvAIOperation::FindBestFitReserveUnit(OperationSlot, CvPlot *, CvPlot *, bool *)
- CvBarbarians::GetRandomBarbarianUnitType(CvPlot *, UnitAITypes)
- CvCity::CreateUnit(UnitTypes, UnitAITypes, bool)
- CvEconomicAI::DoReconState()
- CvHomelandAI::FindUnitsForThisMove(AIHomelandMove, bool)
- CvHomelandAI::PlotWorkerMoves(bool)
- MilitaryAIHelpers::FirstSlotCityCanFill(CvPlayer *, MultiunitFormationTypes, bool, bool, bool)
- MilitaryAIHelpers::NumberOfFillableSlots(CvPlayer *, MultiunitFormationTypes, bool, int *, int *)
- CvPlayer::addFreeUnitAI(UnitAITypes, int)
- CvTacticalAI::FindUnitsForThisMove(TacticalAIMoveTypes, CvPlot *, int, bool)
- CvUnitProductionAI::RecommendUnit(UnitAITypes)