Bazaar developer reference

CvPlayer::ChangeOccupiedPopulationUnhappinessMod(int)

Defined in
CvPlayer.cpp, line 12942
Class
CvPlayer
Hook name
CivHooks::CvPlayer_ChangeOccupiedPopulationUnhappinessMod

Hooks

static bool BeforeCvPlayer_ChangeOccupiedPopulationUnhappinessMod(CvPlayer* self, int iChange);static void AfterCvPlayer_ChangeOccupiedPopulationUnhappinessMod(CvPlayer* self, int iChange);static void ReplaceCvPlayer_ChangeOccupiedPopulationUnhappinessMod(void (*original)(CvPlayer*, int), CvPlayer* self, int iChange);CivRegisterBefore<CivHooks::CvPlayer_ChangeOccupiedPopulationUnhappinessMod>(host, &BeforeCvPlayer_ChangeOccupiedPopulationUnhappinessMod);CivRegisterAfter<CivHooks::CvPlayer_ChangeOccupiedPopulationUnhappinessMod>(host, &AfterCvPlayer_ChangeOccupiedPopulationUnhappinessMod);CivRegisterReplace<CivHooks::CvPlayer_ChangeOccupiedPopulationUnhappinessMod>(host, &ReplaceCvPlayer_ChangeOccupiedPopulationUnhappinessMod);

Code

12941/// Occupied Population Count Unhappiness Mod (-50 = 50% of normal)12942void CvPlayer::ChangeOccupiedPopulationUnhappinessMod(int iChange)12943{12944	if(iChange != 0)12945	{12946		m_iOccupiedPopulationUnhappinessMod += iChange;12947	}12948}

Calls

Called by