Bazaar developer reference

CvProjectEntry::GetFlavorValue(int) const

Defined in
CvProjectClasses.cpp, line 175
Class
CvProjectEntry
Hook name
CivHooks::CvProjectEntry_GetFlavorValue

Hooks

static bool BeforeCvProjectEntry_GetFlavorValue(const CvProjectEntry* self, int i, int& result);static void AfterCvProjectEntry_GetFlavorValue(const CvProjectEntry* self, int i, int& result);static int ReplaceCvProjectEntry_GetFlavorValue(int (*original)(const CvProjectEntry*, int), const CvProjectEntry* self, int i);CivRegisterBefore<CivHooks::CvProjectEntry_GetFlavorValue>(host, &BeforeCvProjectEntry_GetFlavorValue);CivRegisterAfter<CivHooks::CvProjectEntry_GetFlavorValue>(host, &AfterCvProjectEntry_GetFlavorValue);CivRegisterReplace<CivHooks::CvProjectEntry_GetFlavorValue>(host, &ReplaceCvProjectEntry_GetFlavorValue);

Code

174/// Find value of flavors associated with this building175int CvProjectEntry::GetFlavorValue(int i) const176{177	CvAssertMsg(i < GC.getNumFlavorTypes(), "Index out of bounds");178	CvAssertMsg(i > -1, "Index out of bounds");179180	if(i > -1 && i < GC.getNumFlavorTypes() && m_piFlavorValue)181	{182		return  m_piFlavorValue[i];183	}184185	return 0;186}

Calls

Called by