예제 #1
0
    static int _Createfogs_proto_msg_PlayerData(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

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

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

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

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

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

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

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

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

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

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

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

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