Bazaar developer reference

CvLeaderHeadInfo::hasTrait(int) const

Defined in
CvInfos.cpp, line 5853
Class
CvLeaderHeadInfo
Hook name
CivHooks::CvLeaderHeadInfo_hasTrait

Hooks

static bool BeforeCvLeaderHeadInfo_hasTrait(const CvLeaderHeadInfo* self, int i, bool& result);static void AfterCvLeaderHeadInfo_hasTrait(const CvLeaderHeadInfo* self, int i, bool& result);static bool ReplaceCvLeaderHeadInfo_hasTrait(bool (*original)(const CvLeaderHeadInfo*, int), const CvLeaderHeadInfo* self, int i);CivRegisterBefore<CivHooks::CvLeaderHeadInfo_hasTrait>(host, &BeforeCvLeaderHeadInfo_hasTrait);CivRegisterAfter<CivHooks::CvLeaderHeadInfo_hasTrait>(host, &AfterCvLeaderHeadInfo_hasTrait);CivRegisterReplace<CivHooks::CvLeaderHeadInfo_hasTrait>(host, &ReplaceCvLeaderHeadInfo_hasTrait);

Code

5853bool CvLeaderHeadInfo::hasTrait(int i) const5854{5855	CvAssertMsg(i < GC.getNumTraitInfos(), "Index out of bounds");5856	CvAssertMsg(i > -1, "Index out of bounds");5857	return m_pbTraits ? m_pbTraits[i] : false;5858}

Called by