Bazaar developer reference

CvGameReligions::SetHolyCity(ReligionTypes, CvCity *)

Defined in
CvReligionClasses.cpp, line 1601
Class
CvGameReligions
Hook name
CivHooks::CvGameReligions_SetHolyCity

Hooks

static bool BeforeCvGameReligions_SetHolyCity(CvGameReligions* self, ReligionTypes eReligion, CvCity* pkHolyCity);static void AfterCvGameReligions_SetHolyCity(CvGameReligions* self, ReligionTypes eReligion, CvCity* pkHolyCity);static void ReplaceCvGameReligions_SetHolyCity(void (*original)(CvGameReligions*, ReligionTypes, CvCity*), CvGameReligions* self, ReligionTypes eReligion, CvCity* pkHolyCity);CivRegisterBefore<CivHooks::CvGameReligions_SetHolyCity>(host, &BeforeCvGameReligions_SetHolyCity);CivRegisterAfter<CivHooks::CvGameReligions_SetHolyCity>(host, &AfterCvGameReligions_SetHolyCity);CivRegisterReplace<CivHooks::CvGameReligions_SetHolyCity>(host, &ReplaceCvGameReligions_SetHolyCity);

Code

1600/// Move the Holy City for a religion (useful for scenario scripting)1601void CvGameReligions::SetHolyCity(ReligionTypes eReligion, CvCity* pkHolyCity)1602{1603	ReligionList::iterator it;1604	for(it = m_CurrentReligions.begin(); it != m_CurrentReligions.end(); it++)1605	{1606		// If talking about a pantheon, make sure to match the player1607		if(it->m_eReligion == eReligion)1608		{1609			it->m_iHolyCityX = pkHolyCity->getX();1610			it->m_iHolyCityY = pkHolyCity->getY();1611			break;1612		}1613	}1614}

Calls

Called by