Bazaar developer reference

PUF_isUnitAIType(const CvUnit *, int, int)

Defined in
CvGameCoreUtils.cpp, line 838
Hook name
CivHooks::PUF_isUnitAIType

Hooks

static bool BeforePUF_isUnitAIType(const CvUnit* pUnit, int iData1, int arg2, bool& result);static void AfterPUF_isUnitAIType(const CvUnit* pUnit, int iData1, int arg2, bool& result);static bool ReplacePUF_isUnitAIType(bool (*original)(const CvUnit*, int, int), const CvUnit* pUnit, int iData1, int arg2);CivRegisterBefore<CivHooks::PUF_isUnitAIType>(host, &BeforePUF_isUnitAIType);CivRegisterAfter<CivHooks::PUF_isUnitAIType>(host, &AfterPUF_isUnitAIType);CivRegisterReplace<CivHooks::PUF_isUnitAIType>(host, &ReplacePUF_isUnitAIType);

Code

838bool PUF_isUnitAIType(const CvUnit* pUnit, int iData1, int)839{840	CvAssertMsg(iData1 != -1, "Invalid data argument, should be >= 0");841	return (pUnit->AI_getUnitAIType() == iData1);842}

Calls