Bazaar developer reference

CvDiplomacyAI::GetCoopWarAcceptedState(PlayerTypes, PlayerTypes) const

Defined in
CvDiplomacyAI.cpp, line 20521
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_GetCoopWarAcceptedState

Hooks

static bool BeforeCvDiplomacyAI_GetCoopWarAcceptedState(const CvDiplomacyAI* self, PlayerTypes ePlayer, PlayerTypes eTargetPlayer, CoopWarStates& result);static void AfterCvDiplomacyAI_GetCoopWarAcceptedState(const CvDiplomacyAI* self, PlayerTypes ePlayer, PlayerTypes eTargetPlayer, CoopWarStates& result);static CoopWarStates ReplaceCvDiplomacyAI_GetCoopWarAcceptedState(CoopWarStates (*original)(const CvDiplomacyAI*, PlayerTypes, PlayerTypes), const CvDiplomacyAI* self, PlayerTypes ePlayer, PlayerTypes eTargetPlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetCoopWarAcceptedState>(host, &BeforeCvDiplomacyAI_GetCoopWarAcceptedState);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetCoopWarAcceptedState>(host, &AfterCvDiplomacyAI_GetCoopWarAcceptedState);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetCoopWarAcceptedState>(host, &ReplaceCvDiplomacyAI_GetCoopWarAcceptedState);

Code

20521CoopWarStates CvDiplomacyAI::GetCoopWarAcceptedState(PlayerTypes ePlayer, PlayerTypes eTargetPlayer) const20522{20523	CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");20524	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.");20525	CvAssertMsg(eTargetPlayer >= 0, "DIPLOMACY_AI: Invalid Player Index.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");20526	CvAssertMsg(eTargetPlayer < MAX_MAJOR_CIVS, "DIPLOMACY_AI: Invalid Player Index.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");20527	return (CoopWarStates) m_ppaacCoopWarAcceptedState[ePlayer][eTargetPlayer];20528}

Called by