diff --git a/Source/Framework/Constants/CreatureConst.cs b/Source/Framework/Constants/CreatureConst.cs index fc5c0f0ce..5a6efd043 100644 --- a/Source/Framework/Constants/CreatureConst.cs +++ b/Source/Framework/Constants/CreatureConst.cs @@ -149,7 +149,7 @@ namespace Framework.Constants } public enum NPCFlags2 - { + { None = 0x00, ItemUpgradeMaster = 0x01, GarrisonArchitect = 0x02, @@ -394,4 +394,10 @@ namespace Framework.Constants Max } + + public enum VendorInventoryReason + { + None = 0, + Empty = 1 + } } diff --git a/Source/Game/Entities/Player/Player.cs b/Source/Game/Entities/Player/Player.cs index 119b2059e..ae0c0f586 100644 --- a/Source/Game/Entities/Player/Player.cs +++ b/Source/Game/Entities/Player/Player.cs @@ -2294,14 +2294,6 @@ namespace Game.Entities if (!IsDead()) canTalk = false; break; - case GossipOption.Vendor: - VendorItemData vendorItems = creature.GetVendorItems(); - if (vendorItems == null || vendorItems.Empty()) - { - Log.outError(LogFilter.Sql, "Creature (GUID: {0}, Entry: {1}) have UNIT_NPC_FLAG_VENDOR but have empty trading item list.", creature.GetGUID().ToString(), creature.GetEntry()); - canTalk = false; - } - break; case GossipOption.Learndualspec: canTalk = false; break; @@ -2324,8 +2316,9 @@ namespace Game.Entities case GossipOption.Questgiver: canTalk = false; break; - case GossipOption.Trainer: case GossipOption.Gossip: + case GossipOption.Vendor: + case GossipOption.Trainer: case GossipOption.Spiritguide: case GossipOption.Innkeeper: case GossipOption.Banker: diff --git a/Source/Game/Handlers/NPCHandler.cs b/Source/Game/Handlers/NPCHandler.cs index 536836b10..d154674c7 100644 --- a/Source/Game/Handlers/NPCHandler.cs +++ b/Source/Game/Handlers/NPCHandler.cs @@ -564,6 +564,8 @@ namespace Game break; } + packet.Reason = (byte)(count != 0 ? VendorInventoryReason.None : VendorInventoryReason.Empty); + SendPacket(packet); } }