Skip to content

Commit

Permalink
Sync hotfixes parsing with TC (11.0.5)
Browse files Browse the repository at this point in the history
  • Loading branch information
meji46 committed Nov 21, 2024
1 parent b92c97c commit 30b1416
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 0 deletions.
7 changes: 7 additions & 0 deletions WowPacketParser/SQL/Builders/HotfixBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4195,6 +4195,13 @@ public static string Hotfixes()
sql += SQLUtil.Compare(Storage.MountCapabilityHotfixes1100, hotfixes, StoreNameType.None);
}

if (!Storage.MountEquipmentHotfixes1100.IsEmpty())
{
var hotfixes = SQLDatabase.Get(Storage.MountEquipmentHotfixes1100, Settings.HotfixesDatabase);

sql += SQLUtil.Compare(Storage.MountEquipmentHotfixes1100, hotfixes, StoreNameType.None);
}

if (!Storage.MountTypeXCapabilityHotfixes1100.IsEmpty())
{
var hotfixes = SQLDatabase.Get(Storage.MountTypeXCapabilityHotfixes1100, Settings.HotfixesDatabase);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using WowPacketParser.Misc;
using WowPacketParser.SQL;

namespace WowPacketParser.Store.Objects
{
[Hotfix]
[DBTableName("mount_equipment")]
public sealed record MountEquipmentHotfix1100 : IDataModel
{
[DBFieldName("ID", true)]
public uint? ID;

[DBFieldName("Item")]
public int? Item;

[DBFieldName("BuffSpell")]
public int? BuffSpell;

[DBFieldName("Unknown820")]
public int? Unknown820;

[DBFieldName("LearnedBySpell")]
public uint? LearnedBySpell;

[DBFieldName("VerifiedBuild")]
public int? VerifiedBuild = ClientVersion.BuildInt;
}
}
2 changes: 2 additions & 0 deletions WowPacketParser/Store/Storage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,7 @@ public static class Storage
public static readonly DataBag<ModifierTreeHotfix1100> ModifierTreeHotfixes1100 = new DataBag<ModifierTreeHotfix1100>(new List<SQLOutput> { SQLOutput.hotfixes });
public static readonly DataBag<MountHotfix1100> MountHotfixes1100 = new DataBag<MountHotfix1100>(new List<SQLOutput> { SQLOutput.hotfixes });
public static readonly DataBag<MountCapabilityHotfix1100> MountCapabilityHotfixes1100 = new DataBag<MountCapabilityHotfix1100>(new List<SQLOutput> { SQLOutput.hotfixes });
public static readonly DataBag<MountEquipmentHotfix1100> MountEquipmentHotfixes1100 = new DataBag<MountEquipmentHotfix1100>(new List<SQLOutput> { SQLOutput.hotfixes });
public static readonly DataBag<MountTypeXCapabilityHotfix1100> MountTypeXCapabilityHotfixes1100 = new DataBag<MountTypeXCapabilityHotfix1100>(new List<SQLOutput> { SQLOutput.hotfixes });
public static readonly DataBag<MountXDisplayHotfix1100> MountXDisplayHotfixes1100 = new DataBag<MountXDisplayHotfix1100>(new List<SQLOutput> { SQLOutput.hotfixes });
public static readonly DataBag<MovieHotfix1100> MovieHotfixes1100 = new DataBag<MovieHotfix1100>(new List<SQLOutput> { SQLOutput.hotfixes });
Expand Down Expand Up @@ -2735,6 +2736,7 @@ public static void ClearContainers()
MawPowerHotfixes1100.Clear();
ModifierTreeHotfixes1100.Clear();
MountHotfixes1100.Clear();
MountEquipmentHotfixes1100.Clear();
MountCapabilityHotfixes1100.Clear();
MountTypeXCapabilityHotfixes1100.Clear();
MountXDisplayHotfixes1100.Clear();
Expand Down
18 changes: 18 additions & 0 deletions WowPacketParserModule.V11_0_0_55666/Parsers/HotfixHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4393,6 +4393,19 @@ public static void MountCapabilityHandler1100(Packet packet, uint entry, params
Storage.MountCapabilityHotfixes1100.Add(hotfix, packet.TimeSpan);
}

public static void MountEquipmentHandler1100(Packet packet, uint entry, params object[] indexes)
{
MountEquipmentHotfix1100 hotfix = new MountEquipmentHotfix1100();

hotfix.ID = entry;
hotfix.Item = packet.ReadInt32("Item", indexes);
hotfix.BuffSpell = packet.ReadInt32("BuffSpell", indexes);
hotfix.Unknown820 = packet.ReadInt32("Unknown820", indexes);
hotfix.LearnedBySpell = packet.ReadUInt32("LearnedBySpell", indexes);

Storage.MountEquipmentHotfixes1100.Add(hotfix, packet.TimeSpan);
}

public static void MountTypeXCapabilityHandler1100(Packet packet, uint entry, params object[] indexes)
{
MountTypeXCapabilityHotfix1100 hotfix = new MountTypeXCapabilityHotfix1100();
Expand Down Expand Up @@ -8447,6 +8460,11 @@ static void ReadHotfixData(Packet packet, List<HotfixRecord> records, params obj
MountCapabilityHandler1100(db2File, (uint)entry, count);
break;
}
case DB2Hash.MountEquipment:
{
MountEquipmentHandler1100(db2File, (uint)entry, count);
break;
}
case DB2Hash.MountTypeXCapability:
{
MountTypeXCapabilityHandler1100(db2File, (uint)entry, count);
Expand Down

0 comments on commit 30b1416

Please sign in to comment.