Bazaar developer reference

CvDiplomacyAI::GetWantPeaceCounter(PlayerTypes) const

Defined in
CvDiplomacyAI.cpp, line 5498
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_GetWantPeaceCounter

Hooks

static bool BeforeCvDiplomacyAI_GetWantPeaceCounter(const CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static void AfterCvDiplomacyAI_GetWantPeaceCounter(const CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static int ReplaceCvDiplomacyAI_GetWantPeaceCounter(int (*original)(const CvDiplomacyAI*, PlayerTypes), const CvDiplomacyAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetWantPeaceCounter>(host, &BeforeCvDiplomacyAI_GetWantPeaceCounter);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetWantPeaceCounter>(host, &AfterCvDiplomacyAI_GetWantPeaceCounter);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetWantPeaceCounter>(host, &ReplaceCvDiplomacyAI_GetWantPeaceCounter);

Code

5497/// How long have we had our current War Goal with ePlayer?5498int CvDiplomacyAI::GetWantPeaceCounter(PlayerTypes ePlayer) const5499{5500	CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");5501	CvAssertMsg(ePlayer < MAX_CIV_PLAYERS, "DIPLOMACY_AI: Invalid Player Index.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");5502	return (WarGoalTypes) m_paeWantPeaceCounter[ePlayer];5503}

Called by