Bazaar developer reference

CvGlobals::getGreatPersonInfo(GreatPersonTypes)

Defined in
CvGlobals.cpp, line 2750
Class
CvGlobals
Hook name
CivHooks::CvGlobals_getGreatPersonInfo_with_GreatPersonTypes

Hooks

static bool BeforeCvGlobals_getGreatPersonInfo_with_GreatPersonTypes(CvGlobals* self, GreatPersonTypes eGreatPersonNum, CvGreatPersonInfo*& result);static void AfterCvGlobals_getGreatPersonInfo_with_GreatPersonTypes(CvGlobals* self, GreatPersonTypes eGreatPersonNum, CvGreatPersonInfo*& result);static CvGreatPersonInfo* ReplaceCvGlobals_getGreatPersonInfo_with_GreatPersonTypes(CvGreatPersonInfo* (*original)(CvGlobals*, GreatPersonTypes), CvGlobals* self, GreatPersonTypes eGreatPersonNum);CivRegisterBefore<CivHooks::CvGlobals_getGreatPersonInfo_with_GreatPersonTypes>(host, &BeforeCvGlobals_getGreatPersonInfo_with_GreatPersonTypes);CivRegisterAfter<CivHooks::CvGlobals_getGreatPersonInfo_with_GreatPersonTypes>(host, &AfterCvGlobals_getGreatPersonInfo_with_GreatPersonTypes);CivRegisterReplace<CivHooks::CvGlobals_getGreatPersonInfo_with_GreatPersonTypes>(host, &ReplaceCvGlobals_getGreatPersonInfo_with_GreatPersonTypes);

Code

2750CvGreatPersonInfo* CvGlobals::getGreatPersonInfo(GreatPersonTypes eGreatPersonNum)2751{2752	if (MOD_API_UNIFIED_YIELDS) {2753		CvAssert(eGreatPersonNum > -1);2754		CvAssert(eGreatPersonNum < GC.getNumGreatPersonInfos());2755		if(eGreatPersonNum > -1 && eGreatPersonNum < (int)m_paGreatPersonInfo.size())2756			return m_paGreatPersonInfo[eGreatPersonNum];2757		else2758			return NULL;2759	} else {2760		return NULL;2761	}2762}

Calls

Called by