Hooks
static bool BeforeCvAIGrandStrategyXMLEntry_CacheResults(CvAIGrandStrategyXMLEntry* self, Database::Results& kResults, CvDatabaseUtility& kUtility, bool& result);static void AfterCvAIGrandStrategyXMLEntry_CacheResults(CvAIGrandStrategyXMLEntry* self, Database::Results& kResults, CvDatabaseUtility& kUtility, bool& result);static bool ReplaceCvAIGrandStrategyXMLEntry_CacheResults(bool (*original)(CvAIGrandStrategyXMLEntry*, Database::Results&, CvDatabaseUtility&), CvAIGrandStrategyXMLEntry* self, Database::Results& kResults, CvDatabaseUtility& kUtility);CivRegisterBefore<CivHooks::CvAIGrandStrategyXMLEntry_CacheResults>(host, &BeforeCvAIGrandStrategyXMLEntry_CacheResults);CivRegisterAfter<CivHooks::CvAIGrandStrategyXMLEntry_CacheResults>(host, &AfterCvAIGrandStrategyXMLEntry_CacheResults);CivRegisterReplace<CivHooks::CvAIGrandStrategyXMLEntry_CacheResults>(host, &ReplaceCvAIGrandStrategyXMLEntry_CacheResults);
Code
34bool CvAIGrandStrategyXMLEntry::CacheResults(Database::Results& kResults, CvDatabaseUtility& kUtility)35{36 if(!CvBaseInfo::CacheResults(kResults, kUtility))37 return false;3839 //Arrays40 const char* szType = GetType();41 kUtility.SetFlavors(m_piFlavorValue, "AIGrandStrategy_Flavors", "AIGrandStrategyType", szType);42 kUtility.SetYields(m_piSpecializationBoost, "AIGrandStrategy_Yields", "AIGrandStrategyType", szType);43 kUtility.SetFlavors(m_piFlavorModValue, "AIGrandStrategy_FlavorMods", "AIGrandStrategyType", szType);4445 return true;46}