Bazaar developer reference

CvDiplomacyAI::SetMajorCivOtherPlayerOpinion(PlayerTypes, PlayerTypes, MajorCivOpinionTypes)

Defined in
CvDiplomacyAI.cpp, line 2719
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_SetMajorCivOtherPlayerOpinion

Hooks

static bool BeforeCvDiplomacyAI_SetMajorCivOtherPlayerOpinion(CvDiplomacyAI* self, PlayerTypes ePlayer, PlayerTypes eWithPlayer, MajorCivOpinionTypes ePlayerOpinion);static void AfterCvDiplomacyAI_SetMajorCivOtherPlayerOpinion(CvDiplomacyAI* self, PlayerTypes ePlayer, PlayerTypes eWithPlayer, MajorCivOpinionTypes ePlayerOpinion);static void ReplaceCvDiplomacyAI_SetMajorCivOtherPlayerOpinion(void (*original)(CvDiplomacyAI*, PlayerTypes, PlayerTypes, MajorCivOpinionTypes), CvDiplomacyAI* self, PlayerTypes ePlayer, PlayerTypes eWithPlayer, MajorCivOpinionTypes ePlayerOpinion);CivRegisterBefore<CivHooks::CvDiplomacyAI_SetMajorCivOtherPlayerOpinion>(host, &BeforeCvDiplomacyAI_SetMajorCivOtherPlayerOpinion);CivRegisterAfter<CivHooks::CvDiplomacyAI_SetMajorCivOtherPlayerOpinion>(host, &AfterCvDiplomacyAI_SetMajorCivOtherPlayerOpinion);CivRegisterReplace<CivHooks::CvDiplomacyAI_SetMajorCivOtherPlayerOpinion>(host, &ReplaceCvDiplomacyAI_SetMajorCivOtherPlayerOpinion);

Code

2718/// Sets what our is guess as to what a player's Diplomatic Opinion is of another player2719void CvDiplomacyAI::SetMajorCivOtherPlayerOpinion(PlayerTypes ePlayer, PlayerTypes eWithPlayer, MajorCivOpinionTypes ePlayerOpinion)2720{2721	CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");2722	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.");2723	CvAssertMsg(eWithPlayer >= 0, "DIPLOMACY_AI: Invalid Player Index.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");2724	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.");2725	CvAssertMsg(ePlayerOpinion >= 0, "DIPLOMACY_AI: Invalid MajorCivOpinionType.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");2726	CvAssertMsg(ePlayerOpinion < NUM_MAJOR_CIV_OPINION_TYPES, "DIPLOMACY_AI: Invalid MajorCivOpinionType.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");2727	m_ppaaeOtherPlayerMajorCivOpinion[ePlayer][eWithPlayer] = ePlayerOpinion;2728}

Called by