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

        if (funcType2 != LuaTypes.LUA_TFUNCTION)
        {
            arg0 = (Predicate <fogs.proto.msg.SkillSlotProto>)LuaScriptMgr.GetNetObject(L, 2, typeof(Predicate <fogs.proto.msg.SkillSlotProto>));
        }
        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.SkillSlotProto o = obj.FindLast(arg0);
        LuaScriptMgr.PushObject(L, o);
        return(1);
    }
    static int Add(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 2);
        List <fogs.proto.msg.SkillSlotProto> obj = (List <fogs.proto.msg.SkillSlotProto>)LuaScriptMgr.GetNetObjectSelf(L, 1, "List<fogs.proto.msg.SkillSlotProto>");

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

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

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

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

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

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

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

        if (count == 2)
        {
            List <fogs.proto.msg.SkillSlotProto> obj  = (List <fogs.proto.msg.SkillSlotProto>)LuaScriptMgr.GetNetObjectSelf(L, 1, "List<fogs.proto.msg.SkillSlotProto>");
            fogs.proto.msg.SkillSlotProto        arg0 = (fogs.proto.msg.SkillSlotProto)LuaScriptMgr.GetNetObject(L, 2, typeof(fogs.proto.msg.SkillSlotProto));
            int o = obj.BinarySearch(arg0);
            LuaScriptMgr.Push(L, o);
            return(1);
        }
        else if (count == 3)
        {
            List <fogs.proto.msg.SkillSlotProto>      obj  = (List <fogs.proto.msg.SkillSlotProto>)LuaScriptMgr.GetNetObjectSelf(L, 1, "List<fogs.proto.msg.SkillSlotProto>");
            fogs.proto.msg.SkillSlotProto             arg0 = (fogs.proto.msg.SkillSlotProto)LuaScriptMgr.GetNetObject(L, 2, typeof(fogs.proto.msg.SkillSlotProto));
            IComparer <fogs.proto.msg.SkillSlotProto> arg1 = (IComparer <fogs.proto.msg.SkillSlotProto>)LuaScriptMgr.GetNetObject(L, 3, typeof(IComparer <fogs.proto.msg.SkillSlotProto>));
            int o = obj.BinarySearch(arg0, arg1);
            LuaScriptMgr.Push(L, o);
            return(1);
        }
        else if (count == 5)
        {
            List <fogs.proto.msg.SkillSlotProto> obj = (List <fogs.proto.msg.SkillSlotProto>)LuaScriptMgr.GetNetObjectSelf(L, 1, "List<fogs.proto.msg.SkillSlotProto>");
            int arg0 = (int)LuaScriptMgr.GetNumber(L, 2);
            int arg1 = (int)LuaScriptMgr.GetNumber(L, 3);
            fogs.proto.msg.SkillSlotProto             arg2 = (fogs.proto.msg.SkillSlotProto)LuaScriptMgr.GetNetObject(L, 4, typeof(fogs.proto.msg.SkillSlotProto));
            IComparer <fogs.proto.msg.SkillSlotProto> arg3 = (IComparer <fogs.proto.msg.SkillSlotProto>)LuaScriptMgr.GetNetObject(L, 5, typeof(IComparer <fogs.proto.msg.SkillSlotProto>));
            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.SkillSlotProto>.BinarySearch");
        }

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

        if (count == 2)
        {
            List <fogs.proto.msg.SkillSlotProto> obj  = (List <fogs.proto.msg.SkillSlotProto>)LuaScriptMgr.GetNetObjectSelf(L, 1, "List<fogs.proto.msg.SkillSlotProto>");
            fogs.proto.msg.SkillSlotProto        arg0 = (fogs.proto.msg.SkillSlotProto)LuaScriptMgr.GetNetObject(L, 2, typeof(fogs.proto.msg.SkillSlotProto));
            int o = obj.LastIndexOf(arg0);
            LuaScriptMgr.Push(L, o);
            return(1);
        }
        else if (count == 3)
        {
            List <fogs.proto.msg.SkillSlotProto> obj  = (List <fogs.proto.msg.SkillSlotProto>)LuaScriptMgr.GetNetObjectSelf(L, 1, "List<fogs.proto.msg.SkillSlotProto>");
            fogs.proto.msg.SkillSlotProto        arg0 = (fogs.proto.msg.SkillSlotProto)LuaScriptMgr.GetNetObject(L, 2, typeof(fogs.proto.msg.SkillSlotProto));
            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.SkillSlotProto> obj  = (List <fogs.proto.msg.SkillSlotProto>)LuaScriptMgr.GetNetObjectSelf(L, 1, "List<fogs.proto.msg.SkillSlotProto>");
            fogs.proto.msg.SkillSlotProto        arg0 = (fogs.proto.msg.SkillSlotProto)LuaScriptMgr.GetNetObject(L, 2, typeof(fogs.proto.msg.SkillSlotProto));
            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.SkillSlotProto>.LastIndexOf");
        }

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

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

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

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

        LuaScriptMgr.Push(L, obj.is_unlock);
        return(1);
    }
Ejemplo n.º 10
0
    static int set_skill_level(IntPtr L)
    {
        object o = LuaScriptMgr.GetLuaObject(L, 1);

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

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

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

        obj.skill_level = (uint)LuaScriptMgr.GetNumber(L, 3);
        return(0);
    }