CvHomelandAI::PlotProphetMoves()
- Defined in
- CvHomelandAI.cpp, line 1925
- Class
- CvHomelandAI
- Hook name
CivHooks::CvHomelandAI_PlotProphetMoves
Hooks
static bool BeforeCvHomelandAI_PlotProphetMoves(CvHomelandAI* self);static void AfterCvHomelandAI_PlotProphetMoves(CvHomelandAI* self);static void ReplaceCvHomelandAI_PlotProphetMoves(void (*original)(CvHomelandAI*), CvHomelandAI* self);CivRegisterBefore<CivHooks::CvHomelandAI_PlotProphetMoves>(host, &BeforeCvHomelandAI_PlotProphetMoves);CivRegisterAfter<CivHooks::CvHomelandAI_PlotProphetMoves>(host, &AfterCvHomelandAI_PlotProphetMoves);CivRegisterReplace<CivHooks::CvHomelandAI_PlotProphetMoves>(host, &ReplaceCvHomelandAI_PlotProphetMoves);
Code
1924/// Find moves for prophets1925void CvHomelandAI::PlotProphetMoves()1926{1927 ClearCurrentMoveUnits();19281929 // Loop through all recruited units1930 for(list<int>::iterator it = m_CurrentTurnUnits.begin(); it != m_CurrentTurnUnits.end(); ++it)1931 {1932 UnitHandle pUnit = m_pPlayer->getUnit(*it);1933 if(pUnit)1934 {1935 if(pUnit->AI_getUnitAIType() == UNITAI_PROPHET)1936 {1937 CvHomelandUnit unit;1938 unit.SetID(pUnit->GetID());1939 m_CurrentMoveUnits.push_back(unit);1940 }1941 }1942 }19431944 if(m_CurrentMoveUnits.size() > 0)1945 {1946 ExecuteProphetMoves();1947 }1948}
Calls
BaseVector::size- CvHomelandAI::ClearCurrentMoveUnits()
- CvHomelandAI::ExecuteProphetMoves()
- 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