Bazaar developer reference

CvUnitEntry::GetGreatWorks(int) const

Defined in
CvUnitClasses.cpp, line 1256
Class
CvUnitEntry
Hook name
CivHooks::CvUnitEntry_GetGreatWorks

Hooks

static bool BeforeCvUnitEntry_GetGreatWorks(const CvUnitEntry* self, int i, GreatWorkType& result);static void AfterCvUnitEntry_GetGreatWorks(const CvUnitEntry* self, int i, GreatWorkType& result);static GreatWorkType ReplaceCvUnitEntry_GetGreatWorks(GreatWorkType (*original)(const CvUnitEntry*, int), const CvUnitEntry* self, int i);CivRegisterBefore<CivHooks::CvUnitEntry_GetGreatWorks>(host, &BeforeCvUnitEntry_GetGreatWorks);CivRegisterAfter<CivHooks::CvUnitEntry_GetGreatWorks>(host, &AfterCvUnitEntry_GetGreatWorks);CivRegisterReplace<CivHooks::CvUnitEntry_GetGreatWorks>(host, &ReplaceCvUnitEntry_GetGreatWorks);

Code

1255/// Unique great works created by individual units.1256GreatWorkType CvUnitEntry::GetGreatWorks(int i) const1257{1258	CvAssertMsg(i < GetNumUnitNames(), "Index out of bounds");1259	CvAssertMsg(i > -1, "Index out of bounds");1260	return (m_paeGreatWorks) ? m_paeGreatWorks[i] : NO_GREAT_WORK;1261}

Called by