Bazaar developer reference

CvDiplomacyAI::GetWarGoal(PlayerTypes) const

Defined in
CvDiplomacyAI.cpp, line 6347
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_GetWarGoal

Hooks

static bool BeforeCvDiplomacyAI_GetWarGoal(const CvDiplomacyAI* self, PlayerTypes ePlayer, WarGoalTypes& result);static void AfterCvDiplomacyAI_GetWarGoal(const CvDiplomacyAI* self, PlayerTypes ePlayer, WarGoalTypes& result);static WarGoalTypes ReplaceCvDiplomacyAI_GetWarGoal(WarGoalTypes (*original)(const CvDiplomacyAI*, PlayerTypes), const CvDiplomacyAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetWarGoal>(host, &BeforeCvDiplomacyAI_GetWarGoal);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetWarGoal>(host, &AfterCvDiplomacyAI_GetWarGoal);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetWarGoal>(host, &ReplaceCvDiplomacyAI_GetWarGoal);

Code

6346/// What is the Goal of war with this Player6347WarGoalTypes CvDiplomacyAI::GetWarGoal(PlayerTypes ePlayer) const6348{6349	CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");6350	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.");6351	return (WarGoalTypes) m_paeWarGoal[ePlayer];6352}

Called by