Bazaar developer reference

CvDiplomacyAI::SetDemandCounter(PlayerTypes, int)

Defined in
CvDiplomacyAI.cpp, line 20755
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_SetDemandCounter

Hooks

static bool BeforeCvDiplomacyAI_SetDemandCounter(CvDiplomacyAI* self, PlayerTypes ePlayer, int iValue);static void AfterCvDiplomacyAI_SetDemandCounter(CvDiplomacyAI* self, PlayerTypes ePlayer, int iValue);static void ReplaceCvDiplomacyAI_SetDemandCounter(void (*original)(CvDiplomacyAI*, PlayerTypes, int), CvDiplomacyAI* self, PlayerTypes ePlayer, int iValue);CivRegisterBefore<CivHooks::CvDiplomacyAI_SetDemandCounter>(host, &BeforeCvDiplomacyAI_SetDemandCounter);CivRegisterAfter<CivHooks::CvDiplomacyAI_SetDemandCounter>(host, &AfterCvDiplomacyAI_SetDemandCounter);CivRegisterReplace<CivHooks::CvDiplomacyAI_SetDemandCounter>(host, &ReplaceCvDiplomacyAI_SetDemandCounter);

Code

20755void CvDiplomacyAI::SetDemandCounter(PlayerTypes ePlayer, int iValue)20756{20757	CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");20758	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.");20759	m_paiDemandCounter[ePlayer] = iValue;20760}

Called by