CvUnit::GetNumFollowersAfterSpread() const
- Defined in
- CvUnit.cpp, line 8862
- Class
- CvUnit
- Hook name
CivHooks::CvUnit_GetNumFollowersAfterSpread
Hooks
static bool BeforeCvUnit_GetNumFollowersAfterSpread(const CvUnit* self, int& result);static void AfterCvUnit_GetNumFollowersAfterSpread(const CvUnit* self, int& result);static int ReplaceCvUnit_GetNumFollowersAfterSpread(int (*original)(const CvUnit*), const CvUnit* self);CivRegisterBefore<CivHooks::CvUnit_GetNumFollowersAfterSpread>(host, &BeforeCvUnit_GetNumFollowersAfterSpread);CivRegisterAfter<CivHooks::CvUnit_GetNumFollowersAfterSpread>(host, &AfterCvUnit_GetNumFollowersAfterSpread);CivRegisterReplace<CivHooks::CvUnit_GetNumFollowersAfterSpread>(host, &ReplaceCvUnit_GetNumFollowersAfterSpread);
Code
8862int CvUnit::GetNumFollowersAfterSpread() const8863{8864 int iRtnValue = 0;8865 CvCity* pCity = GetSpreadReligionTargetCity();88668867 if (pCity != NULL)8868 {8869 if(IsGreatPerson())8870 {8871#if defined(MOD_RELIGION_CONVERSION_MODIFIERS)8872 iRtnValue = pCity->GetCityReligions()->GetNumFollowersAfterProphetSpread (GetReligionData()->GetReligion(), GetConversionStrength(pCity));8873#else8874 iRtnValue = pCity->GetCityReligions()->GetNumFollowersAfterProphetSpread (GetReligionData()->GetReligion(), GetConversionStrength());8875#endif8876 }8877 else8878 {8879#if defined(MOD_RELIGION_CONVERSION_MODIFIERS)8880 iRtnValue = pCity->GetCityReligions()->GetNumFollowersAfterSpread (GetReligionData()->GetReligion(), GetConversionStrength(pCity));8881#else8882 iRtnValue = pCity->GetCityReligions()->GetNumFollowersAfterSpread (GetReligionData()->GetReligion(), GetConversionStrength());8883#endif8884 }8885 }88868887 return iRtnValue;8888}
Calls
- CvCity::GetCityReligions() const
- CvCityReligions::GetNumFollowersAfterProphetSpread(ReligionTypes, int)
- CvCityReligions::GetNumFollowersAfterSpread(ReligionTypes, int)
- CvUnit::GetConversionStrength(const CvCity *) const
- CvUnit::GetReligionData() const
- CvUnit::GetSpreadReligionTargetCity() const
- CvUnit::IsGreatPerson() const
- CvUnitReligion::GetReligion() const