Skip to content

Commit

Permalink
Fix Null Reference issues on gossip parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
funjoker committed Sep 24, 2024
1 parent 3953347 commit b977714
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
6 changes: 0 additions & 6 deletions WowPacketParser/Parsing/Parsers/NpcHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,6 @@ public static void UpdateTempGossipOptionActionPOI(TimeSpan timeSpan, object gos
LastGossipOption.ActionPoiId = gossipPOIID;
TempGossipOptionPOI.ActionPoiId = gossipPOIID;

if (!Settings.SQLOutputFlag.HasAnyFlagBit(SQLOutput.gossip_menu_option))
return;

if (!TempGossipOptionPOI.HasSelection)
return;

Expand All @@ -100,9 +97,6 @@ public static void UpdateTempGossipOptionActionPOI(TimeSpan timeSpan, object gos

public static void UpdateLastGossipOptionActionMessage(TimeSpan timeSpan, uint? menuId)
{
if (!Settings.SQLOutputFlag.HasAnyFlagBit(SQLOutput.gossip_menu_option))
return;

if (!LastGossipOption.HasSelection)
return;

Expand Down
4 changes: 2 additions & 2 deletions WowPacketParser/Store/Storage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ public static class Storage
public static readonly DataBag<GossipMenu> Gossips = new DataBag<GossipMenu>(new List<SQLOutput> { SQLOutput.gossip_menu });
public static readonly DataBag<GossipMenu925> Gossips925 = new DataBag<GossipMenu925>(new List<SQLOutput> { SQLOutput.gossip_menu });
public static readonly DataBag<GossipMenuAddon> GossipMenuAddons = new DataBag<GossipMenuAddon>(new List<SQLOutput> { SQLOutput.gossip_menu_addon });
public static readonly StoreDictionary<(uint?, uint?), GossipMenuOption> GossipMenuOptions = new StoreDictionary<(uint?, uint?), GossipMenuOption>(new List<SQLOutput> { SQLOutput.gossip_menu_option });
public static readonly StoreDictionary<(uint?, uint?), GossipMenuOption> GossipMenuOptions = new StoreDictionary<(uint?, uint?), GossipMenuOption>(new List<SQLOutput>());
public static readonly DataBag<GossipMenuOptionAddon> GossipMenuOptionAddons = new DataBag<GossipMenuOptionAddon>(new List<SQLOutput> { SQLOutput.gossip_menu_option });
public static readonly StoreDictionary<(uint /*menuId*/, int /*gossipOptionId*/), uint /*orderIndex*/> GossipOptionIdToOrderIndexMap = new(new List<SQLOutput> { SQLOutput.gossip_menu_option });
public static readonly StoreDictionary<(uint /*menuId*/, int /*gossipOptionId*/), uint /*orderIndex*/> GossipOptionIdToOrderIndexMap = new(new List<SQLOutput>());

// Quest POI (QuestId, Id)
public static readonly DataBag<QuestPOI> QuestPOIs = new DataBag<QuestPOI>(new List<SQLOutput> { SQLOutput.quest_poi_points });
Expand Down

0 comments on commit b977714

Please sign in to comment.