Bazaar developer reference

CvTraitEntry::GetPlotYieldChanges(PlotTypes, YieldTypes) const

Defined in
CvTraitClasses.cpp, line 871
Class
CvTraitEntry
Hook name
CivHooks::CvTraitEntry_GetPlotYieldChanges

Hooks

static bool BeforeCvTraitEntry_GetPlotYieldChanges(const CvTraitEntry* self, PlotTypes eIndex1, YieldTypes eIndex2, int& result);static void AfterCvTraitEntry_GetPlotYieldChanges(const CvTraitEntry* self, PlotTypes eIndex1, YieldTypes eIndex2, int& result);static int ReplaceCvTraitEntry_GetPlotYieldChanges(int (*original)(const CvTraitEntry*, PlotTypes, YieldTypes), const CvTraitEntry* self, PlotTypes eIndex1, YieldTypes eIndex2);CivRegisterBefore<CivHooks::CvTraitEntry_GetPlotYieldChanges>(host, &BeforeCvTraitEntry_GetPlotYieldChanges);CivRegisterAfter<CivHooks::CvTraitEntry_GetPlotYieldChanges>(host, &AfterCvTraitEntry_GetPlotYieldChanges);CivRegisterReplace<CivHooks::CvTraitEntry_GetPlotYieldChanges>(host, &ReplaceCvTraitEntry_GetPlotYieldChanges);

Code

869#if defined(MOD_API_UNIFIED_YIELDS) && defined(MOD_API_PLOT_YIELDS)870/// Accessor:: Extra yield from a plot871int CvTraitEntry::GetPlotYieldChanges(PlotTypes eIndex1, YieldTypes eIndex2) const872{873	if (MOD_API_PLOT_YIELDS) {874		CvAssertMsg(eIndex1 < GC.getNumPlotInfos(), "Index out of bounds");875		CvAssertMsg(eIndex1 > -1, "Index out of bounds");876		CvAssertMsg(eIndex2 < NUM_YIELD_TYPES, "Index out of bounds");877		CvAssertMsg(eIndex2 > -1, "Index out of bounds");878		return m_ppiPlotYieldChanges ? m_ppiPlotYieldChanges[eIndex1][eIndex2] : 0;879	} else {880		return 0;881	}882}

Calls

Called by