Bazaar developer reference

CvPlayerTechs::GetCivTechPriority(TechTypes) const

Defined in
CvTechClasses.cpp, line 931
Class
CvPlayerTechs
Hook name
CivHooks::CvPlayerTechs_GetCivTechPriority

Hooks

static bool BeforeCvPlayerTechs_GetCivTechPriority(const CvPlayerTechs* self, TechTypes eIndex, int& result);static void AfterCvPlayerTechs_GetCivTechPriority(const CvPlayerTechs* self, TechTypes eIndex, int& result);static int ReplaceCvPlayerTechs_GetCivTechPriority(int (*original)(const CvPlayerTechs*, TechTypes), const CvPlayerTechs* self, TechTypes eIndex);CivRegisterBefore<CivHooks::CvPlayerTechs_GetCivTechPriority>(host, &BeforeCvPlayerTechs_GetCivTechPriority);CivRegisterAfter<CivHooks::CvPlayerTechs_GetCivTechPriority>(host, &AfterCvPlayerTechs_GetCivTechPriority);CivRegisterReplace<CivHooks::CvPlayerTechs_GetCivTechPriority>(host, &ReplaceCvPlayerTechs_GetCivTechPriority);

Code

930/// Accessor: get Civ's priority multiplier for researching techs (for instance techs that unlock civ unique bonuses)931int CvPlayerTechs::GetCivTechPriority(TechTypes eIndex) const932{933	CvAssertMsg(eIndex >= 0, "eIndex is expected to be non-negative (invalid Index)");934	CvAssertMsg(eIndex < GC.getNumTechInfos(), "eIndex is expected to be within maximum bounds (invalid Index)");935	return m_piCivTechPriority[eIndex];936}

Called by