Bazaar developer reference

CvDiplomacyAI::ChangeOtherPlayerTurnsSinceAttackedProtectedMinor(PlayerTypes, int)

Defined in
CvDiplomacyAI.cpp, line 9938
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_ChangeOtherPlayerTurnsSinceAttackedProtectedMinor

Hooks

static bool BeforeCvDiplomacyAI_ChangeOtherPlayerTurnsSinceAttackedProtectedMinor(CvDiplomacyAI* self, PlayerTypes ePlayer, int iChange);static void AfterCvDiplomacyAI_ChangeOtherPlayerTurnsSinceAttackedProtectedMinor(CvDiplomacyAI* self, PlayerTypes ePlayer, int iChange);static void ReplaceCvDiplomacyAI_ChangeOtherPlayerTurnsSinceAttackedProtectedMinor(void (*original)(CvDiplomacyAI*, PlayerTypes, int), CvDiplomacyAI* self, PlayerTypes ePlayer, int iChange);CivRegisterBefore<CivHooks::CvDiplomacyAI_ChangeOtherPlayerTurnsSinceAttackedProtectedMinor>(host, &BeforeCvDiplomacyAI_ChangeOtherPlayerTurnsSinceAttackedProtectedMinor);CivRegisterAfter<CivHooks::CvDiplomacyAI_ChangeOtherPlayerTurnsSinceAttackedProtectedMinor>(host, &AfterCvDiplomacyAI_ChangeOtherPlayerTurnsSinceAttackedProtectedMinor);CivRegisterReplace<CivHooks::CvDiplomacyAI_ChangeOtherPlayerTurnsSinceAttackedProtectedMinor>(host, &ReplaceCvDiplomacyAI_ChangeOtherPlayerTurnsSinceAttackedProtectedMinor);

Code

9937/// Changes when the last time ePlayer Attacked a Minor we were protecting was9938void CvDiplomacyAI::ChangeOtherPlayerTurnsSinceAttackedProtectedMinor(PlayerTypes ePlayer, int iChange)9939{9940	SetOtherPlayerTurnsSinceAttackedProtectedMinor(ePlayer, GetTurnsSincePlayerAttackedProtectedMinor(ePlayer) + iChange);9941}

Calls

Called by