Bazaar developer reference

CvMinorCivAI::SetNumGoldGifted(PlayerTypes, int)

Defined in
CvMinorCivAI.cpp, line 9948
Class
CvMinorCivAI
Hook name
CivHooks::CvMinorCivAI_SetNumGoldGifted

Hooks

static bool BeforeCvMinorCivAI_SetNumGoldGifted(CvMinorCivAI* self, PlayerTypes ePlayer, int iValue);static void AfterCvMinorCivAI_SetNumGoldGifted(CvMinorCivAI* self, PlayerTypes ePlayer, int iValue);static void ReplaceCvMinorCivAI_SetNumGoldGifted(void (*original)(CvMinorCivAI*, PlayerTypes, int), CvMinorCivAI* self, PlayerTypes ePlayer, int iValue);CivRegisterBefore<CivHooks::CvMinorCivAI_SetNumGoldGifted>(host, &BeforeCvMinorCivAI_SetNumGoldGifted);CivRegisterAfter<CivHooks::CvMinorCivAI_SetNumGoldGifted>(host, &AfterCvMinorCivAI_SetNumGoldGifted);CivRegisterReplace<CivHooks::CvMinorCivAI_SetNumGoldGifted>(host, &ReplaceCvMinorCivAI_SetNumGoldGifted);

Code

9948void CvMinorCivAI::SetNumGoldGifted(PlayerTypes ePlayer, int iValue)9949{9950	CvAssertMsg(ePlayer >= 0, "ePlayer is expected to be non-negative (invalid Index)");9951	CvAssertMsg(ePlayer < MAX_MAJOR_CIVS, "ePlayer is expected to be within maximum bounds (invalid Index)");9952	if(ePlayer < 0 || ePlayer >= MAX_MAJOR_CIVS) return;9953	m_aiNumGoldGifted[ePlayer] = iValue;9954}

Called by