Bazaar developer reference

CvGameReligions::HasBeenFounded(ReligionTypes)

Defined in
CvReligionClasses.cpp, line 2578
Class
CvGameReligions
Hook name
CivHooks::CvGameReligions_HasBeenFounded

Hooks

static bool BeforeCvGameReligions_HasBeenFounded(CvGameReligions* self, ReligionTypes eReligion, bool& result);static void AfterCvGameReligions_HasBeenFounded(CvGameReligions* self, ReligionTypes eReligion, bool& result);static bool ReplaceCvGameReligions_HasBeenFounded(bool (*original)(CvGameReligions*, ReligionTypes), CvGameReligions* self, ReligionTypes eReligion);CivRegisterBefore<CivHooks::CvGameReligions_HasBeenFounded>(host, &BeforeCvGameReligions_HasBeenFounded);CivRegisterAfter<CivHooks::CvGameReligions_HasBeenFounded>(host, &AfterCvGameReligions_HasBeenFounded);CivRegisterReplace<CivHooks::CvGameReligions_HasBeenFounded>(host, &ReplaceCvGameReligions_HasBeenFounded);

Code

2577/// Has this religion already been founded?2578bool CvGameReligions::HasBeenFounded(ReligionTypes eReligion)2579{2580	ReligionList::const_iterator it;2581	for(it = m_CurrentReligions.begin(); it != m_CurrentReligions.end(); it++)2582	{2583		if(it->m_eReligion == eReligion)2584		{2585			return true;2586		}2587	}25882589	return false;2590}

Calls

Called by