CvHomelandAI::PlotGeneralMoves()
- Defined in
- CvHomelandAI.cpp, line 2081
- Class
- CvHomelandAI
- Hook name
CivHooks::CvHomelandAI_PlotGeneralMoves
Hooks
static bool BeforeCvHomelandAI_PlotGeneralMoves(CvHomelandAI* self);static void AfterCvHomelandAI_PlotGeneralMoves(CvHomelandAI* self);static void ReplaceCvHomelandAI_PlotGeneralMoves(void (*original)(CvHomelandAI*), CvHomelandAI* self);CivRegisterBefore<CivHooks::CvHomelandAI_PlotGeneralMoves>(host, &BeforeCvHomelandAI_PlotGeneralMoves);CivRegisterAfter<CivHooks::CvHomelandAI_PlotGeneralMoves>(host, &AfterCvHomelandAI_PlotGeneralMoves);CivRegisterReplace<CivHooks::CvHomelandAI_PlotGeneralMoves>(host, &ReplaceCvHomelandAI_PlotGeneralMoves);
Code
2080/// Find moves for great generals2081void CvHomelandAI::PlotGeneralMoves()2082{2083 ClearCurrentMoveUnits();20842085 // Loop through all recruited units2086 for(list<int>::iterator it = m_CurrentTurnUnits.begin(); it != m_CurrentTurnUnits.end(); ++it)2087 {2088 UnitHandle pUnit = m_pPlayer->getUnit(*it);2089 if(pUnit)2090 {2091 if(pUnit->AI_getUnitAIType() == UNITAI_GENERAL)2092 {2093 CvHomelandUnit unit;2094 unit.SetID(pUnit->GetID());2095 m_CurrentMoveUnits.push_back(unit);2096 }2097 }2098 }20992100 if(m_CurrentMoveUnits.size() > 0)2101 {2102 ExecuteGeneralMoves();2103 }2104}
Calls
BaseVector::size- CvHomelandAI::ClearCurrentMoveUnits()
- CvHomelandAI::ExecuteGeneralMoves()
- CvHomelandUnit::CvHomelandUnit()
- CvHomelandUnit::SetID(int)
- CvPlayer::getUnit(int)
- CvUnit::AI_getUnitAIType() const
- CvUnit::GetID() const
FObjectHandle::FObjectHandleFObjectHandle::operator boolFObjectHandle::operator->FStaticVector::push_backstd::list::_Const_iterator::operator!=std::list::_Iterator::operator*std::list::_Iterator::operator++std::list::beginstd::list::end