Bazaar developer reference

CvDiplomacyAI::GetMajorCivOtherPlayerOpinion(PlayerTypes, PlayerTypes) const

Defined in
CvDiplomacyAI.cpp, line 2709
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_GetMajorCivOtherPlayerOpinion

Hooks

static bool BeforeCvDiplomacyAI_GetMajorCivOtherPlayerOpinion(const CvDiplomacyAI* self, PlayerTypes ePlayer, PlayerTypes eWithPlayer, MajorCivOpinionTypes& result);static void AfterCvDiplomacyAI_GetMajorCivOtherPlayerOpinion(const CvDiplomacyAI* self, PlayerTypes ePlayer, PlayerTypes eWithPlayer, MajorCivOpinionTypes& result);static MajorCivOpinionTypes ReplaceCvDiplomacyAI_GetMajorCivOtherPlayerOpinion(MajorCivOpinionTypes (*original)(const CvDiplomacyAI*, PlayerTypes, PlayerTypes), const CvDiplomacyAI* self, PlayerTypes ePlayer, PlayerTypes eWithPlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetMajorCivOtherPlayerOpinion>(host, &BeforeCvDiplomacyAI_GetMajorCivOtherPlayerOpinion);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetMajorCivOtherPlayerOpinion>(host, &AfterCvDiplomacyAI_GetMajorCivOtherPlayerOpinion);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetMajorCivOtherPlayerOpinion>(host, &ReplaceCvDiplomacyAI_GetMajorCivOtherPlayerOpinion);

Code

2708/// What is our guess as to what a player's Diplomatic Opinion is of another player?2709MajorCivOpinionTypes CvDiplomacyAI::GetMajorCivOtherPlayerOpinion(PlayerTypes ePlayer, PlayerTypes eWithPlayer) const2710{2711	CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");2712	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.");2713	CvAssertMsg(eWithPlayer >= 0, "DIPLOMACY_AI: Invalid Player Index.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");2714	CvAssertMsg(eWithPlayer < MAX_MAJOR_CIVS, "DIPLOMACY_AI: Invalid Player Index.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");2715	return (MajorCivOpinionTypes) m_ppaaeOtherPlayerMajorCivOpinion[ePlayer][eWithPlayer];2716}

Called by