CvDiplomacyAI::GetOtherPlayerLastRoundWarValueLost(PlayerTypes, PlayerTypes) const
- Defined in
- CvDiplomacyAI.cpp, line 9344
- Class
- CvDiplomacyAI
- Hook name
CivHooks::CvDiplomacyAI_GetOtherPlayerLastRoundWarValueLost
Hooks
static bool BeforeCvDiplomacyAI_GetOtherPlayerLastRoundWarValueLost(const CvDiplomacyAI* self, PlayerTypes ePlayer, PlayerTypes eLostToPlayer, int& result);static void AfterCvDiplomacyAI_GetOtherPlayerLastRoundWarValueLost(const CvDiplomacyAI* self, PlayerTypes ePlayer, PlayerTypes eLostToPlayer, int& result);static int ReplaceCvDiplomacyAI_GetOtherPlayerLastRoundWarValueLost(int (*original)(const CvDiplomacyAI*, PlayerTypes, PlayerTypes), const CvDiplomacyAI* self, PlayerTypes ePlayer, PlayerTypes eLostToPlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetOtherPlayerLastRoundWarValueLost>(host, &BeforeCvDiplomacyAI_GetOtherPlayerLastRoundWarValueLost);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetOtherPlayerLastRoundWarValueLost>(host, &AfterCvDiplomacyAI_GetOtherPlayerLastRoundWarValueLost);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetOtherPlayerLastRoundWarValueLost>(host, &ReplaceCvDiplomacyAI_GetOtherPlayerLastRoundWarValueLost);
Code
9343// Old estimate of value ePlayer has lost in war with eLostToPlayer (before this turn)9344int CvDiplomacyAI::GetOtherPlayerLastRoundWarValueLost(PlayerTypes ePlayer, PlayerTypes eLostToPlayer) const9345{9346 CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index. Please send Anton your save file and version.");9347 CvAssertMsg(ePlayer < MAX_CIV_PLAYERS, "DIPLOMACY_AI: Invalid Player Index. Please send Anton your save file and version.");9348 CvAssertMsg(eLostToPlayer >= 0, "DIPLOMACY_AI: Invalid Player Index. Please send Anton your save file and version.");9349 CvAssertMsg(eLostToPlayer < MAX_CIV_PLAYERS, "DIPLOMACY_AI: Invalid Player Index. Please send Anton your save file and version.");9350 return m_ppaaiOtherPlayerLastRoundWarValueLost[ePlayer][eLostToPlayer];9351}