aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Player/Player.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 10f9aeffe15..f26b01dc58a 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -10376,8 +10376,8 @@ InventoryResult Player::CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &des
if (pItem)
{
- // item used
- if (pItem->m_lootGenerated)
+ // swapping/merging with currently looted item
+ if (GetLootGUID() == pItem->GetGUID())
{
if (no_space_count)
*no_space_count = count;
@@ -10880,8 +10880,7 @@ InventoryResult Player::CanStoreItems(Item** items, int count, uint32* itemLimit
if (!pProto)
return EQUIP_ERR_ITEM_NOT_FOUND;
- // item used
- if (item->m_lootGenerated)
+ if (item->m_lootGenerated || GetLootGUID() == item->GetGUID())
return EQUIP_ERR_LOOT_GONE;
// item it 'bind'
@@ -11130,8 +11129,7 @@ InventoryResult Player::CanEquipItem(uint8 slot, uint16 &dest, Item* pItem, bool
ItemTemplate const* pProto = pItem->GetTemplate();
if (pProto)
{
- // item used
- if (pItem->m_lootGenerated)
+ if (GetLootGUID() == pItem->GetGUID())
return EQUIP_ERR_LOOT_GONE;
if (pItem->IsBindedNotWith(this))
@@ -11297,8 +11295,7 @@ InventoryResult Player::CanUnequipItem(uint16 pos, bool swap) const
if (!pProto)
return EQUIP_ERR_ITEM_NOT_FOUND;
- // item used
- if (pItem->m_lootGenerated)
+ if (GetLootGUID() == pItem->GetGUID())
return EQUIP_ERR_LOOT_GONE;
if (IsCharmed())
@@ -11336,8 +11333,7 @@ InventoryResult Player::CanBankItem(uint8 bag, uint8 slot, ItemPosCountVec &dest
if (!pProto)
return swap ? EQUIP_ERR_CANT_SWAP : EQUIP_ERR_ITEM_NOT_FOUND;
- // item used
- if (pItem->m_lootGenerated)
+ if (GetLootGUID() == pItem->GetGUID())
return EQUIP_ERR_LOOT_GONE;
if (pItem->IsBindedNotWith(this))