From 613fa25096dd999bcd9dfb62afb21a4e5cfcf03e Mon Sep 17 00:00:00 2001 From: hondacrx Date: Fri, 17 Dec 2021 17:47:14 -0500 Subject: [PATCH] Core/Player: allow AutoStoreLoot to specify if the looted item should be shown as if created by the player. Port From (https://github.com/TrinityCore/TrinityCore/commit/81a8366ce5659f3556a0b910a0437256d95b62f9) --- Source/Game/Entities/Player/Player.Items.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Game/Entities/Player/Player.Items.cs b/Source/Game/Entities/Player/Player.Items.cs index 862588c20..58c1949ac 100644 --- a/Source/Game/Entities/Player/Player.Items.cs +++ b/Source/Game/Entities/Player/Player.Items.cs @@ -5774,8 +5774,8 @@ namespace Game.Entities pItem.SetState(ItemUpdateState.Changed, this); } } - public void AutoStoreLoot(uint loot_id, LootStore store, ItemContext context = 0, bool broadcast = false) { AutoStoreLoot(ItemConst.NullBag, ItemConst.NullSlot, loot_id, store, context, broadcast); } - void AutoStoreLoot(byte bag, byte slot, uint loot_id, LootStore store, ItemContext context = 0, bool broadcast = false) + public void AutoStoreLoot(uint loot_id, LootStore store, ItemContext context = 0, bool broadcast = false, bool createdByPlayer = false) { AutoStoreLoot(ItemConst.NullBag, ItemConst.NullSlot, loot_id, store, context, broadcast); } + void AutoStoreLoot(byte bag, byte slot, uint loot_id, LootStore store, ItemContext context = 0, bool broadcast = false, bool createdByPlayer = false) { Loot loot = new(); loot.FillLoot(loot_id, store, this, true, false, LootModes.Default, context); @@ -5798,7 +5798,7 @@ namespace Game.Entities } Item pItem = StoreNewItem(dest, lootItem.itemid, true, lootItem.randomBonusListId, null, lootItem.context, lootItem.BonusListIDs); - SendNewItem(pItem, lootItem.count, false, false, broadcast); + SendNewItem(pItem, lootItem.count, false, createdByPlayer, broadcast); } }