Bazaar developer reference

CvSpecialistInfo::getFlavorValue(int) const

Defined in
CvInfos.cpp, line 782
Class
CvSpecialistInfo
Hook name
CivHooks::CvSpecialistInfo_getFlavorValue

Hooks

static bool BeforeCvSpecialistInfo_getFlavorValue(const CvSpecialistInfo* self, int i, int& result);static void AfterCvSpecialistInfo_getFlavorValue(const CvSpecialistInfo* self, int i, int& result);static int ReplaceCvSpecialistInfo_getFlavorValue(int (*original)(const CvSpecialistInfo*, int), const CvSpecialistInfo* self, int i);CivRegisterBefore<CivHooks::CvSpecialistInfo_getFlavorValue>(host, &BeforeCvSpecialistInfo_getFlavorValue);CivRegisterAfter<CivHooks::CvSpecialistInfo_getFlavorValue>(host, &AfterCvSpecialistInfo_getFlavorValue);CivRegisterReplace<CivHooks::CvSpecialistInfo_getFlavorValue>(host, &ReplaceCvSpecialistInfo_getFlavorValue);

Code

782int CvSpecialistInfo::getFlavorValue(int i) const783{784	CvAssertMsg(i < GC.getNumFlavorTypes(), "Index out of bounds");785	CvAssertMsg(i > -1, "Index out of bounds");786	return m_piFlavorValue ? m_piFlavorValue[i] : 0;787}