CvMinorCivAI::IsEverBulliedByMajor(PlayerTypes) const
- Defined in
- CvMinorCivAI.cpp, line 9620
- Class
- CvMinorCivAI
- Hook name
CivHooks::CvMinorCivAI_IsEverBulliedByMajor
Hooks
static bool BeforeCvMinorCivAI_IsEverBulliedByMajor(const CvMinorCivAI* self, PlayerTypes ePlayer, bool& result);static void AfterCvMinorCivAI_IsEverBulliedByMajor(const CvMinorCivAI* self, PlayerTypes ePlayer, bool& result);static bool ReplaceCvMinorCivAI_IsEverBulliedByMajor(bool (*original)(const CvMinorCivAI*, PlayerTypes), const CvMinorCivAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvMinorCivAI_IsEverBulliedByMajor>(host, &BeforeCvMinorCivAI_IsEverBulliedByMajor);CivRegisterAfter<CivHooks::CvMinorCivAI_IsEverBulliedByMajor>(host, &AfterCvMinorCivAI_IsEverBulliedByMajor);CivRegisterReplace<CivHooks::CvMinorCivAI_IsEverBulliedByMajor>(host, &ReplaceCvMinorCivAI_IsEverBulliedByMajor);
Code
9620bool CvMinorCivAI::IsEverBulliedByMajor(PlayerTypes ePlayer) const9621{9622 CvAssertMsg(ePlayer >= 0, "ePlayer is expected to be non-negative (invalid Index)");9623 CvAssertMsg(ePlayer < MAX_MAJOR_CIVS, "ePlayer is expected to be within maximum bounds (invalid Index)");9624 if(ePlayer < 0 || ePlayer >= MAX_MAJOR_CIVS) return false;96259626 return (m_aiTurnLastBullied[ePlayer] >= 0); // -1 means never bullied9627}
Called by
- CvDiplomacyAI::DoContactMinorCivs()
- CvDiplomacyAI::DoWeBulliedYourMinorStatement(PlayerTypes, DiploStatementTypes &, int &)
- CvDiplomacyAI::GetBestApproachTowardsMinorCiv(PlayerTypes, int &, bool, bool)
- CvDiplomacyAI::GetOtherPlayerProtectedMinorBullied(PlayerTypes)
- CvMinorCivAI::IsEverBulliedByAnyMajor() const
- CvLuaPlayer::lIsEverBulliedByMajor(lua_State *)