CvDiplomacyAI::GetOtherPlayerWarmongerAmount(PlayerTypes)
- Defined in
- CvDiplomacyAI.cpp, line 10287
- Class
- CvDiplomacyAI
- Hook name
CivHooks::CvDiplomacyAI_GetOtherPlayerWarmongerAmount
Hooks
static bool BeforeCvDiplomacyAI_GetOtherPlayerWarmongerAmount(CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static void AfterCvDiplomacyAI_GetOtherPlayerWarmongerAmount(CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static int ReplaceCvDiplomacyAI_GetOtherPlayerWarmongerAmount(int (*original)(CvDiplomacyAI*, PlayerTypes), CvDiplomacyAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetOtherPlayerWarmongerAmount>(host, &BeforeCvDiplomacyAI_GetOtherPlayerWarmongerAmount);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetOtherPlayerWarmongerAmount>(host, &AfterCvDiplomacyAI_GetOtherPlayerWarmongerAmount);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetOtherPlayerWarmongerAmount>(host, &ReplaceCvDiplomacyAI_GetOtherPlayerWarmongerAmount);
Code
10286// Get amount of warmongerishness felt toward this player10287int CvDiplomacyAI::GetOtherPlayerWarmongerAmount(PlayerTypes ePlayer)10288{10289 CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index. Please send slewis this with your last 5 autosaves and what changelist # you're playing.");10290 CvAssertMsg(ePlayer < MAX_MAJOR_CIVS, "DIPLOMACY_AI: Invalid Player Index. Please send slewis this with your last 5 autosaves and what changelist # you're playing."); 10291#if defined(MOD_API_EXTENSIONS)10292 return m_paiOtherPlayerWarmongerAmountTimes100[ePlayer] / 100;10293#else10294 return m_paiOtherPlayerWarmongerAmount[ePlayer];10295#endif10296}