Bazaar developer reference

CvUnit::GetMajorityReligionAfterSpread() const

Defined in
CvUnit.cpp, line 8891
Class
CvUnit
Hook name
CivHooks::CvUnit_GetMajorityReligionAfterSpread

Hooks

static bool BeforeCvUnit_GetMajorityReligionAfterSpread(const CvUnit* self, ReligionTypes& result);static void AfterCvUnit_GetMajorityReligionAfterSpread(const CvUnit* self, ReligionTypes& result);static ReligionTypes ReplaceCvUnit_GetMajorityReligionAfterSpread(ReligionTypes (*original)(const CvUnit*), const CvUnit* self);CivRegisterBefore<CivHooks::CvUnit_GetMajorityReligionAfterSpread>(host, &BeforeCvUnit_GetMajorityReligionAfterSpread);CivRegisterAfter<CivHooks::CvUnit_GetMajorityReligionAfterSpread>(host, &AfterCvUnit_GetMajorityReligionAfterSpread);CivRegisterReplace<CivHooks::CvUnit_GetMajorityReligionAfterSpread>(host, &ReplaceCvUnit_GetMajorityReligionAfterSpread);

Code

8891ReligionTypes CvUnit::GetMajorityReligionAfterSpread() const8892{8893	ReligionTypes eRtnValue = NO_RELIGION;8894	CvCity* pCity = GetSpreadReligionTargetCity();88958896	if (pCity != NULL)8897	{8898		if(IsGreatPerson())8899		{8900#if defined(MOD_RELIGION_CONVERSION_MODIFIERS)8901			eRtnValue = pCity->GetCityReligions()->GetMajorityReligionAfterProphetSpread (GetReligionData()->GetReligion(), GetConversionStrength(pCity));8902#else8903			eRtnValue = pCity->GetCityReligions()->GetMajorityReligionAfterProphetSpread (GetReligionData()->GetReligion(), GetConversionStrength());8904#endif8905		}8906		else8907		{8908#if defined(MOD_RELIGION_CONVERSION_MODIFIERS)8909			eRtnValue = pCity->GetCityReligions()->GetMajorityReligionAfterSpread (GetReligionData()->GetReligion(), GetConversionStrength(pCity));8910#else8911			eRtnValue = pCity->GetCityReligions()->GetMajorityReligionAfterSpread (GetReligionData()->GetReligion(), GetConversionStrength());8912#endif8913		}8914	}89158916	return eRtnValue;8917}

Calls

Called by