Bazaar developer reference

CvPlayerTechs::GetLocaleTechPriority(TechTypes) const

Defined in
CvTechClasses.cpp, line 948
Class
CvPlayerTechs
Hook name
CivHooks::CvPlayerTechs_GetLocaleTechPriority

Hooks

static bool BeforeCvPlayerTechs_GetLocaleTechPriority(const CvPlayerTechs* self, TechTypes eIndex, int& result);static void AfterCvPlayerTechs_GetLocaleTechPriority(const CvPlayerTechs* self, TechTypes eIndex, int& result);static int ReplaceCvPlayerTechs_GetLocaleTechPriority(int (*original)(const CvPlayerTechs*, TechTypes), const CvPlayerTechs* self, TechTypes eIndex);CivRegisterBefore<CivHooks::CvPlayerTechs_GetLocaleTechPriority>(host, &BeforeCvPlayerTechs_GetLocaleTechPriority);CivRegisterAfter<CivHooks::CvPlayerTechs_GetLocaleTechPriority>(host, &AfterCvPlayerTechs_GetLocaleTechPriority);CivRegisterReplace<CivHooks::CvPlayerTechs_GetLocaleTechPriority>(host, &ReplaceCvPlayerTechs_GetLocaleTechPriority);

Code

947/// Accessor: get locale priority multiplier for researching techs (for instance techs that unlock nearby resources)948int CvPlayerTechs::GetLocaleTechPriority(TechTypes eIndex) const949{950	CvAssertMsg(eIndex >= 0, "eIndex is expected to be non-negative (invalid Index)");951	CvAssertMsg(eIndex < GC.getNumTechInfos(), "eIndex is expected to be within maximum bounds (invalid Index)");952	return m_piLocaleTechPriority[eIndex];953}

Called by