Bazaar developer reference

CvAIGrandStrategyXMLEntry::GetSpecializationBoost(YieldTypes) const

Defined in
CvGrandStrategyAI.cpp, line 57
Class
CvAIGrandStrategyXMLEntry
Hook name
CivHooks::CvAIGrandStrategyXMLEntry_GetSpecializationBoost

Hooks

static bool BeforeCvAIGrandStrategyXMLEntry_GetSpecializationBoost(const CvAIGrandStrategyXMLEntry* self, YieldTypes eYield, int& result);static void AfterCvAIGrandStrategyXMLEntry_GetSpecializationBoost(const CvAIGrandStrategyXMLEntry* self, YieldTypes eYield, int& result);static int ReplaceCvAIGrandStrategyXMLEntry_GetSpecializationBoost(int (*original)(const CvAIGrandStrategyXMLEntry*, YieldTypes), const CvAIGrandStrategyXMLEntry* self, YieldTypes eYield);CivRegisterBefore<CivHooks::CvAIGrandStrategyXMLEntry_GetSpecializationBoost>(host, &BeforeCvAIGrandStrategyXMLEntry_GetSpecializationBoost);CivRegisterAfter<CivHooks::CvAIGrandStrategyXMLEntry_GetSpecializationBoost>(host, &AfterCvAIGrandStrategyXMLEntry_GetSpecializationBoost);CivRegisterReplace<CivHooks::CvAIGrandStrategyXMLEntry_GetSpecializationBoost>(host, &ReplaceCvAIGrandStrategyXMLEntry_GetSpecializationBoost);

Code

56/// What Flavors will be added by adopting this Grand Strategy?57int CvAIGrandStrategyXMLEntry::GetSpecializationBoost(YieldTypes eYield) const58{59	FAssertMsg(eYield < NUM_YIELD_TYPES, "Index out of bounds");60	FAssertMsg(eYield > -1, "Index out of bounds");61	return m_piSpecializationBoost ? m_piSpecializationBoost[(int)eYield] : 0;62}

Called by