Bazaar developer reference

CvReligion::GetName() const

Defined in
CvReligionClasses.cpp, line 209
Class
CvReligion
Hook name
CivHooks::CvReligion_GetName

Hooks

static bool BeforeCvReligion_GetName(const CvReligion* self, CvString& result);static void AfterCvReligion_GetName(const CvReligion* self, CvString& result);static CvString ReplaceCvReligion_GetName(CvString (*original)(const CvReligion*), const CvReligion* self);CivRegisterBefore<CivHooks::CvReligion_GetName>(host, &BeforeCvReligion_GetName);CivRegisterAfter<CivHooks::CvReligion_GetName>(host, &AfterCvReligion_GetName);CivRegisterReplace<CivHooks::CvReligion_GetName>(host, &ReplaceCvReligion_GetName);

Code

209CvString CvReligion::GetName() const210{211	CvReligionEntry* pEntry = GC.getReligionInfo(m_eReligion);212	CvAssertMsg(pEntry, "pEntry for religion not expected to be NULL. Please send Anton or Ed your save file and version.");213	if (pEntry)214	{215		CvString szReligionName = (m_szCustomName == NULL || strlen(m_szCustomName) == 0) ? pEntry->GetDescriptionKey() : m_szCustomName;216		return szReligionName;217	}218219	const char* szReligionNameBackup = "No Religion";220	return szReligionNameBackup;221}

Calls

Called by