Bazaar developer reference

CvDiplomacyAI::GetWarFaceWithPlayer(PlayerTypes) const

Defined in
CvDiplomacyAI.cpp, line 5780
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_GetWarFaceWithPlayer

Hooks

static bool BeforeCvDiplomacyAI_GetWarFaceWithPlayer(const CvDiplomacyAI* self, PlayerTypes ePlayer, WarFaceTypes& result);static void AfterCvDiplomacyAI_GetWarFaceWithPlayer(const CvDiplomacyAI* self, PlayerTypes ePlayer, WarFaceTypes& result);static WarFaceTypes ReplaceCvDiplomacyAI_GetWarFaceWithPlayer(WarFaceTypes (*original)(const CvDiplomacyAI*, PlayerTypes), const CvDiplomacyAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetWarFaceWithPlayer>(host, &BeforeCvDiplomacyAI_GetWarFaceWithPlayer);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetWarFaceWithPlayer>(host, &AfterCvDiplomacyAI_GetWarFaceWithPlayer);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetWarFaceWithPlayer>(host, &ReplaceCvDiplomacyAI_GetWarFaceWithPlayer);

Code

5779/// If we're planning war with ePlayer, how are we acting towards him?5780WarFaceTypes CvDiplomacyAI::GetWarFaceWithPlayer(PlayerTypes ePlayer) const5781{5782	CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index. Please send Jon this with your last 5 autosaves and what changelist # you're playing.");5783	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.");5784	return (WarFaceTypes) m_paeWarFace[ePlayer];5785}

Called by