示例#1
0
        public RoomUser(IPacketReader packet)
        {
            UserId      = packet.NextInt();
            DisplayName = packet.NextString();
            Motto       = packet.NextString();
            Figure      = packet.NextString();
            VirtualId   = packet.NextInt();
            X           = packet.NextInt();
            Y           = packet.NextInt();
            Z           = double.Parse(packet.NextString(), CultureInfo.InvariantCulture);
            Unknown0    = packet.NextInt();
            Unknown1    = (RoomUserType)packet.NextInt();

            switch (Unknown1)
            {
            case RoomUserType.User:
                UserGender   = packet.NextString();
                UserUnknown0 = packet.NextInt();
                UserUnknown1 = packet.NextInt();
                UserUnknown2 = packet.NextString();
                UserUnknown3 = packet.NextString();
                UserUnknown4 = packet.NextInt();
                UserUnknown5 = packet.NextBool();
                break;

            case RoomUserType.Pet:
                PetUnknown0  = packet.NextInt();
                PetUnknown1  = packet.NextInt();
                PetUnknown2  = packet.NextString();
                PetUnknown3  = packet.NextInt();
                PetUnknown4  = packet.NextBool();
                PetUnknown5  = packet.NextBool();
                PetUnknown6  = packet.NextBool();
                PetUnknown7  = packet.NextBool();
                PetUnknown8  = packet.NextBool();
                PetUnknown9  = packet.NextBool();
                PetUnknown10 = packet.NextInt();
                PetUnknown11 = packet.NextString();
                break;

            case RoomUserType.Unknown1:
                // Nothing.
                break;

            case RoomUserType.Bot:
                BotUnknown0 = packet.NextString();
                BotUnknown1 = packet.NextInt();
                BotUnknown2 = packet.NextString();
                BotUnknown3 = new List <short>(packet.NextInt());

                for (var i = 0; i < BotUnknown3.Capacity; i++)
                {
                    BotUnknown3.Add(packet.NextShort());
                }
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
示例#2
0
 public FriendData(IPacketReader PacketOriginal)
 {
     Id                    = PacketOriginal.NextInt();
     Username              = PacketOriginal.NextString();
     Gender                = PacketOriginal.NextInt();
     Online                = PacketOriginal.NextBool();
     InRoom                = PacketOriginal.NextBool();
     Figure                = PacketOriginal.NextString();
     CategoryId            = PacketOriginal.NextInt();
     Motto                 = PacketOriginal.NextString();
     FacebookUsername      = PacketOriginal.NextString();
     Unknown1              = PacketOriginal.NextString();
     AllowOfflineMessaging = PacketOriginal.NextBool();
     Unknown3              = PacketOriginal.NextBool();
     IsMobileUser          = PacketOriginal.NextBool();
     RelationshipStatus    = PacketOriginal.NextShort();
 }