Bazaar developer reference

CvMinorCivAI::ChangeNumGoldGifted(PlayerTypes, int)

Defined in
CvMinorCivAI.cpp, line 9956
Class
CvMinorCivAI
Hook name
CivHooks::CvMinorCivAI_ChangeNumGoldGifted

Hooks

static bool BeforeCvMinorCivAI_ChangeNumGoldGifted(CvMinorCivAI* self, PlayerTypes ePlayer, int iChange);static void AfterCvMinorCivAI_ChangeNumGoldGifted(CvMinorCivAI* self, PlayerTypes ePlayer, int iChange);static void ReplaceCvMinorCivAI_ChangeNumGoldGifted(void (*original)(CvMinorCivAI*, PlayerTypes, int), CvMinorCivAI* self, PlayerTypes ePlayer, int iChange);CivRegisterBefore<CivHooks::CvMinorCivAI_ChangeNumGoldGifted>(host, &BeforeCvMinorCivAI_ChangeNumGoldGifted);CivRegisterAfter<CivHooks::CvMinorCivAI_ChangeNumGoldGifted>(host, &AfterCvMinorCivAI_ChangeNumGoldGifted);CivRegisterReplace<CivHooks::CvMinorCivAI_ChangeNumGoldGifted>(host, &ReplaceCvMinorCivAI_ChangeNumGoldGifted);

Code

9956void CvMinorCivAI::ChangeNumGoldGifted(PlayerTypes ePlayer, int iChange)9957{9958	CvAssertMsg(ePlayer >= 0, "ePlayer is expected to be non-negative (invalid Index)");9959	CvAssertMsg(ePlayer < MAX_MAJOR_CIVS, "ePlayer is expected to be within maximum bounds (invalid Index)");9960	if(ePlayer < 0 || ePlayer >= MAX_MAJOR_CIVS) return;9961	SetNumGoldGifted(ePlayer, GetNumGoldGifted(ePlayer) + iChange);9962}

Calls

Called by