Bazaar developer reference

CvGreatPersonInfo::CacheResults(Database::Results &, CvDatabaseUtility &)

Defined in
CvGreatPersonInfo.cpp, line 29
Class
CvGreatPersonInfo
Hook name
CivHooks::CvGreatPersonInfo_CacheResults
Overrides
CvBaseInfo::CacheResults(Database::Results &, CvDatabaseUtility &)

Hooks

static bool BeforeCvGreatPersonInfo_CacheResults(CvGreatPersonInfo* self, Database::Results& kResults, CvDatabaseUtility& kUtility, bool& result);static void AfterCvGreatPersonInfo_CacheResults(CvGreatPersonInfo* self, Database::Results& kResults, CvDatabaseUtility& kUtility, bool& result);static bool ReplaceCvGreatPersonInfo_CacheResults(bool (*original)(CvGreatPersonInfo*, Database::Results&, CvDatabaseUtility&), CvGreatPersonInfo* self, Database::Results& kResults, CvDatabaseUtility& kUtility);CivRegisterBefore<CivHooks::CvGreatPersonInfo_CacheResults>(host, &BeforeCvGreatPersonInfo_CacheResults);CivRegisterAfter<CivHooks::CvGreatPersonInfo_CacheResults>(host, &AfterCvGreatPersonInfo_CacheResults);CivRegisterReplace<CivHooks::CvGreatPersonInfo_CacheResults>(host, &ReplaceCvGreatPersonInfo_CacheResults);

Code

29bool CvGreatPersonInfo::CacheResults(Database::Results& kResults, CvDatabaseUtility& kUtility)30{31	if(!CvBaseInfo::CacheResults(kResults, kUtility))32		return false;3334	const char* szTextVal = NULL;3536	szTextVal = kResults.GetText("Class");37	m_iUnitClass = GC.getInfoTypeForString(szTextVal, true);3839	szTextVal = kResults.GetText("Specialist");40	m_iSpecialist = GC.getInfoTypeForString(szTextVal, true);4142	return true;43}

Calls