예제 #1
0
    static int GetGoodsUseConfig(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 2);
        GoodsConfig obj  = (GoodsConfig)LuaScriptMgr.GetNetObjectSelf(L, 1, "GoodsConfig");
        uint        arg0 = (uint)LuaScriptMgr.GetNumber(L, 2);

        fogs.proto.config.GoodsUseConfig o = obj.GetGoodsUseConfig(arg0);
        LuaScriptMgr.PushObject(L, o);
        return(1);
    }
    static int _Createfogs_proto_config_GoodsUseConfig(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

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

        return(0);
    }
    static int get_pack_num(IntPtr L)
    {
        object o = LuaScriptMgr.GetLuaObject(L, 1);

        fogs.proto.config.GoodsUseConfig obj = (fogs.proto.config.GoodsUseConfig)o;

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

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

        LuaScriptMgr.Push(L, obj.pack_num);
        return(1);
    }
    static int set_id(IntPtr L)
    {
        object o = LuaScriptMgr.GetLuaObject(L, 1);

        fogs.proto.config.GoodsUseConfig obj = (fogs.proto.config.GoodsUseConfig)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");
            }
        }

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