Bazaar developer reference

CvMinorCivAI::GetNumGoldGifted(PlayerTypes) const

Defined in
CvMinorCivAI.cpp, line 9940
Class
CvMinorCivAI
Hook name
CivHooks::CvMinorCivAI_GetNumGoldGifted

Hooks

static bool BeforeCvMinorCivAI_GetNumGoldGifted(const CvMinorCivAI* self, PlayerTypes ePlayer, int& result);static void AfterCvMinorCivAI_GetNumGoldGifted(const CvMinorCivAI* self, PlayerTypes ePlayer, int& result);static int ReplaceCvMinorCivAI_GetNumGoldGifted(int (*original)(const CvMinorCivAI*, PlayerTypes), const CvMinorCivAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvMinorCivAI_GetNumGoldGifted>(host, &BeforeCvMinorCivAI_GetNumGoldGifted);CivRegisterAfter<CivHooks::CvMinorCivAI_GetNumGoldGifted>(host, &AfterCvMinorCivAI_GetNumGoldGifted);CivRegisterReplace<CivHooks::CvMinorCivAI_GetNumGoldGifted>(host, &ReplaceCvMinorCivAI_GetNumGoldGifted);

Code

9939// How much gold has ePlayer gifted this minor?9940int CvMinorCivAI::GetNumGoldGifted(PlayerTypes ePlayer) const9941{9942	CvAssertMsg(ePlayer >= 0, "ePlayer is expected to be non-negative (invalid Index)");9943	CvAssertMsg(ePlayer < MAX_MAJOR_CIVS, "ePlayer is expected to be within maximum bounds (invalid Index)");9944	if(ePlayer < 0 || ePlayer >= MAX_MAJOR_CIVS) return 0;  // as defined in Reset()9945	return m_aiNumGoldGifted[ePlayer];9946}

Called by