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 Dec 2, 2024
1 parent 8221e34 commit 0566cc4
Show file tree
Hide file tree
Showing 5 changed files with 92 additions and 0 deletions.
14 changes: 14 additions & 0 deletions WowPacketParser/SQL/Builders/HotfixBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3327,6 +3327,13 @@ public static string Hotfixes()
sql += SQLUtil.Compare(Storage.CreatureFamilyHotfixes1100, hotfixes, StoreNameType.None);
}

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

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

if (!Storage.CreatureModelDataHotfixes1100.IsEmpty())
{
var hotfixes = SQLDatabase.Get(Storage.CreatureModelDataHotfixes1100, Settings.HotfixesDatabase);
Expand Down Expand Up @@ -3516,6 +3523,13 @@ public static string Hotfixes()
sql += SQLUtil.Compare(Storage.GameobjectDisplayInfoHotfixes1100, hotfixes, StoreNameType.None);
}

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

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

if (!Storage.GameobjectsHotfixes1100.IsEmpty())
{
var hotfixes = SQLDatabase.Get(Storage.GameobjectsHotfixes1100, Settings.HotfixesDatabase);
Expand Down
22 changes: 22 additions & 0 deletions WowPacketParser/Store/Objects/Hotfixes/11_X_X/CreatureLabel.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using WowPacketParser.Misc;
using WowPacketParser.SQL;

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

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

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

[DBFieldName("VerifiedBuild")]
public int? VerifiedBuild = ClientVersion.BuildInt;
}
}
22 changes: 22 additions & 0 deletions WowPacketParser/Store/Objects/Hotfixes/11_X_X/GameobjectLabel.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using WowPacketParser.Misc;
using WowPacketParser.SQL;

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

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

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

[DBFieldName("VerifiedBuild")]
public int? VerifiedBuild = ClientVersion.BuildInt;
}
}
4 changes: 4 additions & 0 deletions WowPacketParser/Store/Storage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,7 @@ public static class Storage
public static readonly DataBag<CreatureDisplayInfoHotfix1100> CreatureDisplayInfoHotfixes1100 = new DataBag<CreatureDisplayInfoHotfix1100>(new List<SQLOutput> { SQLOutput.hotfixes });
public static readonly DataBag<CreatureDisplayInfoExtraHotfix1100> CreatureDisplayInfoExtraHotfixes1100 = new DataBag<CreatureDisplayInfoExtraHotfix1100>(new List<SQLOutput> { SQLOutput.hotfixes });
public static readonly DataBag<CreatureFamilyHotfix1100> CreatureFamilyHotfixes1100 = new DataBag<CreatureFamilyHotfix1100>(new List<SQLOutput> { SQLOutput.hotfixes });
public static readonly DataBag<CreatureLabelHotfix1100> CreatureLabelHotfixes1100 = new DataBag<CreatureLabelHotfix1100>(new List<SQLOutput> { SQLOutput.hotfixes });
public static readonly DataBag<CreatureModelDataHotfix1100> CreatureModelDataHotfixes1100 = new DataBag<CreatureModelDataHotfix1100>(new List<SQLOutput> { SQLOutput.hotfixes });
public static readonly DataBag<CreatureTypeHotfix1100> CreatureTypeHotfixes1100 = new DataBag<CreatureTypeHotfix1100>(new List<SQLOutput> { SQLOutput.hotfixes });
public static readonly DataBag<CriteriaHotfix1100> CriteriaHotfixes1100 = new DataBag<CriteriaHotfix1100>(new List<SQLOutput> { SQLOutput.hotfixes });
Expand Down Expand Up @@ -660,6 +661,7 @@ public static class Storage
public static readonly DataBag<FriendshipReputationHotfix1100> FriendshipReputationHotfixes1100 = new DataBag<FriendshipReputationHotfix1100>(new List<SQLOutput> { SQLOutput.hotfixes });
public static readonly DataBag<GameobjectArtKitHotfix1100> GameobjectArtKitHotfixes1100 = new DataBag<GameobjectArtKitHotfix1100>(new List<SQLOutput> { SQLOutput.hotfixes });
public static readonly DataBag<GameobjectDisplayInfoHotfix1100> GameobjectDisplayInfoHotfixes1100 = new DataBag<GameobjectDisplayInfoHotfix1100>(new List<SQLOutput> { SQLOutput.hotfixes });
public static readonly DataBag<GameobjectLabelHotfix1100> GameobjectLabelHotfixes1100 = new DataBag<GameobjectLabelHotfix1100>(new List<SQLOutput> { SQLOutput.hotfixes });
public static readonly DataBag<GameobjectsHotfix1100> GameobjectsHotfixes1100 = new DataBag<GameobjectsHotfix1100>(new List<SQLOutput> { SQLOutput.hotfixes });
public static readonly DataBag<GarrAbilityHotfix1100> GarrAbilityHotfixes1100 = new DataBag<GarrAbilityHotfix1100>(new List<SQLOutput> { SQLOutput.hotfixes });
public static readonly DataBag<GarrBuildingHotfix1100> GarrBuildingHotfixes1100 = new DataBag<GarrBuildingHotfix1100>(new List<SQLOutput> { SQLOutput.hotfixes });
Expand Down Expand Up @@ -2613,6 +2615,7 @@ public static void ClearContainers()
CreatureDisplayInfoHotfixes1100.Clear();
CreatureDisplayInfoExtraHotfixes1100.Clear();
CreatureFamilyHotfixes1100.Clear();
CreatureLabelHotfixes1100.Clear();
CreatureModelDataHotfixes1100.Clear();
CreatureTypeHotfixes1100.Clear();
CriteriaHotfixes1100.Clear();
Expand Down Expand Up @@ -2640,6 +2643,7 @@ public static void ClearContainers()
FriendshipReputationHotfixes1100.Clear();
GameobjectArtKitHotfixes1100.Clear();
GameobjectDisplayInfoHotfixes1100.Clear();
GameobjectLabelHotfixes1100.Clear();
GameobjectsHotfixes1100.Clear();
GarrAbilityHotfixes1100.Clear();
GarrBuildingHotfixes1100.Clear();
Expand Down
30 changes: 30 additions & 0 deletions WowPacketParserModule.V11_0_0_55666/Parsers/HotfixHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1699,6 +1699,16 @@ public static void CreatureFamilyHandler1100(Packet packet, uint entry, params o
}
}

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

hotfix.ID = entry;
hotfix.LabelID = packet.ReadInt32("LabelID", indexes);
hotfix.CreatureDifficultyID = packet.ReadUInt32("CreatureDifficultyID", indexes);
Storage.CreatureLabelHotfixes1100.Add(hotfix, packet.TimeSpan);
}

public static void CreatureModelDataHandler1100(Packet packet, uint entry, params object[] indexes)
{
CreatureModelDataHotfix1100 hotfix = new CreatureModelDataHotfix1100();
Expand Down Expand Up @@ -2350,6 +2360,16 @@ public static void GameobjectDisplayInfoHandler1100(Packet packet, uint entry, p
Storage.GameobjectDisplayInfoHotfixes1100.Add(hotfix, packet.TimeSpan);
}

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

hotfix.ID = entry;
hotfix.LabelID = packet.ReadInt32("LabelID", indexes);
hotfix.GameObjectID = packet.ReadUInt32("GameObjectID", indexes);
Storage.GameobjectLabelHotfixes1100.Add(hotfix, packet.TimeSpan);
}

public static void GameobjectsHandler1100(Packet packet, uint entry, params object[] indexes)
{
GameobjectsHotfix1100 hotfix = new GameobjectsHotfix1100();
Expand Down Expand Up @@ -7854,6 +7874,11 @@ static void ReadHotfixData(Packet packet, List<HotfixRecord> records, params obj
CreatureFamilyHandler1100(db2File, (uint)entry, count);
break;
}
case DB2Hash.CreatureLabel:
{
CreatureLabelHandler1100(db2File, (uint)entry, count);
break;
}
case DB2Hash.CreatureModelData:
{
CreatureModelDataHandler1100(db2File, (uint)entry, count);
Expand Down Expand Up @@ -7985,6 +8010,11 @@ static void ReadHotfixData(Packet packet, List<HotfixRecord> records, params obj
GameobjectDisplayInfoHandler1100(db2File, (uint)entry, count);
break;
}
case DB2Hash.GameobjectLabel:
{
GameobjectLabelHandler1100(db2File, (uint)entry, count);
break;
}
case DB2Hash.Gameobjects:
{
GameobjectsHandler1100(db2File, (uint)entry, count);
Expand Down

0 comments on commit 0566cc4

Please sign in to comment.