From 08e47f5c28438edd675518063cbb3854bb8160f4 Mon Sep 17 00:00:00 2001 From: Hondacrx Date: Thu, 21 Aug 2025 22:27:11 -0400 Subject: [PATCH] Core/Items: Send CreateObject for items in buyback inventory slots Port From (https://github.com/TrinityCore/TrinityCore/commit/782ee42989821d551f5d2bce2d231e38ed360dce) --- Source/Game/Entities/Player/Player.cs | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/Source/Game/Entities/Player/Player.cs b/Source/Game/Entities/Player/Player.cs index a471ad6d0..c8f9c7c76 100644 --- a/Source/Game/Entities/Player/Player.cs +++ b/Source/Game/Entities/Player/Player.cs @@ -2935,9 +2935,9 @@ namespace Game.Entities if (!handled) { - PlayerInteractionType[] GossipOptionNpcToInteractionType = - [ - PlayerInteractionType.None, PlayerInteractionType.Vendor, PlayerInteractionType.TaxiNode, + PlayerInteractionType[] GossipOptionNpcToInteractionType = + [ + PlayerInteractionType.None, PlayerInteractionType.Vendor, PlayerInteractionType.TaxiNode, PlayerInteractionType.Trainer, PlayerInteractionType.SpiritHealer, PlayerInteractionType.Binder, PlayerInteractionType.Banker, PlayerInteractionType.PetitionVendor, PlayerInteractionType.GuildTabardVendor, PlayerInteractionType.BattleMaster, PlayerInteractionType.Auctioneer, PlayerInteractionType.TalentMaster, @@ -2959,7 +2959,7 @@ namespace Game.Entities PlayerInteractionType.AccountBanker, PlayerInteractionType.ProfessionRespec, PlayerInteractionType.PlaceholderType72, PlayerInteractionType.PlaceholderType75, PlayerInteractionType.PlaceholderType76, PlayerInteractionType.GuildRename, PlayerInteractionType.PlaceholderType77, PlayerInteractionType.ItemUpgrade - ]; + ]; PlayerInteractionType interactionType = GossipOptionNpcToInteractionType[(int)gossipOptionNpc]; if (interactionType != PlayerInteractionType.None) @@ -8091,21 +8091,8 @@ namespace Game.Entities { if (target == this) { - for (byte i = EquipmentSlot.Start; i < InventorySlots.BankBagEnd; ++i) - { - if (m_items[i] == null) - continue; - - m_items[i].BuildCreateUpdateBlockForPlayer(data, target); - } - - for (byte i = InventorySlots.ReagentStart; i < InventorySlots.ChildEquipmentEnd; ++i) - { - if (m_items[i] == null) - continue; - - m_items[i].BuildCreateUpdateBlockForPlayer(data, target); - } + foreach (Item item in m_items) + item?.BuildCreateUpdateBlockForPlayer(data, target); } base.BuildCreateUpdateBlockForPlayer(data, target);