CvDiplomacyAI::SetWarProjection(PlayerTypes, WarProjectionTypes)
- Defined in
- CvDiplomacyAI.cpp, line 6133
- Class
- CvDiplomacyAI
- Hook name
CivHooks::CvDiplomacyAI_SetWarProjection
Hooks
static bool BeforeCvDiplomacyAI_SetWarProjection(CvDiplomacyAI* self, PlayerTypes ePlayer, WarProjectionTypes eWarProjection);static void AfterCvDiplomacyAI_SetWarProjection(CvDiplomacyAI* self, PlayerTypes ePlayer, WarProjectionTypes eWarProjection);static void ReplaceCvDiplomacyAI_SetWarProjection(void (*original)(CvDiplomacyAI*, PlayerTypes, WarProjectionTypes), CvDiplomacyAI* self, PlayerTypes ePlayer, WarProjectionTypes eWarProjection);CivRegisterBefore<CivHooks::CvDiplomacyAI_SetWarProjection>(host, &BeforeCvDiplomacyAI_SetWarProjection);CivRegisterAfter<CivHooks::CvDiplomacyAI_SetWarProjection>(host, &AfterCvDiplomacyAI_SetWarProjection);CivRegisterReplace<CivHooks::CvDiplomacyAI_SetWarProjection>(host, &ReplaceCvDiplomacyAI_SetWarProjection);
Code
6132/// Sets what ourProjection of war with this Player is6133void CvDiplomacyAI::SetWarProjection(PlayerTypes ePlayer, WarProjectionTypes eWarProjection)6134{6135 CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index. Please send Jon this with your last 5 autosaves and what changelist # you're playing.");6136 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.");6137 CvAssertMsg(eWarProjection >= 0, "DIPLOMACY_AI: Invalid WarProjectionType. Please send Jon this with your last 5 autosaves and what changelist # you're playing.");6138 CvAssertMsg(eWarProjection < NUM_WAR_PROJECTION_TYPES, "DIPLOMACY_AI: Invalid WarProjectionType. Please send Jon this with your last 5 autosaves and what changelist # you're playing.");61396140 m_paeWarProjection[ePlayer] = eWarProjection;6141}