Core/Items: Add ItemContext param to Item::Create function

Port From (https://github.com/TrinityCore/TrinityCore/commit/0a2d9ad2f7673e2b7ee62b7cc6f1a19639d37864)
This commit is contained in:
hondacrx
2019-11-23 00:44:38 -05:00
parent 796c11795f
commit 63105504a4
27 changed files with 119 additions and 109 deletions
+2 -1
View File
@@ -70,7 +70,7 @@ namespace Game.Entities
base.RemoveFromWorld();
}
public override bool Create(ulong guidlow, uint itemid, Player owner)
public override bool Create(ulong guidlow, uint itemid, ItemContext context, Player owner)
{
var itemProto = Global.ObjectMgr.GetItemTemplate(itemid);
@@ -93,6 +93,7 @@ namespace Game.Entities
SetUpdateFieldValue(m_values.ModifyValue(m_itemData).ModifyValue(m_itemData.MaxDurability), itemProto.MaxDurability);
SetDurability(itemProto.MaxDurability);
SetCount(1);
SetContext(context);
// Setting the number of Slots the Container has
SetBagSize(itemProto.GetContainerSlots());