CvDiplomacyAI::GetOtherPlayerWarValueLost(PlayerTypes, PlayerTypes) const
- Defined in
- CvDiplomacyAI.cpp, line 9299
- Class
- CvDiplomacyAI
- Hook name
CivHooks::CvDiplomacyAI_GetOtherPlayerWarValueLost
Hooks
static bool BeforeCvDiplomacyAI_GetOtherPlayerWarValueLost(const CvDiplomacyAI* self, PlayerTypes ePlayer, PlayerTypes eLostToPlayer, int& result);static void AfterCvDiplomacyAI_GetOtherPlayerWarValueLost(const CvDiplomacyAI* self, PlayerTypes ePlayer, PlayerTypes eLostToPlayer, int& result);static int ReplaceCvDiplomacyAI_GetOtherPlayerWarValueLost(int (*original)(const CvDiplomacyAI*, PlayerTypes, PlayerTypes), const CvDiplomacyAI* self, PlayerTypes ePlayer, PlayerTypes eLostToPlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetOtherPlayerWarValueLost>(host, &BeforeCvDiplomacyAI_GetOtherPlayerWarValueLost);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetOtherPlayerWarValueLost>(host, &AfterCvDiplomacyAI_GetOtherPlayerWarValueLost);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetOtherPlayerWarValueLost>(host, &ReplaceCvDiplomacyAI_GetOtherPlayerWarValueLost);
Code
9298// What is the value of stuff (Units & Cities) we estimate a player has lost in a war against a another Player?9299int CvDiplomacyAI::GetOtherPlayerWarValueLost(PlayerTypes ePlayer, PlayerTypes eLostToPlayer) const9300{9301 CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index. Please send Jon this with your last 5 autosaves and what changelist # you're playing.");9302 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.");9303 CvAssertMsg(eLostToPlayer >= 0, "DIPLOMACY_AI: Invalid Player Index. Please send Jon this with your last 5 autosaves and what changelist # you're playing.");9304 CvAssertMsg(eLostToPlayer < MAX_CIV_PLAYERS, "DIPLOMACY_AI: Invalid Player Index. Please send Jon this with your last 5 autosaves and what changelist # you're playing.");9305 return m_ppaaiOtherPlayerWarValueLost[ePlayer][eLostToPlayer];9306}