Bazaar developer reference

CvGameReligions::HasCreatedReligion(PlayerTypes, bool) const

Defined in
CvReligionClasses.cpp, line 1889
Class
CvGameReligions
Hook name
CivHooks::CvGameReligions_HasCreatedReligion

Hooks

static bool BeforeCvGameReligions_HasCreatedReligion(const CvGameReligions* self, PlayerTypes ePlayer, bool bIgnoreLocal, bool& result);static void AfterCvGameReligions_HasCreatedReligion(const CvGameReligions* self, PlayerTypes ePlayer, bool bIgnoreLocal, bool& result);static bool ReplaceCvGameReligions_HasCreatedReligion(bool (*original)(const CvGameReligions*, PlayerTypes, bool), const CvGameReligions* self, PlayerTypes ePlayer, bool bIgnoreLocal);CivRegisterBefore<CivHooks::CvGameReligions_HasCreatedReligion>(host, &BeforeCvGameReligions_HasCreatedReligion);CivRegisterAfter<CivHooks::CvGameReligions_HasCreatedReligion>(host, &AfterCvGameReligions_HasCreatedReligion);CivRegisterReplace<CivHooks::CvGameReligions_HasCreatedReligion>(host, &ReplaceCvGameReligions_HasCreatedReligion);

Code

1887/// Has this player created a religion?1888#if defined(MOD_RELIGION_LOCAL_RELIGIONS)1889bool CvGameReligions::HasCreatedReligion(PlayerTypes ePlayer, bool bIgnoreLocal) const1890#else1891bool CvGameReligions::HasCreatedReligion(PlayerTypes ePlayer) const1892#endif1893{1894    if (GetReligionCreatedByPlayer(ePlayer) > RELIGION_PANTHEON)1895	{1896#if defined(MOD_RELIGION_LOCAL_RELIGIONS)1897		if (MOD_RELIGION_LOCAL_RELIGIONS && bIgnoreLocal) {1898			return !(GC.getReligionInfo(GetReligionCreatedByPlayer(ePlayer))->IsLocalReligion());1899		}1900#endif19011902		return true;1903	}19041905	return false;1906}

Calls

Called by