public override bool ParseMessage(NetworkMessage msg, PacketDestination destination)
        {
            int position = msg.Position;

            if (msg.GetByte() != (byte)IncomingPacketType.OutfitWindow)
            {
                return(false);
            }

            Destination = destination;
            Type        = IncomingPacketType.OutfitWindow;

            Default = msg.GetOutfit();

            byte count = msg.GetByte();

            OutfitList = new List <AvalibleOutfit> {
            };

            for (int i = 0; i < count; i++)
            {
                AvalibleOutfit outfit = new AvalibleOutfit();

                outfit.Id     = msg.GetUInt16();
                outfit.Name   = msg.GetString();
                outfit.Addons = msg.GetByte();

                OutfitList.Add(outfit);
            }

            if (Client.VersionNumber >= 870)
            {
                count     = msg.GetByte();
                MountList = new List <MountDescription> {
                };

                for (int i = 0; i < count; i++)
                {
                    MountDescription mount = new MountDescription();

                    mount.Id   = msg.GetUInt16();
                    mount.Name = msg.GetString();

                    MountList.Add(mount);
                }
            }

            return(true);
        }
Пример #2
0
        public override bool ParseMessage(NetworkMessage msg, PacketDestination destination)
        {
            int position = msg.Position;

            if (msg.GetByte() != (byte)IncomingPacketType.OutfitWindow)
                return false;

            Destination = destination;
            Type = IncomingPacketType.OutfitWindow;

            Default = msg.GetOutfit();

            byte count = msg.GetByte();
            OutfitList = new List<AvalibleOutfit> { };

            for (int i = 0; i < count; i++)
            {
                AvalibleOutfit outfit = new AvalibleOutfit();

                outfit.Id = msg.GetUInt16();
                outfit.Name = msg.GetString();
                outfit.Addons = msg.GetByte();

                OutfitList.Add(outfit);
            }

            if (Client.VersionNumber >= 870)
            {
                count = msg.GetByte();
                MountList = new List<MountDescription> { };

                for (int i = 0; i < count; i++)
                {
                    MountDescription mount = new MountDescription();

                    mount.Id = msg.GetUInt16();
                    mount.Name = msg.GetString();

                    MountList.Add(mount);
                }
            }

            return true;
        }