Bazaar developer reference

CvLuaUnit::lSetUnitAIType(lua_State *)

Defined in
Lua/CvLuaUnit.cpp, line 1964
Class
CvLuaUnit
Hook name
CivHooks::CvLuaUnit_lSetUnitAIType

Hooks

static bool BeforeCvLuaUnit_lSetUnitAIType(lua_State* L, int& result);static void AfterCvLuaUnit_lSetUnitAIType(lua_State* L, int& result);static int ReplaceCvLuaUnit_lSetUnitAIType(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaUnit_lSetUnitAIType>(host, &BeforeCvLuaUnit_lSetUnitAIType);CivRegisterAfter<CivHooks::CvLuaUnit_lSetUnitAIType>(host, &AfterCvLuaUnit_lSetUnitAIType);CivRegisterReplace<CivHooks::CvLuaUnit_lSetUnitAIType>(host, &ReplaceCvLuaUnit_lSetUnitAIType);

Code

1963//void setUnitAIType(UnitAITypes eNewValue);1964int CvLuaUnit::lSetUnitAIType(lua_State* L)1965{1966	CvUnit* pkUnit = GetInstance(L);1967	const UnitAITypes eUnitAI = (UnitAITypes)lua_tointeger(L, 2);1968	pkUnit->AI_setUnitAIType(eUnitAI);1969	return 1;1970}

Calls

Called by