CvDiplomacyAI::SetWarFaceWithPlayer(PlayerTypes, WarFaceTypes)
- Defined in
- CvDiplomacyAI.cpp, line 5787
- Class
- CvDiplomacyAI
- Hook name
CivHooks::CvDiplomacyAI_SetWarFaceWithPlayer
Hooks
static bool BeforeCvDiplomacyAI_SetWarFaceWithPlayer(CvDiplomacyAI* self, PlayerTypes ePlayer, WarFaceTypes eWarFace);static void AfterCvDiplomacyAI_SetWarFaceWithPlayer(CvDiplomacyAI* self, PlayerTypes ePlayer, WarFaceTypes eWarFace);static void ReplaceCvDiplomacyAI_SetWarFaceWithPlayer(void (*original)(CvDiplomacyAI*, PlayerTypes, WarFaceTypes), CvDiplomacyAI* self, PlayerTypes ePlayer, WarFaceTypes eWarFace);CivRegisterBefore<CivHooks::CvDiplomacyAI_SetWarFaceWithPlayer>(host, &BeforeCvDiplomacyAI_SetWarFaceWithPlayer);CivRegisterAfter<CivHooks::CvDiplomacyAI_SetWarFaceWithPlayer>(host, &AfterCvDiplomacyAI_SetWarFaceWithPlayer);CivRegisterReplace<CivHooks::CvDiplomacyAI_SetWarFaceWithPlayer>(host, &ReplaceCvDiplomacyAI_SetWarFaceWithPlayer);
Code
5787void CvDiplomacyAI::SetWarFaceWithPlayer(PlayerTypes ePlayer, WarFaceTypes eWarFace)5788{5789 CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index. Please send Jon this with your last 5 autosaves and what changelist # you're playing.");5790 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.");5791 CvAssertMsg(eWarFace >= 0, "DIPLOMACY_AI: Invalid WarFaceType. Please send Jon this with your last 5 autosaves and what changelist # you're playing.");5792 CvAssertMsg(eWarFace < NUM_WAR_FACES, "DIPLOMACY_AI: Invalid WarFaceType. Please send Jon this with your last 5 autosaves and what changelist # you're playing.");57935794 m_paeWarFace[ePlayer] = eWarFace;5795}