CvPlayerAI::PeekAtNextUnitToBuildForOperationSlot(int)
- Defined in
- CvPlayerAI.cpp, line 901
- Class
- CvPlayerAI
- Hook name
CivHooks::CvPlayerAI_PeekAtNextUnitToBuildForOperationSlot- Overrides
- CvPlayer::PeekAtNextUnitToBuildForOperationSlot(int)
Hooks
static bool BeforeCvPlayerAI_PeekAtNextUnitToBuildForOperationSlot(CvPlayerAI* self, int iAreaID, OperationSlot& result);static void AfterCvPlayerAI_PeekAtNextUnitToBuildForOperationSlot(CvPlayerAI* self, int iAreaID, OperationSlot& result);static OperationSlot ReplaceCvPlayerAI_PeekAtNextUnitToBuildForOperationSlot(OperationSlot (*original)(CvPlayerAI*, int), CvPlayerAI* self, int iAreaID);CivRegisterBefore<CivHooks::CvPlayerAI_PeekAtNextUnitToBuildForOperationSlot>(host, &BeforeCvPlayerAI_PeekAtNextUnitToBuildForOperationSlot);CivRegisterAfter<CivHooks::CvPlayerAI_PeekAtNextUnitToBuildForOperationSlot>(host, &AfterCvPlayerAI_PeekAtNextUnitToBuildForOperationSlot);CivRegisterReplace<CivHooks::CvPlayerAI_PeekAtNextUnitToBuildForOperationSlot>(host, &ReplaceCvPlayerAI_PeekAtNextUnitToBuildForOperationSlot);
Code
901OperationSlot CvPlayerAI::PeekAtNextUnitToBuildForOperationSlot(int iAreaID)902{903 OperationSlot thisSlot;904905 // search through our operations till we find one that needs a unit906 std::map<int, CvAIOperation*>::iterator iter;907 for(iter = m_AIOperations.begin(); iter != m_AIOperations.end(); ++iter)908 {909 CvAIOperation* pThisOperation = iter->second;910 if(pThisOperation)911 {912 thisSlot = pThisOperation->PeekAtNextUnitToBuild(iAreaID);913 if(thisSlot.IsValid())914 {915 break;916 }917 }918 }919920 return thisSlot;921}
Calls
- CvAIOperation::PeekAtNextUnitToBuild(int)
- OperationSlot::IsValid() const
OperationSlot::OperationSlot- OperationSlot::OperationSlot()
OperationSlot::operator=std::_Tree::beginstd::_Tree::const_iterator::operator!=std::_Tree::endstd::_Tree::iterator::iteratorstd::_Tree::iterator::operator++std::_Tree::iterator::operator->std::_Tree::iterator::operator=