Bazaar developer reference

CvDiplomacyAI::SetOtherPlayerNumProtectedMinorsBullied(PlayerTypes, int)

Defined in
CvDiplomacyAI.cpp, line 10106
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_SetOtherPlayerNumProtectedMinorsBullied

Hooks

static bool BeforeCvDiplomacyAI_SetOtherPlayerNumProtectedMinorsBullied(CvDiplomacyAI* self, PlayerTypes ePlayer, int iValue);static void AfterCvDiplomacyAI_SetOtherPlayerNumProtectedMinorsBullied(CvDiplomacyAI* self, PlayerTypes ePlayer, int iValue);static void ReplaceCvDiplomacyAI_SetOtherPlayerNumProtectedMinorsBullied(void (*original)(CvDiplomacyAI*, PlayerTypes, int), CvDiplomacyAI* self, PlayerTypes ePlayer, int iValue);CivRegisterBefore<CivHooks::CvDiplomacyAI_SetOtherPlayerNumProtectedMinorsBullied>(host, &BeforeCvDiplomacyAI_SetOtherPlayerNumProtectedMinorsBullied);CivRegisterAfter<CivHooks::CvDiplomacyAI_SetOtherPlayerNumProtectedMinorsBullied>(host, &AfterCvDiplomacyAI_SetOtherPlayerNumProtectedMinorsBullied);CivRegisterReplace<CivHooks::CvDiplomacyAI_SetOtherPlayerNumProtectedMinorsBullied>(host, &ReplaceCvDiplomacyAI_SetOtherPlayerNumProtectedMinorsBullied);

Code

10105/// Sets how many ProtectedMinors have we seen this Player bully10106void CvDiplomacyAI::SetOtherPlayerNumProtectedMinorsBullied(PlayerTypes ePlayer, int iValue)10107{10108	CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index.  Please send Anton your save file and version.");10109	CvAssertMsg(ePlayer < MAX_MAJOR_CIVS, "DIPLOMACY_AI: Invalid Player Index.  Please send Anton your save file and version.");10110	CvAssertMsg(iValue >= 0, "DIPLOMACY_AI: Setting number of protected Minors to be negative.  Please send Anton your save file and version.");10111	m_paiOtherPlayerNumProtectedMinorsBullied[ePlayer] = iValue;10112}

Called by