Bazaar developer reference

CvLuaUnit::lGetUnitAIType(lua_State *)

Defined in
Lua/CvLuaUnit.cpp, line 1954
Class
CvLuaUnit
Hook name
CivHooks::CvLuaUnit_lGetUnitAIType

Hooks

static bool BeforeCvLuaUnit_lGetUnitAIType(lua_State* L, int& result);static void AfterCvLuaUnit_lGetUnitAIType(lua_State* L, int& result);static int ReplaceCvLuaUnit_lGetUnitAIType(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaUnit_lGetUnitAIType>(host, &BeforeCvLuaUnit_lGetUnitAIType);CivRegisterAfter<CivHooks::CvLuaUnit_lGetUnitAIType>(host, &AfterCvLuaUnit_lGetUnitAIType);CivRegisterReplace<CivHooks::CvLuaUnit_lGetUnitAIType>(host, &ReplaceCvLuaUnit_lGetUnitAIType);

Code

1953//int /*UnitAITypes*/ getUnitAIType();1954int CvLuaUnit::lGetUnitAIType(lua_State* L)1955{1956	CvUnit* pkUnit = GetInstance(L);19571958	const UnitAITypes eResult = pkUnit->AI_getUnitAIType();1959	lua_pushinteger(L, eResult);1960	return 1;1961}

Calls

Called by