public static void HandlePlaySound(Packet packet)
        {
            PacketPlaySound packetPlaySound = packet.Holder.PlaySound = new PacketPlaySound();
            var             guid            = new byte[8];

            guid[5] = packet.ReadBit();
            guid[6] = packet.ReadBit();
            guid[0] = packet.ReadBit();
            guid[1] = packet.ReadBit();
            guid[7] = packet.ReadBit();
            guid[2] = packet.ReadBit();
            guid[4] = packet.ReadBit();
            guid[3] = packet.ReadBit();
            packet.ReadXORByte(guid, 5);
            packet.ReadXORByte(guid, 1);
            var sound = packetPlaySound.Sound = packet.ReadUInt32("Sound Id");

            packet.ReadXORByte(guid, 6);
            packet.ReadXORByte(guid, 2);
            packet.ReadXORByte(guid, 4);
            packet.ReadXORByte(guid, 7);
            packet.ReadXORByte(guid, 3);
            packet.ReadXORByte(guid, 0);

            packetPlaySound.Source = packet.WriteGuid("Guid", guid).ToUniversalGuid();

            Storage.Sounds.Add(sound, packet.TimeSpan);
        }
        public static void HandlePlaySound(Packet packet)
        {
            PacketPlaySound packetPlaySound = packet.Holder.PlaySound = new PacketPlaySound();
            uint            sound           = packetPlaySound.Sound = packet.ReadUInt32 <SoundId>("SoundKitID");

            packetPlaySound.Source = packet.ReadPackedGuid128("SourceObjectGUID").ToUniversalGuid();

            Storage.Sounds.Add(sound, packet.TimeSpan);
        }
        public static void HandlePlaySound(Packet packet)
        {
            PacketPlaySound packetPlaySound = packet.Holder.PlaySound = new PacketPlaySound();
            var             guid            = new byte[8];

            packet.StartBitStream(guid, 2, 3, 7, 6, 0, 5, 4, 1);

            uint sound = packetPlaySound.Sound = packet.ReadUInt32("Sound Id");

            packet.ParseBitStream(guid, 3, 2, 4, 7, 5, 0, 6, 1);
            packetPlaySound.Source = packet.WriteGuid("Guid", guid).ToUniversalGuid();

            Storage.Sounds.Add(sound, packet.TimeSpan);
        }
        public static void HandleSoundMessages(Packet packet)
        {
            PacketPlaySound packetPlaySound = packet.Holder.PlaySound = new PacketPlaySound();
            uint            sound           = packetPlaySound.Sound = packet.ReadUInt32("Sound Id");

            packetPlaySound.Source = new UniversalGuid()
            {
                Guid64 = new UniversalGuid64()
            };

            if (ClientVersion.AddedInVersion(ClientVersionBuild.V4_3_0_15005))
            {
                packetPlaySound.Source = packet.ReadGuid("GUID").ToUniversalGuid();
            }

            Storage.Sounds.Add(sound, packet.TimeSpan);
        }
Example #5
0
        public static void HandlePlaySound(Packet packet)
        {
            PacketPlaySound packetPlaySound = packet.Holder.PlaySound = new PacketPlaySound();
            var             guid            = new byte[8];

            packet.StartBitStream(guid, 1, 6, 7, 5, 4, 3, 0, 2);
            packet.ReadXORByte(guid, 3);
            packet.ReadXORByte(guid, 6);
            packet.ReadXORByte(guid, 5);
            packet.ReadXORByte(guid, 4);
            uint sound = packetPlaySound.Sound = packet.ReadUInt32("Sound Id");

            packet.ReadXORByte(guid, 1);
            packet.ReadXORByte(guid, 2);
            packet.ReadXORByte(guid, 0);
            packet.ReadXORByte(guid, 7);

            packetPlaySound.Source = packet.WriteGuid("Guid", guid).ToUniversalGuid();

            Storage.Sounds.Add(sound, packet.TimeSpan);
        }
Example #6
0
 protected virtual T?Process(PacketBase basePacket, PacketPlaySound packet) => default;
Example #7
0
 protected override bool Process(PacketBase basePacket, PacketPlaySound packet)
 {
     return(packet.Source.Equals(playerGuid));
 }
Example #8
0
 protected override UniversalGuid?Process(PacketBase packetBaseData, PacketPlaySound packet)
 {
     return(packet.Source);
 }
Example #9
0
 protected override bool Process(PacketBase basePacket, PacketPlaySound packet)
 {
     return(packet.Source.Type == UniversalHighGuid.Player);
 }