예제 #1
0
    static int get_rank_type(IntPtr L)
    {
        object o = LuaScriptMgr.GetLuaObject(L, 1);

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

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

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

        LuaScriptMgr.Push(L, obj.rank_type);
        return(1);
    }
예제 #2
0
    static int set_limit_condition(IntPtr L)
    {
        object o = LuaScriptMgr.GetLuaObject(L, 1);

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

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

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

        obj.limit_condition = LuaScriptMgr.GetString(L, 3);
        return(0);
    }
예제 #3
0
    static int set_refresh_time(IntPtr L)
    {
        object o = LuaScriptMgr.GetLuaObject(L, 1);

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

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

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

        obj.refresh_time = (uint)LuaScriptMgr.GetNumber(L, 3);
        return(0);
    }
예제 #4
0
    static int set_rank_sub_type(IntPtr L)
    {
        object o = LuaScriptMgr.GetLuaObject(L, 1);

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

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

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

        obj.rank_sub_type = (fogs.proto.msg.RankSubType)LuaScriptMgr.GetNetObject(L, 3, typeof(fogs.proto.msg.RankSubType));
        return(0);
    }