Bazaar developer reference

CvPlayerTechs::SetCivTechPriority(TechTypes, int)

Defined in
CvTechClasses.cpp, line 922
Class
CvPlayerTechs
Hook name
CivHooks::CvPlayerTechs_SetCivTechPriority

Hooks

static bool BeforeCvPlayerTechs_SetCivTechPriority(CvPlayerTechs* self, TechTypes eIndex, int iNewValue);static void AfterCvPlayerTechs_SetCivTechPriority(CvPlayerTechs* self, TechTypes eIndex, int iNewValue);static void ReplaceCvPlayerTechs_SetCivTechPriority(void (*original)(CvPlayerTechs*, TechTypes, int), CvPlayerTechs* self, TechTypes eIndex, int iNewValue);CivRegisterBefore<CivHooks::CvPlayerTechs_SetCivTechPriority>(host, &BeforeCvPlayerTechs_SetCivTechPriority);CivRegisterAfter<CivHooks::CvPlayerTechs_SetCivTechPriority>(host, &AfterCvPlayerTechs_SetCivTechPriority);CivRegisterReplace<CivHooks::CvPlayerTechs_SetCivTechPriority>(host, &ReplaceCvPlayerTechs_SetCivTechPriority);

Code

921/// Accessor: set Civ's priority multiplier for researching techs (for instance techs that unlock civ unique bonuses)922void CvPlayerTechs::SetCivTechPriority(TechTypes eIndex, int iNewValue)923{924	CvAssertMsg(eIndex >= 0, "eIndex is expected to be non-negative (invalid Index)");925	CvAssertMsg(eIndex < GC.getNumTechInfos(), "eIndex is expected to be within maximum bounds (invalid Index)");926927	m_piCivTechPriority[eIndex] = iNewValue;928}