Bazaar developer reference

CvGlobals::getUnitAIInfo(UnitAITypes)

Defined in
CvGlobals.cpp, line 3064
Class
CvGlobals
Hook name
CivHooks::CvGlobals_getUnitAIInfo_with_UnitAITypes

Hooks

static bool BeforeCvGlobals_getUnitAIInfo_with_UnitAITypes(CvGlobals* self, UnitAITypes eUnitAINum, CvBaseInfo*& result);static void AfterCvGlobals_getUnitAIInfo_with_UnitAITypes(CvGlobals* self, UnitAITypes eUnitAINum, CvBaseInfo*& result);static CvBaseInfo* ReplaceCvGlobals_getUnitAIInfo_with_UnitAITypes(CvBaseInfo* (*original)(CvGlobals*, UnitAITypes), CvGlobals* self, UnitAITypes eUnitAINum);CivRegisterBefore<CivHooks::CvGlobals_getUnitAIInfo_with_UnitAITypes>(host, &BeforeCvGlobals_getUnitAIInfo_with_UnitAITypes);CivRegisterAfter<CivHooks::CvGlobals_getUnitAIInfo_with_UnitAITypes>(host, &AfterCvGlobals_getUnitAIInfo_with_UnitAITypes);CivRegisterReplace<CivHooks::CvGlobals_getUnitAIInfo_with_UnitAITypes>(host, &ReplaceCvGlobals_getUnitAIInfo_with_UnitAITypes);

Code

3064CvBaseInfo* CvGlobals::getUnitAIInfo(UnitAITypes eUnitAINum)3065{3066	CvAssert(eUnitAINum >= 0);3067	CvAssert(eUnitAINum < NUM_UNITAI_TYPES);3068	if(eUnitAINum > -1 && eUnitAINum < (int)m_paUnitAIInfos.size())3069		return m_paUnitAIInfos[eUnitAINum];3070	else3071		return NULL;3072}

Calls