Exemplo n.º 1
0
    static int _CreateOneByOne_UserDTO(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

        if (count == 0)
        {
            OneByOne.UserDTO obj = new OneByOne.UserDTO();
            LuaScriptMgr.PushObject(L, obj);
            return(1);
        }
        else if (count == 9)
        {
            string           arg0 = LuaScriptMgr.GetString(L, 1);
            int              arg1 = (int)LuaScriptMgr.GetNumber(L, 2);
            int              arg2 = (int)LuaScriptMgr.GetNumber(L, 3);
            int              arg3 = (int)LuaScriptMgr.GetNumber(L, 4);
            int              arg4 = (int)LuaScriptMgr.GetNumber(L, 5);
            int              arg5 = (int)LuaScriptMgr.GetNumber(L, 6);
            List <int>       arg6 = (List <int>)LuaScriptMgr.GetNetObject(L, 7, typeof(List <int>));
            bool             arg7 = LuaScriptMgr.GetBoolean(L, 8);
            bool             arg8 = LuaScriptMgr.GetBoolean(L, 9);
            OneByOne.UserDTO obj  = new OneByOne.UserDTO(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
            LuaScriptMgr.PushObject(L, obj);
            return(1);
        }
        else
        {
            LuaDLL.luaL_error(L, "invalid arguments to method: OneByOne.UserDTO.New");
        }

        return(0);
    }
Exemplo n.º 2
0
    static int get_id(IntPtr L)
    {
        object o = LuaScriptMgr.GetLuaObject(L, 1);

        OneByOne.UserDTO obj = (OneByOne.UserDTO)o;

        if (obj == null)
        {
            LuaTypes types = LuaDLL.lua_type(L, 1);

            if (types == LuaTypes.LUA_TTABLE)
            {
                LuaDLL.luaL_error(L, "unknown member name id");
            }
            else
            {
                LuaDLL.luaL_error(L, "attempt to index id on a nil value");
            }
        }

        LuaScriptMgr.Push(L, obj.id);
        return(1);
    }
Exemplo n.º 3
0
    static int set_isAIHost(IntPtr L)
    {
        object o = LuaScriptMgr.GetLuaObject(L, 1);

        OneByOne.UserDTO obj = (OneByOne.UserDTO)o;

        if (obj == null)
        {
            LuaTypes types = LuaDLL.lua_type(L, 1);

            if (types == LuaTypes.LUA_TTABLE)
            {
                LuaDLL.luaL_error(L, "unknown member name isAIHost");
            }
            else
            {
                LuaDLL.luaL_error(L, "attempt to index isAIHost on a nil value");
            }
        }

        obj.isAIHost = LuaScriptMgr.GetBoolean(L, 3);
        return(0);
    }
Exemplo n.º 4
0
    static int set_heroList(IntPtr L)
    {
        object o = LuaScriptMgr.GetLuaObject(L, 1);

        OneByOne.UserDTO obj = (OneByOne.UserDTO)o;

        if (obj == null)
        {
            LuaTypes types = LuaDLL.lua_type(L, 1);

            if (types == LuaTypes.LUA_TTABLE)
            {
                LuaDLL.luaL_error(L, "unknown member name heroList");
            }
            else
            {
                LuaDLL.luaL_error(L, "attempt to index heroList on a nil value");
            }
        }

        obj.heroList = (List <int>)LuaScriptMgr.GetNetObject(L, 3, typeof(List <int>));
        return(0);
    }
Exemplo n.º 5
0
    static int set_ranCount(IntPtr L)
    {
        object o = LuaScriptMgr.GetLuaObject(L, 1);

        OneByOne.UserDTO obj = (OneByOne.UserDTO)o;

        if (obj == null)
        {
            LuaTypes types = LuaDLL.lua_type(L, 1);

            if (types == LuaTypes.LUA_TTABLE)
            {
                LuaDLL.luaL_error(L, "unknown member name ranCount");
            }
            else
            {
                LuaDLL.luaL_error(L, "attempt to index ranCount on a nil value");
            }
        }

        obj.ranCount = (int)LuaScriptMgr.GetNumber(L, 3);
        return(0);
    }
Exemplo n.º 6
0
    static int set_name(IntPtr L)
    {
        object o = LuaScriptMgr.GetLuaObject(L, 1);

        OneByOne.UserDTO obj = (OneByOne.UserDTO)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");
            }
        }

        obj.name = LuaScriptMgr.GetString(L, 3);
        return(0);
    }