CvPlayer::GetNumPuppetCities() const
- Defined in
- CvPlayer.cpp, line 26777
- Class
- CvPlayer
- Hook name
CivHooks::CvPlayer_GetNumPuppetCities
Hooks
static bool BeforeCvPlayer_GetNumPuppetCities(const CvPlayer* self, int& result);static void AfterCvPlayer_GetNumPuppetCities(const CvPlayer* self, int& result);static int ReplaceCvPlayer_GetNumPuppetCities(int (*original)(const CvPlayer*), const CvPlayer* self);CivRegisterBefore<CivHooks::CvPlayer_GetNumPuppetCities>(host, &BeforeCvPlayer_GetNumPuppetCities);CivRegisterAfter<CivHooks::CvPlayer_GetNumPuppetCities>(host, &AfterCvPlayer_GetNumPuppetCities);CivRegisterReplace<CivHooks::CvPlayer_GetNumPuppetCities>(host, &ReplaceCvPlayer_GetNumPuppetCities);
Code
26776// How many Puppet Cities does this player own26777int CvPlayer::GetNumPuppetCities() const26778{26779 int iNum = 0;2678026781 const CvCity* pLoopCity;26782 int iLoop;26783 for(pLoopCity = firstCity(&iLoop); pLoopCity != NULL; pLoopCity = nextCity(&iLoop))26784 {26785 if(pLoopCity->IsPuppet())26786 {26787 iNum++;26788 }26789 }2679026791 return iNum;26792}
Calls
Called by
- CvCitySpecializationAI::SelectSpecializations()
- EconomicAIHelpers::IsTestStrategy_EarlyExpansion(CvPlayer *)
- CvPlayer::GetJONSCulturePerCityPerTurn() const
- CvPlayer::GetMaxEffectiveCities(bool)
- CvPlayer::canConstruct(BuildingTypes, bool, bool, bool, CvString *) const
- CvLuaPlayer::lGetNumPuppetCities(lua_State *)