CvDiplomacyAI::SetLastWarProjection(PlayerTypes, WarProjectionTypes)
- Defined in
- CvDiplomacyAI.cpp, line 6152
- Class
- CvDiplomacyAI
- Hook name
CivHooks::CvDiplomacyAI_SetLastWarProjection
Hooks
static bool BeforeCvDiplomacyAI_SetLastWarProjection(CvDiplomacyAI* self, PlayerTypes ePlayer, WarProjectionTypes eWarProjection);static void AfterCvDiplomacyAI_SetLastWarProjection(CvDiplomacyAI* self, PlayerTypes ePlayer, WarProjectionTypes eWarProjection);static void ReplaceCvDiplomacyAI_SetLastWarProjection(void (*original)(CvDiplomacyAI*, PlayerTypes, WarProjectionTypes), CvDiplomacyAI* self, PlayerTypes ePlayer, WarProjectionTypes eWarProjection);CivRegisterBefore<CivHooks::CvDiplomacyAI_SetLastWarProjection>(host, &BeforeCvDiplomacyAI_SetLastWarProjection);CivRegisterAfter<CivHooks::CvDiplomacyAI_SetLastWarProjection>(host, &AfterCvDiplomacyAI_SetLastWarProjection);CivRegisterReplace<CivHooks::CvDiplomacyAI_SetLastWarProjection>(host, &ReplaceCvDiplomacyAI_SetLastWarProjection);
Code
6152void CvDiplomacyAI::SetLastWarProjection(PlayerTypes ePlayer, WarProjectionTypes eWarProjection)6153{6154 CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index. Please send slewis this with your last 5 autosaves and what changelist # you're playing.");6155 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.");6156 CvAssertMsg(eWarProjection >= 0, "DIPLOMACY_AI: Invalid WarProjectionType. Please send slewis this with your last 5 autosaves and what changelist # you're playing.");6157 CvAssertMsg(eWarProjection < NUM_WAR_PROJECTION_TYPES, "DIPLOMACY_AI: Invalid WarProjectionType. Please send slewis this with your last 5 autosaves and what changelist # you're playing.");61586159 m_paeLastWarProjection[ePlayer] = eWarProjection;61606161}