Bazaar developer reference

CvMinorCivAI::GetCurrentHappinessBonus(PlayerTypes)

Defined in
CvMinorCivAI.cpp, line 8073
Class
CvMinorCivAI
Hook name
CivHooks::CvMinorCivAI_GetCurrentHappinessBonus

Hooks

static bool BeforeCvMinorCivAI_GetCurrentHappinessBonus(CvMinorCivAI* self, PlayerTypes ePlayer, int& result);static void AfterCvMinorCivAI_GetCurrentHappinessBonus(CvMinorCivAI* self, PlayerTypes ePlayer, int& result);static int ReplaceCvMinorCivAI_GetCurrentHappinessBonus(int (*original)(CvMinorCivAI*, PlayerTypes), CvMinorCivAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvMinorCivAI_GetCurrentHappinessBonus>(host, &BeforeCvMinorCivAI_GetCurrentHappinessBonus);CivRegisterAfter<CivHooks::CvMinorCivAI_GetCurrentHappinessBonus>(host, &AfterCvMinorCivAI_GetCurrentHappinessBonus);CivRegisterReplace<CivHooks::CvMinorCivAI_GetCurrentHappinessBonus>(host, &ReplaceCvMinorCivAI_GetCurrentHappinessBonus);

Code

8072/// Total happiness bonus from this minor civ for this player8073int CvMinorCivAI::GetCurrentHappinessBonus(PlayerTypes ePlayer)8074{8075	int iValue = 0;80768077	iValue += GetCurrentHappinessFlatBonus(ePlayer);8078	iValue += GetCurrentHappinessPerLuxuryBonus(ePlayer);80798080	return iValue;8081}

Calls

Called by