CvTeam::getAtWarCount(bool) const
- Defined in
- CvTeam.cpp, line 2163
- Class
- CvTeam
- Hook name
CivHooks::CvTeam_getAtWarCount
Hooks
static bool BeforeCvTeam_getAtWarCount(const CvTeam* self, bool bIgnoreMinors, int& result);static void AfterCvTeam_getAtWarCount(const CvTeam* self, bool bIgnoreMinors, int& result);static int ReplaceCvTeam_getAtWarCount(int (*original)(const CvTeam*, bool), const CvTeam* self, bool bIgnoreMinors);CivRegisterBefore<CivHooks::CvTeam_getAtWarCount>(host, &BeforeCvTeam_getAtWarCount);CivRegisterAfter<CivHooks::CvTeam_getAtWarCount>(host, &AfterCvTeam_getAtWarCount);CivRegisterReplace<CivHooks::CvTeam_getAtWarCount>(host, &ReplaceCvTeam_getAtWarCount);
Code
2163int CvTeam::getAtWarCount(bool bIgnoreMinors) const2164{2165 int iCount;2166 int iI;21672168 iCount = 0;21692170 for(iI = 0; iI < MAX_CIV_TEAMS; iI++)2171 {2172 if(GET_TEAM((TeamTypes)iI).isAlive())2173 {2174 if(!bIgnoreMinors || !(GET_TEAM((TeamTypes)iI).isMinorCiv()))2175 {2176 if(isAtWar((TeamTypes)iI))2177 {2178 CvAssert(iI != GetID());2179 iCount++;2180 }2181 }2182 }2183 }21842185 return iCount;2186}
Calls
Called by
- CvCity::foodDifferenceTimes100(bool, CvString *) const
- CityStrategyAIHelpers::IsTestCityStrategy_CapitalUnderThreat(CvCity *)
- CvDiplomacyAI::DoCoopWarStatement(PlayerTypes, DiploStatementTypes &, int &)
- CvDiplomacyAI::DoUpdateEstimateOtherPlayerMilitaryThreats()
- CvDiplomacyAI::DoUpdateMilitaryThreats()
- CvDiplomacyAI::DoUpdateOnePlayerMilitaryAggressivePosture(PlayerTypes)
- CvDiplomacyAI::DoUpdateOnePlayerTargetValue(PlayerTypes)
- CvDiplomacyAI::GetGreetHumanMessage(LeaderheadAnimationTypes &)
- CvDllTeam::GetAtWarCount(bool) const
- CvGrandStrategyAI::GetConquestPriority()
- CvPlayer::GetCulturePerTurnFromReligion() const
- CvPlayer::GetHappinessFromReligion()
- CvPlayerPolicies::AddFlavorAsStrategies(int)
- CvLuaTeam::lGetAtWarCount(lua_State *)