From 9132658a11be7df229ef3819b544c75bb911dae5 Mon Sep 17 00:00:00 2001 From: funjoker Date: Tue, 5 Nov 2024 20:22:46 +0100 Subject: [PATCH] Fix 4.4.1 SMSG_GOSSIP_MESSAGE --- .../Parsers/NpcHandler.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/WowPacketParserModule.V4_4_0_54481/Parsers/NpcHandler.cs b/WowPacketParserModule.V4_4_0_54481/Parsers/NpcHandler.cs index 9da4d902f2..bb72e98883 100644 --- a/WowPacketParserModule.V4_4_0_54481/Parsers/NpcHandler.cs +++ b/WowPacketParserModule.V4_4_0_54481/Parsers/NpcHandler.cs @@ -52,6 +52,10 @@ public static GossipMessageOption ReadGossipOptionsData(uint menuId, WowGuid npc bool hasSpellId = packet.ReadBit(); bool hasOverrideIconId = packet.ReadBit(); + uint failureDescriptionLength = 0; + if (ClientVersion.AddedInVersion(ClientVersionBuild.V4_4_1_57294)) + failureDescriptionLength = packet.ReadBits(8); + uint rewardsCount = packet.ReadUInt32(); for (uint i = 0; i < rewardsCount; ++i) { @@ -59,6 +63,9 @@ public static GossipMessageOption ReadGossipOptionsData(uint menuId, WowGuid npc packet.ReadBits("Type", 1, idx, "TreasureItem", i); packet.ReadInt32("ID", idx, "TreasureItem", i); packet.ReadInt32("Quantity", idx, "TreasureItem", i); + + if (ClientVersion.AddedInVersion(ClientVersionBuild.V4_4_1_57294)) + packet.ReadByte("ItemContext", idx, "TreasureItem", i); } gossipOption.OptionText = gossipMessageOption.Text = packet.ReadWoWString("Text", textLen, idx); @@ -73,6 +80,9 @@ public static GossipMessageOption ReadGossipOptionsData(uint menuId, WowGuid npc if (hasOverrideIconId) gossipOption.OverrideIconID = packet.ReadInt32("OverrideIconID", idx); + if (failureDescriptionLength > 1) + packet.ReadDynamicString("FailureDescription", failureDescriptionLength); + gossipOption.FillBroadcastTextIDs(); if (Settings.TargetedDatabase < TargetedDatabase.Shadowlands) @@ -119,6 +129,9 @@ public static void HandleNpcGossip(Packet packet) int menuId = packet.ReadInt32("GossipID"); packetGossip.MenuId = (uint)menuId; + if (ClientVersion.AddedInVersion(ClientVersionBuild.V4_4_1_57294)) + packet.ReadInt32("LfgDungeonsID"); + int friendshipFactionID = packet.ReadInt32("FriendshipFactionID"); CoreParsers.NpcHandler.AddGossipAddon(packetGossip.MenuId, friendshipFactionID, 0, guid, packet.TimeSpan);