CvLuaUnit::lIsNone(lua_State *)
- Defined in
- Lua/CvLuaUnit.cpp, line 621
- Class
- CvLuaUnit
- Hook name
CivHooks::CvLuaUnit_lIsNone
Hooks
static bool BeforeCvLuaUnit_lIsNone(lua_State* L, int& result);static void AfterCvLuaUnit_lIsNone(lua_State* L, int& result);static int ReplaceCvLuaUnit_lIsNone(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaUnit_lIsNone>(host, &BeforeCvLuaUnit_lIsNone);CivRegisterAfter<CivHooks::CvLuaUnit_lIsNone>(host, &AfterCvLuaUnit_lIsNone);CivRegisterReplace<CivHooks::CvLuaUnit_lIsNone>(host, &ReplaceCvLuaUnit_lIsNone);
Code
620//bool isNone();621int CvLuaUnit::lIsNone(lua_State* L)622{623 const bool bDoesNotExist = (GetInstance(L, false) == NULL);624 lua_pushboolean(L, bDoesNotExist);625626 return 1;627}
Calls
CvLuaScopedInstance::GetInstancelua_pushboolean