private static int _CreateLuaGameInfo(IntPtr L) { if (LuaDLL.lua_gettop(L) == 0) { LuaGameInfo o = new LuaGameInfo(); LuaScriptMgr.PushObject(L, o); return(1); } LuaDLL.luaL_error(L, "invalid arguments to method: LuaGameInfo.New"); return(0); }
static int _CreateLuaGameInfo(IntPtr L) { int count = LuaDLL.lua_gettop(L); if (count == 0) { LuaGameInfo obj = new LuaGameInfo(); LuaScriptMgr.PushObject(L, obj); return(1); } else { LuaDLL.luaL_error(L, "invalid arguments to method: LuaGameInfo.New"); } return(0); }
private static int get_exp(IntPtr L) { object luaObject = LuaScriptMgr.GetLuaObject(L, 1); LuaGameInfo luaGameInfo = (LuaGameInfo)luaObject; if (luaGameInfo == null) { LuaTypes luaTypes = LuaDLL.lua_type(L, 1); if (luaTypes == LuaTypes.LUA_TTABLE) { LuaDLL.luaL_error(L, "unknown member name exp"); } else { LuaDLL.luaL_error(L, "attempt to index exp on a nil value"); } } LuaScriptMgr.Push(L, luaGameInfo.exp); return(1); }
private static int set_draggon(IntPtr L) { object luaObject = LuaScriptMgr.GetLuaObject(L, 1); LuaGameInfo luaGameInfo = (LuaGameInfo)luaObject; if (luaGameInfo == null) { LuaTypes luaTypes = LuaDLL.lua_type(L, 1); if (luaTypes == LuaTypes.LUA_TTABLE) { LuaDLL.luaL_error(L, "unknown member name draggon"); } else { LuaDLL.luaL_error(L, "attempt to index draggon on a nil value"); } } luaGameInfo.draggon = (uint)LuaScriptMgr.GetNumber(L, 3); return(0); }
private static int set_name(IntPtr L) { object luaObject = LuaScriptMgr.GetLuaObject(L, 1); LuaGameInfo luaGameInfo = (LuaGameInfo)luaObject; if (luaGameInfo == null) { LuaTypes luaTypes = LuaDLL.lua_type(L, 1); if (luaTypes == LuaTypes.LUA_TTABLE) { LuaDLL.luaL_error(L, "unknown member name name"); } else { LuaDLL.luaL_error(L, "attempt to index name on a nil value"); } } luaGameInfo.name = LuaScriptMgr.GetString(L, 3); return(0); }
static int get_name(IntPtr L) { object o = LuaScriptMgr.GetLuaObject(L, 1); LuaGameInfo obj = (LuaGameInfo)o; if (obj == null) { LuaTypes types = LuaDLL.lua_type(L, 1); if (types == LuaTypes.LUA_TTABLE) { LuaDLL.luaL_error(L, "unknown member name name"); } else { LuaDLL.luaL_error(L, "attempt to index name on a nil value"); } } LuaScriptMgr.Push(L, obj.name); return(1); }
static int set_energy(IntPtr L) { object o = LuaScriptMgr.GetLuaObject(L, 1); LuaGameInfo obj = (LuaGameInfo)o; if (obj == null) { LuaTypes types = LuaDLL.lua_type(L, 1); if (types == LuaTypes.LUA_TTABLE) { LuaDLL.luaL_error(L, "unknown member name energy"); } else { LuaDLL.luaL_error(L, "attempt to index energy on a nil value"); } } obj.energy = (uint)LuaScriptMgr.GetNumber(L, 3); return(0); }