Core/Quests: Implemented QUEST_OBJECTIVE_FLAG_2_QUEST_BOUND_ITEM that makes required items not be stored in inventory
Port From (https://github.com/TrinityCore/TrinityCore/commit/4dce6ab228c54319032b346d2d791262eac3d9cd)
This commit is contained in:
@@ -447,7 +447,10 @@ namespace Game
|
||||
|
||||
// now move item from loot to target inventory
|
||||
Item newitem = target.StoreNewItem(dest, item.itemid, true, item.randomBonusListId, item.GetAllowedLooters(), item.context, item.BonusListIDs);
|
||||
aeResult.Add(newitem, item.count, loot.loot_type, loot.GetDungeonEncounterId());
|
||||
if (newitem != null)
|
||||
aeResult.Add(newitem, item.count, loot.loot_type, loot.GetDungeonEncounterId());
|
||||
else
|
||||
target.ApplyItemLootedSpell(Global.ObjectMgr.GetItemTemplate(item.itemid));
|
||||
|
||||
// mark as looted
|
||||
item.count = 0;
|
||||
|
||||
@@ -181,9 +181,12 @@ namespace Game
|
||||
}
|
||||
|
||||
Item item = player.StoreNewItem(dest, itemVS.ItemEntry, true, itemVS.RandomBonusListId, null, itemVS.Context, itemVS.BonusListIDs);
|
||||
item.SetCreator(itemVS.CreatorGuid);
|
||||
item.SetBinding(true);
|
||||
GetCollectionMgr().AddItemAppearance(item);
|
||||
if (item != null)
|
||||
{
|
||||
item.SetCreator(itemVS.CreatorGuid);
|
||||
item.SetBinding(true);
|
||||
GetCollectionMgr().AddItemAppearance(item);
|
||||
}
|
||||
|
||||
voidStorageTransferChanges.RemovedItems.Add(ObjectGuid.Create(HighGuid.Item, itemVS.ItemId));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user