Bazaar developer reference

CvTraitEntry::GetBuildingClassYieldChanges(BuildingClassTypes, YieldTypes) const

Defined in
CvTraitClasses.cpp, line 886
Class
CvTraitEntry
Hook name
CivHooks::CvTraitEntry_GetBuildingClassYieldChanges

Hooks

static bool BeforeCvTraitEntry_GetBuildingClassYieldChanges(const CvTraitEntry* self, BuildingClassTypes eIndex1, YieldTypes eIndex2, int& result);static void AfterCvTraitEntry_GetBuildingClassYieldChanges(const CvTraitEntry* self, BuildingClassTypes eIndex1, YieldTypes eIndex2, int& result);static int ReplaceCvTraitEntry_GetBuildingClassYieldChanges(int (*original)(const CvTraitEntry*, BuildingClassTypes, YieldTypes), const CvTraitEntry* self, BuildingClassTypes eIndex1, YieldTypes eIndex2);CivRegisterBefore<CivHooks::CvTraitEntry_GetBuildingClassYieldChanges>(host, &BeforeCvTraitEntry_GetBuildingClassYieldChanges);CivRegisterAfter<CivHooks::CvTraitEntry_GetBuildingClassYieldChanges>(host, &AfterCvTraitEntry_GetBuildingClassYieldChanges);CivRegisterReplace<CivHooks::CvTraitEntry_GetBuildingClassYieldChanges>(host, &ReplaceCvTraitEntry_GetBuildingClassYieldChanges);

Code

885#if defined(MOD_API_UNIFIED_YIELDS)886int CvTraitEntry::GetBuildingClassYieldChanges(BuildingClassTypes eIndex1, YieldTypes eIndex2) const887{888	CvAssertMsg(eIndex1 < GC.getNumBuildingClassInfos(), "Index out of bounds");889	CvAssertMsg(eIndex1 > -1, "Index out of bounds");890	CvAssertMsg(eIndex2 < NUM_YIELD_TYPES, "Index out of bounds");891	CvAssertMsg(eIndex2 > -1, "Index out of bounds");892	return m_ppiBuildingClassYieldChanges ? m_ppiBuildingClassYieldChanges[eIndex1][eIndex2] : 0;893}

Called by