CvGame::removePlotExtraCost(int, int)
- Defined in
- CvGame.cpp, line 10152
- Class
- CvGame
- Hook name
CivHooks::CvGame_removePlotExtraCost
Hooks
static bool BeforeCvGame_removePlotExtraCost(CvGame* self, int iX, int iY);static void AfterCvGame_removePlotExtraCost(CvGame* self, int iX, int iY);static void ReplaceCvGame_removePlotExtraCost(void (*original)(CvGame*, int, int), CvGame* self, int iX, int iY);CivRegisterBefore<CivHooks::CvGame_removePlotExtraCost>(host, &BeforeCvGame_removePlotExtraCost);CivRegisterAfter<CivHooks::CvGame_removePlotExtraCost>(host, &AfterCvGame_removePlotExtraCost);CivRegisterReplace<CivHooks::CvGame_removePlotExtraCost>(host, &ReplaceCvGame_removePlotExtraCost);
Code
10152void CvGame::removePlotExtraCost(int iX, int iY)10153{10154 for(std::vector<PlotExtraCost>::iterator it = m_aPlotExtraCosts.begin(); it != m_aPlotExtraCosts.end(); ++it)10155 {10156 if((*it).m_iX == iX && (*it).m_iY == iY)10157 {10158 m_aPlotExtraCosts.erase(it);10159 break;10160 }10161 }10162}
Calls
std::_Vector_const_iterator::_Vector_const_iteratorstd::_Vector_const_iterator::operator!=std::_Vector_iterator::operator*std::_Vector_iterator::operator++std::vector::beginstd::vector::endstd::vector::erase