Bazaar developer reference

CvTraitEntry::GetSpecialistYieldChanges(SpecialistTypes, YieldTypes) const

Defined in
CvTraitClasses.cpp, line 977
Class
CvTraitEntry
Hook name
CivHooks::CvTraitEntry_GetSpecialistYieldChanges

Hooks

static bool BeforeCvTraitEntry_GetSpecialistYieldChanges(const CvTraitEntry* self, SpecialistTypes eIndex1, YieldTypes eIndex2, int& result);static void AfterCvTraitEntry_GetSpecialistYieldChanges(const CvTraitEntry* self, SpecialistTypes eIndex1, YieldTypes eIndex2, int& result);static int ReplaceCvTraitEntry_GetSpecialistYieldChanges(int (*original)(const CvTraitEntry*, SpecialistTypes, YieldTypes), const CvTraitEntry* self, SpecialistTypes eIndex1, YieldTypes eIndex2);CivRegisterBefore<CivHooks::CvTraitEntry_GetSpecialistYieldChanges>(host, &BeforeCvTraitEntry_GetSpecialistYieldChanges);CivRegisterAfter<CivHooks::CvTraitEntry_GetSpecialistYieldChanges>(host, &AfterCvTraitEntry_GetSpecialistYieldChanges);CivRegisterReplace<CivHooks::CvTraitEntry_GetSpecialistYieldChanges>(host, &ReplaceCvTraitEntry_GetSpecialistYieldChanges);

Code

976/// Accessor:: Extra yield from an improvement977int CvTraitEntry::GetSpecialistYieldChanges(SpecialistTypes eIndex1, YieldTypes eIndex2) const978{979	CvAssertMsg(eIndex1 < GC.getNumSpecialistInfos(), "Index out of bounds");980	CvAssertMsg(eIndex1 > -1, "Index out of bounds");981	CvAssertMsg(eIndex2 < NUM_YIELD_TYPES, "Index out of bounds");982	CvAssertMsg(eIndex2 > -1, "Index out of bounds");983	return m_ppiSpecialistYieldChanges ? m_ppiSpecialistYieldChanges[eIndex1][eIndex2] : 0;984}

Called by