CvGame::getPlotExtraCost(int, int) const
- Defined in
- CvGame.cpp, line 10113
- Class
- CvGame
- Hook name
CivHooks::CvGame_getPlotExtraCost
Hooks
static bool BeforeCvGame_getPlotExtraCost(const CvGame* self, int iX, int iY, int& result);static void AfterCvGame_getPlotExtraCost(const CvGame* self, int iX, int iY, int& result);static int ReplaceCvGame_getPlotExtraCost(int (*original)(const CvGame*, int, int), const CvGame* self, int iX, int iY);CivRegisterBefore<CivHooks::CvGame_getPlotExtraCost>(host, &BeforeCvGame_getPlotExtraCost);CivRegisterAfter<CivHooks::CvGame_getPlotExtraCost>(host, &AfterCvGame_getPlotExtraCost);CivRegisterReplace<CivHooks::CvGame_getPlotExtraCost>(host, &ReplaceCvGame_getPlotExtraCost);
Code
10113int CvGame::getPlotExtraCost(int iX, int iY) const10114{10115 for(std::vector<PlotExtraCost>::const_iterator it = m_aPlotExtraCosts.begin(); it != m_aPlotExtraCosts.end(); ++it)10116 {10117 if((*it).m_iX == iX && (*it).m_iY == iY)10118 {10119 return (*it).m_iCost;10120 }10121 }1012210123 return 0;10124}
Calls
std::_Vector_const_iterator::operator!=std::_Vector_const_iterator::operator*std::_Vector_const_iterator::operator++std::vector::beginstd::vector::end