CvGame::removePlotExtraYield(int, int)
- Defined in
- CvGame.cpp, line 10094
- Class
- CvGame
- Hook name
CivHooks::CvGame_removePlotExtraYield
Hooks
static bool BeforeCvGame_removePlotExtraYield(CvGame* self, int iX, int iY);static void AfterCvGame_removePlotExtraYield(CvGame* self, int iX, int iY);static void ReplaceCvGame_removePlotExtraYield(void (*original)(CvGame*, int, int), CvGame* self, int iX, int iY);CivRegisterBefore<CivHooks::CvGame_removePlotExtraYield>(host, &BeforeCvGame_removePlotExtraYield);CivRegisterAfter<CivHooks::CvGame_removePlotExtraYield>(host, &AfterCvGame_removePlotExtraYield);CivRegisterReplace<CivHooks::CvGame_removePlotExtraYield>(host, &ReplaceCvGame_removePlotExtraYield);
Code
10094void CvGame::removePlotExtraYield(int iX, int iY)10095{10096 for(std::vector<PlotExtraYield>::iterator it = m_aPlotExtraYields.begin(); it != m_aPlotExtraYields.end(); ++it)10097 {10098 if((*it).m_iX == iX && (*it).m_iY == iY)10099 {10100 m_aPlotExtraYields.erase(it);10101 break;10102 }10103 }1010410105 CvPlot* pPlot = GC.getMap().plot(iX, iY);10106 if(NULL != pPlot)10107 {10108 pPlot->updateYield();10109 }10110}
Calls
- CvGlobals::getMap()
- CvMap::plot(int, int) const
- CvPlot::updateYield()
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