Core/Items: Add ItemContext param to Item::Create function
Port From (https://github.com/TrinityCore/TrinityCore/commit/0a2d9ad2f7673e2b7ee62b7cc6f1a19639d37864)
This commit is contained in:
@@ -610,7 +610,7 @@ namespace Game
|
||||
}
|
||||
|
||||
Item bodyItem = new Item(); // This is not bag and then can be used new Item.
|
||||
if (!bodyItem.Create(Global.ObjectMgr.GetGenerator(HighGuid.Item).Generate(), 8383, player))
|
||||
if (!bodyItem.Create(Global.ObjectMgr.GetGenerator(HighGuid.Item).Generate(), 8383, ItemContext.None, player))
|
||||
return;
|
||||
|
||||
// in mail template case we need create new item text
|
||||
|
||||
@@ -696,7 +696,7 @@ namespace Game
|
||||
List<ItemPosCount> dest = new List<ItemPosCount>();
|
||||
if (_player.CanStoreNewItem(ItemConst.NullBag, ItemConst.NullSlot, dest, item.Id, (uint)item.Quantity) == InventoryResult.Ok)
|
||||
{
|
||||
Item newItem = _player.StoreNewItem(dest, item.Id, true, ItemEnchantmentManager.GenerateItemRandomBonusListId(item.Id), null, 0, item.BonusListIDs);
|
||||
Item newItem = _player.StoreNewItem(dest, item.Id, true, ItemEnchantmentManager.GenerateItemRandomBonusListId(item.Id), null, ItemContext.QuestReward, item.BonusListIDs);
|
||||
_player.SendNewItem(newItem, (uint)item.Quantity, true, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@ namespace Game
|
||||
|
||||
VoidStorageItem itemVS = new VoidStorageItem(Global.ObjectMgr.GenerateVoidStorageItemId(), item.GetEntry(), item.GetCreator(),
|
||||
item.GetItemRandomBonusListId(), item.GetModifier(ItemModifier.TimewalkerLevel), item.GetModifier(ItemModifier.ArtifactKnowledgeLevel),
|
||||
(byte)item.m_itemData.Context, item.m_itemData.BonusListIDs);
|
||||
item.GetContext(), item.m_itemData.BonusListIDs);
|
||||
|
||||
VoidItem voidItem;
|
||||
voidItem.Guid = ObjectGuid.Create(HighGuid.Item, itemVS.ItemId);
|
||||
|
||||
Reference in New Issue
Block a user