diff --git a/WowPacketParserModule.V4_4_0_54481/Parsers/UpdateFieldsHandler441.cs b/WowPacketParserModule.V4_4_0_54481/Parsers/UpdateFieldsHandler441.cs index 92394a75d6..627d337203 100644 --- a/WowPacketParserModule.V4_4_0_54481/Parsers/UpdateFieldsHandler441.cs +++ b/WowPacketParserModule.V4_4_0_54481/Parsers/UpdateFieldsHandler441.cs @@ -557,10 +557,8 @@ public override IUnitData ReadCreateUnitData(Packet packet, UpdateFieldFlag flag data.Health = packet.ReadInt64("Health", indexes); data.MaxHealth = packet.ReadInt64("MaxHealth", indexes); data.DisplayID = packet.ReadInt32("DisplayID", indexes); - for (var i = 0; i < 2; ++i) - { - data.NpcFlags[i] = packet.ReadUInt32("NpcFlags", indexes, i); - } + data.NpcFlags = packet.ReadUInt32("NpcFlags", indexes); + data.NpcFlags2 = packet.ReadUInt32("NpcFlags2", indexes); data.StateSpellVisualID = packet.ReadUInt32("StateSpellVisualID", indexes); data.StateAnimID = packet.ReadUInt32("StateAnimID", indexes); data.StateAnimKitID = packet.ReadUInt32("StateAnimKitID", indexes); @@ -740,7 +738,7 @@ public override IUnitData ReadCreateUnitData(Packet packet, UpdateFieldFlag flag data.ComboTarget = packet.ReadPackedGuid128("ComboTarget", indexes); } data.Field_2F0 = packet.ReadSingle("Field_2F0", indexes); - data.Field_2F4 = packet.ReadUInt32("Field_2F4", indexes); + data.Field_2F4 = packet.ReadSingle("Field_2F4", indexes); for (var i = 0; i < data.PassiveSpells.Count; ++i) { data.PassiveSpells[i] = ReadCreatePassiveSpellHistory(packet, indexes, "PassiveSpells", i); @@ -841,12 +839,13 @@ public override IUnitData ReadUpdateUnitData(Packet packet, params object[] inde { data.DisplayID = packet.ReadInt32("DisplayID", indexes); } - for (var i = 0; i < 2; ++i) + if (changesMask[8]) { - if (changesMask[8 + i]) - { - data.NpcFlags[i] = packet.ReadUInt32("NpcFlags", indexes, i); - } + data.NpcFlags = packet.ReadUInt32("NpcFlags", indexes); + } + if (changesMask[9]) + { + data.NpcFlags2 = packet.ReadUInt32("NpcFlags2", indexes); } if (changesMask[10]) { @@ -1247,7 +1246,7 @@ public override IUnitData ReadUpdateUnitData(Packet packet, params object[] inde } if (changesMask[110]) { - data.GlideEventSpeedDivisor = packet.ReadUInt32("GlideEventSpeedDivisor", indexes); + data.GlideEventSpeedDivisor = packet.ReadSingle("GlideEventSpeedDivisor", indexes); } if (changesMask[111]) { @@ -1263,11 +1262,11 @@ public override IUnitData ReadUpdateUnitData(Packet packet, params object[] inde } if (changesMask[114]) { - data.Field_2F0 = packet.ReadUInt32("Field_2F0", indexes); + data.Field_2F0 = packet.ReadSingle("Field_2F0", indexes); } if (changesMask[115]) { - data.Field_2F4 = packet.ReadUInt32("Field_2F4", indexes); + data.Field_2F4 = packet.ReadSingle("Field_2F4", indexes); } } if (changesMask[116]) @@ -1498,6 +1497,38 @@ public static IArenaCooldown ReadUpdateArenaCooldown(Packet packet, params objec return data; } + public static IZonePlayerForcedReaction ReadCreateZonePlayerForcedReaction(Packet packet, params object[] indexes) + { + var data = new ZonePlayerForcedReaction(); + packet.ResetBitReader(); + data.FactionID = packet.ReadInt32("FactionID", indexes); + data.Reaction = packet.ReadInt32("Reaction", indexes); + return data; + } + + public static IZonePlayerForcedReaction ReadUpdateZonePlayerForcedReaction(Packet packet, params object[] indexes) + { + var data = new ZonePlayerForcedReaction(); + packet.ResetBitReader(); + var rawChangesMask = new int[1]; + rawChangesMask[0] = (int)packet.ReadBits(3); + var changesMask = new BitArray(rawChangesMask); + + packet.ResetBitReader(); + if (changesMask[0]) + { + if (changesMask[1]) + { + data.FactionID = packet.ReadInt32("FactionID", indexes); + } + if (changesMask[2]) + { + data.Reaction = packet.ReadInt32("Reaction", indexes); + } + } + return data; + } + public static IDeclinedNames ReadCreateDeclinedNames(Packet packet, params object[] indexes) { var data = new DeclinedNames(); @@ -1551,38 +1582,6 @@ public static IDeclinedNames ReadUpdateDeclinedNames(Packet packet, params objec return data; } - public static IZonePlayerForcedReaction ReadCreateZonePlayerForcedReaction(Packet packet, params object[] indexes) - { - var data = new ZonePlayerForcedReaction(); - packet.ResetBitReader(); - data.FactionID = packet.ReadInt32("FactionID", indexes); - data.Reaction = packet.ReadInt32("Reaction", indexes); - return data; - } - - public static IZonePlayerForcedReaction ReadUpdateZonePlayerForcedReaction(Packet packet, params object[] indexes) - { - var data = new ZonePlayerForcedReaction(); - packet.ResetBitReader(); - var rawChangesMask = new int[1]; - rawChangesMask[0] = (int)packet.ReadBits(3); - var changesMask = new BitArray(rawChangesMask); - - packet.ResetBitReader(); - if (changesMask[0]) - { - if (changesMask[1]) - { - data.FactionID = packet.ReadInt32("FactionID", indexes); - } - if (changesMask[2]) - { - data.Reaction = packet.ReadInt32("Reaction", indexes); - } - } - return data; - } - public static ICustomTabardInfo ReadCreateCustomTabardInfo(Packet packet, params object[] indexes) { var data = new CustomTabardInfo(); @@ -1916,11 +1915,8 @@ public override IPlayerData ReadUpdatePlayerData(Packet packet, params object[] } if (changesMask[32]) { - if (changesMask[35]) - { - hasDeclinedNames = packet.ReadBit("HasDeclinedNames", indexes); - packet.ResetBitReader(); - } + hasDeclinedNames = packet.ReadBit("HasDeclinedNames", indexes); + packet.ResetBitReader(); if (changesMask[36]) { Substructures.MythicPlusHandler.ReadDungeonScoreSummary(packet, indexes, "DungeonScore"); @@ -3127,7 +3123,7 @@ public override IActivePlayerData ReadCreateActivePlayerData(Packet packet, Upda data.SortBagsRightToLeft = packet.ReadBit("SortBagsRightToLeft", indexes); data.InsertItemsLeftToRight = packet.ReadBit("InsertItemsLeftToRight", indexes); hasPetStable = packet.ReadBit("HasPetStable", indexes); - packet.ResetBitReader(); + data.AccountBankTabSettings.Resize(packet.ReadBits(3)); data.ResearchHistory = ReadCreateResearchHistory(packet, indexes, "ResearchHistory"); Substructures.PerksProgramHandler.ReadPerksVendorItem(packet, indexes, "FrozenPerksVendorItem"); for (var i = 0; i < data.CharacterDataElements.Count; ++i) @@ -3196,10 +3192,6 @@ public override IActivePlayerData ReadUpdateActivePlayerData(Packet packet, para data.AccountDataElements.ReadUpdateMask(packet); } } - //if (changesMask[20]) - //{ - // data.BitVectors = ReadUpdateBitVectors(packet, indexes, "BitVectors"); - //} if (changesMask[23]) { for (var i = 0; i < 1; ++i) @@ -3956,14 +3948,11 @@ public override IActivePlayerData ReadUpdateActivePlayerData(Packet packet, para { Substructures.PerksProgramHandler.ReadPerksVendorItem(packet, indexes, "FrozenPerksVendorItem"); } - if (changesMask[128]) + if (changesMask[129]) { - if (changesMask[129]) + if (hasPetStable) { - if (hasPetStable) - { - data.PetStable = ReadUpdateStableInfo(packet, indexes, "PetStable"); - } + data.PetStable = ReadUpdateStableInfo(packet, indexes, "PetStable"); } } } diff --git a/WowPacketParserModule.V4_4_0_54481/UpdateFields/V4_4_1_57141/ConversationLine.cs b/WowPacketParserModule.V4_4_0_54481/UpdateFields/V4_4_1_57141/ConversationLine.cs index c3b63fa658..3f7781b71e 100644 --- a/WowPacketParserModule.V4_4_0_54481/UpdateFields/V4_4_1_57141/ConversationLine.cs +++ b/WowPacketParserModule.V4_4_0_54481/UpdateFields/V4_4_1_57141/ConversationLine.cs @@ -8,7 +8,7 @@ namespace WowPacketParserModule.V4_4_0_54481.UpdateFields.V4_4_1_57141 { - //[GeneratedCode("UpdateFieldCodeGenerator.Formats.WowPacketParserHandler", "1.0.0.0")] + [GeneratedCode("UpdateFieldCodeGenerator.Formats.WowPacketParserHandler", "1.0.0.0")] public class ConversationLine : IConversationLine { public int ConversationLineID { get; set; } diff --git a/WowPacketParserModule.V4_4_0_54481/UpdateFields/V4_4_1_57141/ItemMod.cs b/WowPacketParserModule.V4_4_0_54481/UpdateFields/V4_4_1_57141/ItemMod.cs index 25a3b3b56b..a0e91a1025 100644 --- a/WowPacketParserModule.V4_4_0_54481/UpdateFields/V4_4_1_57141/ItemMod.cs +++ b/WowPacketParserModule.V4_4_0_54481/UpdateFields/V4_4_1_57141/ItemMod.cs @@ -11,8 +11,8 @@ namespace WowPacketParserModule.V4_4_0_54481.UpdateFields.V4_4_1_57141 [GeneratedCode("UpdateFieldCodeGenerator.Formats.WowPacketParserHandler", "1.0.0.0")] public class ItemMod : IItemMod { - public int Value { get; set; } public byte Type { get; set; } + public int Value { get; set; } } } diff --git a/WowPacketParserModule.V4_4_0_54481/UpdateFields/V4_4_1_57141/UnitData.cs b/WowPacketParserModule.V4_4_0_54481/UpdateFields/V4_4_1_57141/UnitData.cs index d5301c3536..2b16726686 100644 --- a/WowPacketParserModule.V4_4_0_54481/UpdateFields/V4_4_1_57141/UnitData.cs +++ b/WowPacketParserModule.V4_4_0_54481/UpdateFields/V4_4_1_57141/UnitData.cs @@ -14,7 +14,8 @@ public class UnitData : IMutableUnitData public System.Nullable Health { get; set; } public System.Nullable MaxHealth { get; set; } public System.Nullable DisplayID { get; set; } - public System.Nullable[] NpcFlags { get; } = new System.Nullable[2]; + public System.Nullable NpcFlags { get; set; } + public System.Nullable NpcFlags2 { get; set; } public System.Nullable StateSpellVisualID { get; set; } public System.Nullable StateAnimID { get; set; } public System.Nullable StateAnimKitID { get; set; } @@ -133,11 +134,13 @@ public class UnitData : IMutableUnitData public System.Nullable CurrentAreaID { get; set; } public WowGuid ComboTarget { get; set; } public System.Nullable Field_2F0 { get; set; } - public System.Nullable Field_2F4 { get; set; } + public System.Nullable Field_2F4 { get; set; } public DynamicUpdateField PassiveSpells { get; } = new DynamicUpdateField(); public DynamicUpdateField> WorldEffects { get; } = new DynamicUpdateField>(); public DynamicUpdateField ChannelObjects { get; } = new DynamicUpdateField(); + uint?[] IUnitData.NpcFlags => new[] { NpcFlags, NpcFlags2 }; + // dummies required by interface public int? CreatureFamily { get; set; } public int? CreatureType { get; set; }