Bazaar developer reference

CvAICityStrategyEntry::GetFlavorValue(int) const

Defined in
CvCityStrategyAI.cpp, line 107
Class
CvAICityStrategyEntry
Hook name
CivHooks::CvAICityStrategyEntry_GetFlavorValue

Hooks

static bool BeforeCvAICityStrategyEntry_GetFlavorValue(const CvAICityStrategyEntry* self, int i, int& result);static void AfterCvAICityStrategyEntry_GetFlavorValue(const CvAICityStrategyEntry* self, int i, int& result);static int ReplaceCvAICityStrategyEntry_GetFlavorValue(int (*original)(const CvAICityStrategyEntry*, int), const CvAICityStrategyEntry* self, int i);CivRegisterBefore<CivHooks::CvAICityStrategyEntry_GetFlavorValue>(host, &BeforeCvAICityStrategyEntry_GetFlavorValue);CivRegisterAfter<CivHooks::CvAICityStrategyEntry_GetFlavorValue>(host, &AfterCvAICityStrategyEntry_GetFlavorValue);CivRegisterReplace<CivHooks::CvAICityStrategyEntry_GetFlavorValue>(host, &ReplaceCvAICityStrategyEntry_GetFlavorValue);

Code

106/// What Flavors will be added by adopting this Strategy?107int CvAICityStrategyEntry::GetFlavorValue(int i) const108{109	CvAssertMsg(i < GC.getNumFlavorTypes(), "Index out of bounds");110	CvAssertMsg(i > -1, "Index out of bounds");111	return m_piFlavorValue ? m_piFlavorValue[i] : -1;112}

Called by