Bazaar developer reference

CvDiplomacyAI::GetLastWarProjection(PlayerTypes) const

Defined in
CvDiplomacyAI.cpp, line 6144
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_GetLastWarProjection

Hooks

static bool BeforeCvDiplomacyAI_GetLastWarProjection(const CvDiplomacyAI* self, PlayerTypes ePlayer, WarProjectionTypes& result);static void AfterCvDiplomacyAI_GetLastWarProjection(const CvDiplomacyAI* self, PlayerTypes ePlayer, WarProjectionTypes& result);static WarProjectionTypes ReplaceCvDiplomacyAI_GetLastWarProjection(WarProjectionTypes (*original)(const CvDiplomacyAI*, PlayerTypes), const CvDiplomacyAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetLastWarProjection>(host, &BeforeCvDiplomacyAI_GetLastWarProjection);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetLastWarProjection>(host, &AfterCvDiplomacyAI_GetLastWarProjection);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetLastWarProjection>(host, &ReplaceCvDiplomacyAI_GetLastWarProjection);

Code

6143/// previous value of GetWarProjection6144WarProjectionTypes CvDiplomacyAI::GetLastWarProjection(PlayerTypes ePlayer) const6145{6146	CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index.  Please send slewis this with your last 5 autosaves and what changelist # you're playing.");6147	CvAssertMsg(ePlayer < MAX_CIV_PLAYERS, "DIPLOMACY_AI: Invalid Player Index.  Please send slewis this with your last 5 autosaves and what changelist # you're playing.");6148	return (WarProjectionTypes) m_paeLastWarProjection[ePlayer];61496150}

Called by