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); }
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); }
protected virtual T?Process(PacketBase basePacket, PacketPlaySound packet) => default;
protected override bool Process(PacketBase basePacket, PacketPlaySound packet) { return(packet.Source.Equals(playerGuid)); }
protected override UniversalGuid?Process(PacketBase packetBaseData, PacketPlaySound packet) { return(packet.Source); }
protected override bool Process(PacketBase basePacket, PacketPlaySound packet) { return(packet.Source.Type == UniversalHighGuid.Player); }