CvTacticalAI::GetNextZoneTarget()
- Defined in
- CvTacticalAI.cpp, line 6158
- Class
- CvTacticalAI
- Hook name
CivHooks::CvTacticalAI_GetNextZoneTarget
Hooks
static bool BeforeCvTacticalAI_GetNextZoneTarget(CvTacticalAI* self, CvTacticalTarget*& result);static void AfterCvTacticalAI_GetNextZoneTarget(CvTacticalAI* self, CvTacticalTarget*& result);static CvTacticalTarget* ReplaceCvTacticalAI_GetNextZoneTarget(CvTacticalTarget* (*original)(CvTacticalAI*), CvTacticalAI* self);CivRegisterBefore<CivHooks::CvTacticalAI_GetNextZoneTarget>(host, &BeforeCvTacticalAI_GetNextZoneTarget);CivRegisterAfter<CivHooks::CvTacticalAI_GetNextZoneTarget>(host, &AfterCvTacticalAI_GetNextZoneTarget);CivRegisterReplace<CivHooks::CvTacticalAI_GetNextZoneTarget>(host, &ReplaceCvTacticalAI_GetNextZoneTarget);
Code
6157/// Find the next target of a requested type in current dominance zone (call after GetFirstZoneTarget())6158CvTacticalTarget* CvTacticalAI::GetNextZoneTarget()6159{6160 m_iCurrentTargetIndex++;61616162 while(m_iCurrentTargetIndex < (int)m_ZoneTargets.size())6163 {6164 if(m_eCurrentTargetType == AI_TACTICAL_TARGET_NONE || m_ZoneTargets[m_iCurrentTargetIndex].GetTargetType() == m_eCurrentTargetType)6165 {6166 return &m_ZoneTargets[m_iCurrentTargetIndex];6167 }6168 m_iCurrentTargetIndex++;6169 }61706171 return NULL;6172}
Calls
BaseVector::operator[]BaseVector::size- CvTacticalTarget::GetTargetType()
Called by
- CvTacticalAI::FindBestBarbarianSeaMove(UnitHandle)
- CvTacticalAI::PlotAncientRuinMoves(int)
- CvTacticalAI::PlotBarbarianCampMoves()
- CvTacticalAI::PlotBarbarianPlunderTradeUnitMove(DomainTypes)
- CvTacticalAI::PlotBastionMoves(int)
- CvTacticalAI::PlotBlockadeImprovementMoves()
- CvTacticalAI::PlotCampDefenseMoves()
- CvTacticalAI::PlotCaptureCityMoves()
- CvTacticalAI::PlotCivilianAttackMoves(AITacticalTargetType)
- CvTacticalAI::PlotDamageCityMoves()
- CvTacticalAI::PlotDestroyUnitMoves(AITacticalTargetType, bool, bool)
- CvTacticalAI::PlotGarrisonMoves(int, bool)
- CvTacticalAI::PlotGuardImprovementMoves(int)
- CvTacticalAI::PlotPillageMoves(AITacticalTargetType, bool)
- CvTacticalAI::PlotPlunderTradePlotMoves(DomainTypes)
- CvTacticalAI::PlotPlunderTradeUnitMoves(DomainTypes)
- CvTacticalAI::PlotSafeBombardMoves()