CvDiplomacyAI::SetNumWondersBeatenTo(PlayerTypes, int)
- Defined in
- CvDiplomacyAI.cpp, line 8963
- Class
- CvDiplomacyAI
- Hook name
CivHooks::CvDiplomacyAI_SetNumWondersBeatenTo
Hooks
static bool BeforeCvDiplomacyAI_SetNumWondersBeatenTo(CvDiplomacyAI* self, PlayerTypes ePlayer, int iNewValue);static void AfterCvDiplomacyAI_SetNumWondersBeatenTo(CvDiplomacyAI* self, PlayerTypes ePlayer, int iNewValue);static void ReplaceCvDiplomacyAI_SetNumWondersBeatenTo(void (*original)(CvDiplomacyAI*, PlayerTypes, int), CvDiplomacyAI* self, PlayerTypes ePlayer, int iNewValue);CivRegisterBefore<CivHooks::CvDiplomacyAI_SetNumWondersBeatenTo>(host, &BeforeCvDiplomacyAI_SetNumWondersBeatenTo);CivRegisterAfter<CivHooks::CvDiplomacyAI_SetNumWondersBeatenTo>(host, &AfterCvDiplomacyAI_SetNumWondersBeatenTo);CivRegisterReplace<CivHooks::CvDiplomacyAI_SetNumWondersBeatenTo>(host, &ReplaceCvDiplomacyAI_SetNumWondersBeatenTo);
Code
8962/// How many wonders has ePlayer beaten us to?8963void CvDiplomacyAI::SetNumWondersBeatenTo(PlayerTypes ePlayer, int iNewValue)8964{8965 CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index. Please send Jon this with your last 5 autosaves and what changelist # you're playing.");8966 CvAssertMsg(ePlayer < MAX_CIV_PLAYERS, "DIPLOMACY_AI: Invalid Player Index. Please send Jon this with your last 5 autosaves and what changelist # you're playing.");8967 CvAssertMsg(iNewValue >= 0, "DIPLOMACY_AI: Setting NumWondersBeatenTo to a negative value. Please send Jon this with your last 5 autosaves and what changelist # you're playing.");8968 m_paiNumWondersBeatenTo[ePlayer] = iNewValue;8969}