Bazaar developer reference

CvCityReligions::RemoveFormerPantheon()

Defined in
CvReligionClasses.cpp, line 4249
Class
CvCityReligions
Hook name
CivHooks::CvCityReligions_RemoveFormerPantheon

Hooks

static bool BeforeCvCityReligions_RemoveFormerPantheon(CvCityReligions* self);static void AfterCvCityReligions_RemoveFormerPantheon(CvCityReligions* self);static void ReplaceCvCityReligions_RemoveFormerPantheon(void (*original)(CvCityReligions*), CvCityReligions* self);CivRegisterBefore<CivHooks::CvCityReligions_RemoveFormerPantheon>(host, &BeforeCvCityReligions_RemoveFormerPantheon);CivRegisterAfter<CivHooks::CvCityReligions_RemoveFormerPantheon>(host, &AfterCvCityReligions_RemoveFormerPantheon);CivRegisterReplace<CivHooks::CvCityReligions_RemoveFormerPantheon>(host, &ReplaceCvCityReligions_RemoveFormerPantheon);

Code

4248/// Remove presence of old owner's pantheon (used when a city is conquered)4249void CvCityReligions::RemoveFormerPantheon()4250{4251	bool bFoundIt = false;4252	ReligionTypes eOldMajorityReligion = GetReligiousMajority();42534254	ReligionInCityList::iterator it;4255	for(it = m_ReligionStatus.begin(); it != m_ReligionStatus.end() && !bFoundIt; it++)4256	{4257		if(it->m_eReligion == RELIGION_PANTHEON)4258		{4259			m_ReligionStatus.erase(it);42604261			// Found it, so we're done4262			bFoundIt = true;4263		}4264	}42654266	RecomputeFollowers(FOLLOWER_CHANGE_CONQUEST, eOldMajorityReligion);4267}

Calls

Called by