public static void HandleEmote(Packet packet) { PacketEmote packetEmote = packet.Holder.Emote = new PacketEmote(); var guid = packet.ReadPackedGuid128("GUID"); var emote = packet.ReadInt32E <EmoteType>("Emote ID"); if (ClientVersion.AddedInVersion(ClientVersionBuild.V9_0_5_37503)) { var count = packet.ReadUInt32("SpellVisualKitCount"); if (ClientVersion.AddedInVersion(ClientVersionBuild.V9_2_0_42423)) { packet.ReadInt32("SequenceVariation"); } for (var i = 0; i < count; ++i) { packet.ReadUInt32("SpellVisualKitID", i); } } if (guid.GetObjectType() == ObjectType.Unit) { Storage.Emotes.Add(guid, emote, packet.TimeSpan); } packetEmote.Emote = (int)emote; packetEmote.Sender = guid.ToUniversalGuid(); }
public static void HandleEmote(Packet packet) { PacketEmote packetEmote = packet.Holder.Emote = new PacketEmote(); var guid = packet.ReadPackedGuid128("GUID"); var emote = packet.ReadInt32E <EmoteType>("Emote ID"); if (guid.GetObjectType() == ObjectType.Unit) { Storage.Emotes.Add(guid, emote, packet.TimeSpan); } packetEmote.Emote = (int)emote; packetEmote.Sender = guid.ToUniversalGuid(); }
protected virtual T?Process(PacketBase basePacket, PacketEmote packet) => default;
protected override bool Process(PacketBase basePacket, PacketEmote packet) { return(packet.Sender.Equals(playerGuid)); }
protected override UniversalGuid?Process(PacketBase packetBaseData, PacketEmote packet) { return(packet.Sender); }
protected override bool Process(PacketBase basePacket, PacketEmote packet) { return(packet.Sender.Type == UniversalHighGuid.Player); }