CvCityReligions::DoReligionFounded(ReligionTypes)
- Defined in
- CvReligionClasses.cpp, line 3907
- Class
- CvCityReligions
- Hook name
CivHooks::CvCityReligions_DoReligionFounded
Hooks
static bool BeforeCvCityReligions_DoReligionFounded(CvCityReligions* self, ReligionTypes eReligion);static void AfterCvCityReligions_DoReligionFounded(CvCityReligions* self, ReligionTypes eReligion);static void ReplaceCvCityReligions_DoReligionFounded(void (*original)(CvCityReligions*, ReligionTypes), CvCityReligions* self, ReligionTypes eReligion);CivRegisterBefore<CivHooks::CvCityReligions_DoReligionFounded>(host, &BeforeCvCityReligions_DoReligionFounded);CivRegisterAfter<CivHooks::CvCityReligions_DoReligionFounded>(host, &AfterCvCityReligions_DoReligionFounded);CivRegisterReplace<CivHooks::CvCityReligions_DoReligionFounded>(host, &ReplaceCvCityReligions_DoReligionFounded);
Code
3906/// Note that a religion was founded here3907void CvCityReligions::DoReligionFounded(ReligionTypes eReligion)3908{3909 int iInitialPressure;3910 ReligionTypes eOldMajorityReligion = GetReligiousMajority();39113912 iInitialPressure = GC.getRELIGION_INITIAL_FOUNDING_CITY_PRESSURE() * m_pCity->getPopulation();3913 CvReligionInCity newReligion(eReligion, true, 0, iInitialPressure);3914 m_ReligionStatus.push_back(newReligion);39153916 RecomputeFollowers(FOLLOWER_CHANGE_RELIGION_FOUNDED, eOldMajorityReligion);3917}
Calls
- CvCity::getPopulation(bool) const
- CvCityReligions::GetReligiousMajority()
- CvCityReligions::RecomputeFollowers(CvReligiousFollowChangeReason, ReligionTypes, PlayerTypes)
- CvGlobals::getRELIGION_INITIAL_FOUNDING_CITY_PRESSURE()
- CvReligionInCity::CvReligionInCity(ReligionTypes, bool, int, int)
FStaticVector::push_back