Bazaar developer reference

CvDiplomacyAI::ChangeOtherPlayerWarmongerAmountTimes100(PlayerTypes, int)

Defined in
CvDiplomacyAI.cpp, line 10300
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_ChangeOtherPlayerWarmongerAmountTimes100

Hooks

static bool BeforeCvDiplomacyAI_ChangeOtherPlayerWarmongerAmountTimes100(CvDiplomacyAI* self, PlayerTypes ePlayer, int iChangeAmount);static void AfterCvDiplomacyAI_ChangeOtherPlayerWarmongerAmountTimes100(CvDiplomacyAI* self, PlayerTypes ePlayer, int iChangeAmount);static void ReplaceCvDiplomacyAI_ChangeOtherPlayerWarmongerAmountTimes100(void (*original)(CvDiplomacyAI*, PlayerTypes, int), CvDiplomacyAI* self, PlayerTypes ePlayer, int iChangeAmount);CivRegisterBefore<CivHooks::CvDiplomacyAI_ChangeOtherPlayerWarmongerAmountTimes100>(host, &BeforeCvDiplomacyAI_ChangeOtherPlayerWarmongerAmountTimes100);CivRegisterAfter<CivHooks::CvDiplomacyAI_ChangeOtherPlayerWarmongerAmountTimes100>(host, &AfterCvDiplomacyAI_ChangeOtherPlayerWarmongerAmountTimes100);CivRegisterReplace<CivHooks::CvDiplomacyAI_ChangeOtherPlayerWarmongerAmountTimes100>(host, &ReplaceCvDiplomacyAI_ChangeOtherPlayerWarmongerAmountTimes100);

Code

10298// Change amount of warmongerishness felt toward this player10299#if defined(MOD_API_EXTENSIONS)10300void CvDiplomacyAI::ChangeOtherPlayerWarmongerAmountTimes100(PlayerTypes ePlayer, int iChangeAmount)10301{10302	int iNewValue = m_paiOtherPlayerWarmongerAmountTimes100[ePlayer] + iChangeAmount;10303	iNewValue = max(0, iNewValue);10304	m_paiOtherPlayerWarmongerAmountTimes100[ePlayer] = iNewValue;10305}

Calls

Called by