Esempio n. 1
0
    static int FindLast(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 2);
        List <fogs.proto.msg.MailInfo>      obj  = (List <fogs.proto.msg.MailInfo>)LuaScriptMgr.GetNetObjectSelf(L, 1, "List<fogs.proto.msg.MailInfo>");
        Predicate <fogs.proto.msg.MailInfo> arg0 = null;
        LuaTypes funcType2 = LuaDLL.lua_type(L, 2);

        if (funcType2 != LuaTypes.LUA_TFUNCTION)
        {
            arg0 = (Predicate <fogs.proto.msg.MailInfo>)LuaScriptMgr.GetNetObject(L, 2, typeof(Predicate <fogs.proto.msg.MailInfo>));
        }
        else
        {
            LuaFunction func = LuaScriptMgr.GetLuaFunction(L, 2);
            arg0 = (param0) =>
            {
                int top = func.BeginPCall();
                LuaScriptMgr.PushObject(L, param0);
                func.PCall(top, 1);
                object[] objs = func.PopValues(top);
                func.EndPCall(top);
                return((bool)objs[0]);
            };
        }

        fogs.proto.msg.MailInfo o = obj.FindLast(arg0);
        LuaScriptMgr.PushObject(L, o);
        return(1);
    }
Esempio n. 2
0
    static int Add(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 2);
        List <fogs.proto.msg.MailInfo> obj = (List <fogs.proto.msg.MailInfo>)LuaScriptMgr.GetNetObjectSelf(L, 1, "List<fogs.proto.msg.MailInfo>");

        fogs.proto.msg.MailInfo arg0 = (fogs.proto.msg.MailInfo)LuaScriptMgr.GetNetObject(L, 2, typeof(fogs.proto.msg.MailInfo));
        obj.Add(arg0);
        return(0);
    }
Esempio n. 3
0
    static int get_Item(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 2);
        List <fogs.proto.msg.MailInfo> obj = (List <fogs.proto.msg.MailInfo>)LuaScriptMgr.GetNetObjectSelf(L, 1, "List<fogs.proto.msg.MailInfo>");
        int arg0 = (int)LuaScriptMgr.GetNumber(L, 2);

        fogs.proto.msg.MailInfo o = obj[arg0];
        LuaScriptMgr.PushObject(L, o);
        return(1);
    }
Esempio n. 4
0
    static int Insert(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 3);
        List <fogs.proto.msg.MailInfo> obj = (List <fogs.proto.msg.MailInfo>)LuaScriptMgr.GetNetObjectSelf(L, 1, "List<fogs.proto.msg.MailInfo>");
        int arg0 = (int)LuaScriptMgr.GetNumber(L, 2);

        fogs.proto.msg.MailInfo arg1 = (fogs.proto.msg.MailInfo)LuaScriptMgr.GetNetObject(L, 3, typeof(fogs.proto.msg.MailInfo));
        obj.Insert(arg0, arg1);
        return(0);
    }
Esempio n. 5
0
    static int Remove(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 2);
        List <fogs.proto.msg.MailInfo> obj = (List <fogs.proto.msg.MailInfo>)LuaScriptMgr.GetNetObjectSelf(L, 1, "List<fogs.proto.msg.MailInfo>");

        fogs.proto.msg.MailInfo arg0 = (fogs.proto.msg.MailInfo)LuaScriptMgr.GetNetObject(L, 2, typeof(fogs.proto.msg.MailInfo));
        bool o = obj.Remove(arg0);

        LuaScriptMgr.Push(L, o);
        return(1);
    }
Esempio n. 6
0
    static int _Createfogs_proto_msg_MailInfo(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

        if (count == 0)
        {
            fogs.proto.msg.MailInfo obj = new fogs.proto.msg.MailInfo();
            LuaScriptMgr.PushObject(L, obj);
            return(1);
        }
        else
        {
            LuaDLL.luaL_error(L, "invalid arguments to method: fogs.proto.msg.MailInfo.New");
        }

        return(0);
    }
Esempio n. 7
0
    static int BinarySearch(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

        if (count == 2)
        {
            List <fogs.proto.msg.MailInfo> obj  = (List <fogs.proto.msg.MailInfo>)LuaScriptMgr.GetNetObjectSelf(L, 1, "List<fogs.proto.msg.MailInfo>");
            fogs.proto.msg.MailInfo        arg0 = (fogs.proto.msg.MailInfo)LuaScriptMgr.GetNetObject(L, 2, typeof(fogs.proto.msg.MailInfo));
            int o = obj.BinarySearch(arg0);
            LuaScriptMgr.Push(L, o);
            return(1);
        }
        else if (count == 3)
        {
            List <fogs.proto.msg.MailInfo>      obj  = (List <fogs.proto.msg.MailInfo>)LuaScriptMgr.GetNetObjectSelf(L, 1, "List<fogs.proto.msg.MailInfo>");
            fogs.proto.msg.MailInfo             arg0 = (fogs.proto.msg.MailInfo)LuaScriptMgr.GetNetObject(L, 2, typeof(fogs.proto.msg.MailInfo));
            IComparer <fogs.proto.msg.MailInfo> arg1 = (IComparer <fogs.proto.msg.MailInfo>)LuaScriptMgr.GetNetObject(L, 3, typeof(IComparer <fogs.proto.msg.MailInfo>));
            int o = obj.BinarySearch(arg0, arg1);
            LuaScriptMgr.Push(L, o);
            return(1);
        }
        else if (count == 5)
        {
            List <fogs.proto.msg.MailInfo> obj = (List <fogs.proto.msg.MailInfo>)LuaScriptMgr.GetNetObjectSelf(L, 1, "List<fogs.proto.msg.MailInfo>");
            int arg0 = (int)LuaScriptMgr.GetNumber(L, 2);
            int arg1 = (int)LuaScriptMgr.GetNumber(L, 3);
            fogs.proto.msg.MailInfo             arg2 = (fogs.proto.msg.MailInfo)LuaScriptMgr.GetNetObject(L, 4, typeof(fogs.proto.msg.MailInfo));
            IComparer <fogs.proto.msg.MailInfo> arg3 = (IComparer <fogs.proto.msg.MailInfo>)LuaScriptMgr.GetNetObject(L, 5, typeof(IComparer <fogs.proto.msg.MailInfo>));
            int o = obj.BinarySearch(arg0, arg1, arg2, arg3);
            LuaScriptMgr.Push(L, o);
            return(1);
        }
        else
        {
            LuaDLL.luaL_error(L, "invalid arguments to method: List<fogs.proto.msg.MailInfo>.BinarySearch");
        }

        return(0);
    }
Esempio n. 8
0
    static int LastIndexOf(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

        if (count == 2)
        {
            List <fogs.proto.msg.MailInfo> obj  = (List <fogs.proto.msg.MailInfo>)LuaScriptMgr.GetNetObjectSelf(L, 1, "List<fogs.proto.msg.MailInfo>");
            fogs.proto.msg.MailInfo        arg0 = (fogs.proto.msg.MailInfo)LuaScriptMgr.GetNetObject(L, 2, typeof(fogs.proto.msg.MailInfo));
            int o = obj.LastIndexOf(arg0);
            LuaScriptMgr.Push(L, o);
            return(1);
        }
        else if (count == 3)
        {
            List <fogs.proto.msg.MailInfo> obj  = (List <fogs.proto.msg.MailInfo>)LuaScriptMgr.GetNetObjectSelf(L, 1, "List<fogs.proto.msg.MailInfo>");
            fogs.proto.msg.MailInfo        arg0 = (fogs.proto.msg.MailInfo)LuaScriptMgr.GetNetObject(L, 2, typeof(fogs.proto.msg.MailInfo));
            int arg1 = (int)LuaScriptMgr.GetNumber(L, 3);
            int o    = obj.LastIndexOf(arg0, arg1);
            LuaScriptMgr.Push(L, o);
            return(1);
        }
        else if (count == 4)
        {
            List <fogs.proto.msg.MailInfo> obj  = (List <fogs.proto.msg.MailInfo>)LuaScriptMgr.GetNetObjectSelf(L, 1, "List<fogs.proto.msg.MailInfo>");
            fogs.proto.msg.MailInfo        arg0 = (fogs.proto.msg.MailInfo)LuaScriptMgr.GetNetObject(L, 2, typeof(fogs.proto.msg.MailInfo));
            int arg1 = (int)LuaScriptMgr.GetNumber(L, 3);
            int arg2 = (int)LuaScriptMgr.GetNumber(L, 4);
            int o    = obj.LastIndexOf(arg0, arg1, arg2);
            LuaScriptMgr.Push(L, o);
            return(1);
        }
        else
        {
            LuaDLL.luaL_error(L, "invalid arguments to method: List<fogs.proto.msg.MailInfo>.LastIndexOf");
        }

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

        fogs.proto.msg.MailInfo obj = (fogs.proto.msg.MailInfo)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);
    }
Esempio n. 10
0
    static int set_get_delete(IntPtr L)
    {
        object o = LuaScriptMgr.GetLuaObject(L, 1);

        fogs.proto.msg.MailInfo obj = (fogs.proto.msg.MailInfo)o;

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

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

        obj.get_delete = (uint)LuaScriptMgr.GetNumber(L, 3);
        return(0);
    }
Esempio n. 11
0
    static int set_attachment(IntPtr L)
    {
        object o = LuaScriptMgr.GetLuaObject(L, 1);

        fogs.proto.msg.MailInfo obj = (fogs.proto.msg.MailInfo)o;

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

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

        obj.attachment = (fogs.proto.msg.Attchment)LuaScriptMgr.GetNetObject(L, 3, typeof(fogs.proto.msg.Attchment));
        return(0);
    }
Esempio n. 12
0
    static int set_content(IntPtr L)
    {
        object o = LuaScriptMgr.GetLuaObject(L, 1);

        fogs.proto.msg.MailInfo obj = (fogs.proto.msg.MailInfo)o;

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

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

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