Bazaar developer reference

CvDiplomacyAI::GetDemandCounter(PlayerTypes) const

Defined in
CvDiplomacyAI.cpp, line 20748
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_GetDemandCounter

Hooks

static bool BeforeCvDiplomacyAI_GetDemandCounter(const CvDiplomacyAI* self, PlayerTypes ePlayer, short& result);static void AfterCvDiplomacyAI_GetDemandCounter(const CvDiplomacyAI* self, PlayerTypes ePlayer, short& result);static short ReplaceCvDiplomacyAI_GetDemandCounter(short (*original)(const CvDiplomacyAI*, PlayerTypes), const CvDiplomacyAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetDemandCounter>(host, &BeforeCvDiplomacyAI_GetDemandCounter);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetDemandCounter>(host, &AfterCvDiplomacyAI_GetDemandCounter);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetDemandCounter>(host, &ReplaceCvDiplomacyAI_GetDemandCounter);

Code

20748short CvDiplomacyAI::GetDemandCounter(PlayerTypes ePlayer) const20749{20750	CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");20751	CvAssertMsg(ePlayer < MAX_MAJOR_CIVS, "DIPLOMACY_AI: Invalid Player Index.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");20752	return m_paiDemandCounter[ePlayer];20753}

Called by