Bazaar developer reference

CvDiplomacyAI::GetDoFCounter(PlayerTypes) const

Defined in
CvDiplomacyAI.cpp, line 21281
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_GetDoFCounter

Hooks

static bool BeforeCvDiplomacyAI_GetDoFCounter(const CvDiplomacyAI* self, PlayerTypes ePlayer, short& result);static void AfterCvDiplomacyAI_GetDoFCounter(const CvDiplomacyAI* self, PlayerTypes ePlayer, short& result);static short ReplaceCvDiplomacyAI_GetDoFCounter(short (*original)(const CvDiplomacyAI*, PlayerTypes), const CvDiplomacyAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetDoFCounter>(host, &BeforeCvDiplomacyAI_GetDoFCounter);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetDoFCounter>(host, &AfterCvDiplomacyAI_GetDoFCounter);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetDoFCounter>(host, &ReplaceCvDiplomacyAI_GetDoFCounter);

Code

21281short CvDiplomacyAI::GetDoFCounter(PlayerTypes ePlayer) const21282{21283	CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");21284	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.");21285	return m_paiDoFCounter[ePlayer];21286}

Called by