CvPlayer::UpdateUnitProductionMaintenanceMod()
- Defined in
- CvPlayer.cpp, line 9674
- Class
- CvPlayer
- Hook name
CivHooks::CvPlayer_UpdateUnitProductionMaintenanceMod
Hooks
static bool BeforeCvPlayer_UpdateUnitProductionMaintenanceMod(CvPlayer* self);static void AfterCvPlayer_UpdateUnitProductionMaintenanceMod(CvPlayer* self);static void ReplaceCvPlayer_UpdateUnitProductionMaintenanceMod(void (*original)(CvPlayer*), CvPlayer* self);CivRegisterBefore<CivHooks::CvPlayer_UpdateUnitProductionMaintenanceMod>(host, &BeforeCvPlayer_UpdateUnitProductionMaintenanceMod);CivRegisterAfter<CivHooks::CvPlayer_UpdateUnitProductionMaintenanceMod>(host, &AfterCvPlayer_UpdateUnitProductionMaintenanceMod);CivRegisterReplace<CivHooks::CvPlayer_UpdateUnitProductionMaintenanceMod>(host, &ReplaceCvPlayer_UpdateUnitProductionMaintenanceMod);
Code
9673/// How much does Production is being eaten up by Units? (update cache)9674void CvPlayer::UpdateUnitProductionMaintenanceMod()9675{9676 m_iUnitProductionMaintenanceMod = calculateUnitProductionMaintenanceMod();96779678 if(GetID() == GC.getGame().getActivePlayer())9679 {9680 GC.GetEngineUserInterface()->setDirty(CityInfo_DIRTY_BIT, true);9681 GC.GetEngineUserInterface()->setDirty(GameData_DIRTY_BIT, true);9682 }9683}
Calls
- CvGame::getActivePlayer() const
- CvGlobals::GetEngineUserInterface()
- CvGlobals::getGame()
- CvPlayer::calculateUnitProductionMaintenanceMod() const
- CvPlayer::GetID() const
FAutoVariable::operator=ICvUserInterface1::setDirty
Called by
- CvCity::PostKill(bool, CvPlot *, PlayerTypes)
- CvCity::init(int, PlayerTypes, int, int, bool, bool, ReligionTypes, const char *)
- CvCity::setPopulation(int, bool)
- CvUnit::initWithNameOffset(int, UnitTypes, int, UnitAITypes, PlayerTypes, int, int, DirectionTypes, bool, bool, int, int)
- CvUnit::kill(bool, PlayerTypes)