From 503bd57fe0996841ebe9ca2ae66a0748b3f4bb0e Mon Sep 17 00:00:00 2001 From: hondacrx Date: Sun, 11 Sep 2022 14:29:17 -0400 Subject: [PATCH] Core/Gossip: Fixed loading ActionPoiID data Port From (https://github.com/TrinityCore/TrinityCore/commit/1521a0d1312dff7599348f0d271b8605b034c127) --- Source/Game/Globals/ObjectManager.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Source/Game/Globals/ObjectManager.cs b/Source/Game/Globals/ObjectManager.cs index e7b959ff3..d5755a232 100644 --- a/Source/Game/Globals/ObjectManager.cs +++ b/Source/Game/Globals/ObjectManager.cs @@ -637,11 +637,15 @@ namespace Game if (gMenuItem.ActionPoiId != 0) { if (gMenuItem.OptionNpc != GossipOptionNpc.None) + { Log.outError(LogFilter.Sql, $"Table `gossip_menu_option` for menu {gMenuItem.MenuId}, id {gMenuItem.OptionId} can not use ActionPoiID for GossipOptionNpc different from GossipOptionNpc.None, ignoring"); + gMenuItem.ActionPoiId = 0; + } else if (GetPointOfInterest(gMenuItem.ActionPoiId) == null) + { Log.outError(LogFilter.Sql, $"Table `gossip_menu_option` for menu {gMenuItem.MenuId}, id {gMenuItem.OptionId} use non-existing ActionPoiID {gMenuItem.ActionPoiId}, ignoring"); - - gMenuItem.ActionPoiId = 0; + gMenuItem.ActionPoiId = 0; + } } if (gMenuItem.BoxBroadcastTextId != 0)