Bazaar developer reference

CvPolicyEntry::GetFlavorValue(int) const

Defined in
CvPolicyClasses.cpp, line 2275
Class
CvPolicyEntry
Hook name
CivHooks::CvPolicyEntry_GetFlavorValue

Hooks

static bool BeforeCvPolicyEntry_GetFlavorValue(const CvPolicyEntry* self, int i, int& result);static void AfterCvPolicyEntry_GetFlavorValue(const CvPolicyEntry* self, int i, int& result);static int ReplaceCvPolicyEntry_GetFlavorValue(int (*original)(const CvPolicyEntry*, int), const CvPolicyEntry* self, int i);CivRegisterBefore<CivHooks::CvPolicyEntry_GetFlavorValue>(host, &BeforeCvPolicyEntry_GetFlavorValue);CivRegisterAfter<CivHooks::CvPolicyEntry_GetFlavorValue>(host, &AfterCvPolicyEntry_GetFlavorValue);CivRegisterReplace<CivHooks::CvPolicyEntry_GetFlavorValue>(host, &ReplaceCvPolicyEntry_GetFlavorValue);

Code

2274/// Find value of flavors associated with this policy2275int CvPolicyEntry::GetFlavorValue(int i) const2276{2277	CvAssertMsg(i < GC.getNumFlavorTypes(), "Index out of bounds");2278	CvAssertMsg(i > -1, "Index out of bounds");2279	return m_piFlavorValue ? m_piFlavorValue[i] : 0;2280}

Called by