Skip to content

Commit 70ddb07

Browse files
committed
Core/Items: Allow moving openable items that have been opened once (except currently opened item)
Closes #30686 Closes #31184
1 parent 1938299 commit 70ddb07

1 file changed

Lines changed: 6 additions & 10 deletions

File tree

src/server/game/Entities/Player/Player.cpp

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10376,8 +10376,8 @@ InventoryResult Player::CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &des
1037610376

1037710377
if (pItem)
1037810378
{
10379-
// item used
10380-
if (pItem->m_lootGenerated)
10379+
// swapping/merging with currently looted item
10380+
if (GetLootGUID() == pItem->GetGUID())
1038110381
{
1038210382
if (no_space_count)
1038310383
*no_space_count = count;
@@ -10880,8 +10880,7 @@ InventoryResult Player::CanStoreItems(Item** items, int count, uint32* itemLimit
1088010880
if (!pProto)
1088110881
return EQUIP_ERR_ITEM_NOT_FOUND;
1088210882

10883-
// item used
10884-
if (item->m_lootGenerated)
10883+
if (item->m_lootGenerated || GetLootGUID() == item->GetGUID())
1088510884
return EQUIP_ERR_LOOT_GONE;
1088610885

1088710886
// item it 'bind'
@@ -11130,8 +11129,7 @@ InventoryResult Player::CanEquipItem(uint8 slot, uint16 &dest, Item* pItem, bool
1113011129
ItemTemplate const* pProto = pItem->GetTemplate();
1113111130
if (pProto)
1113211131
{
11133-
// item used
11134-
if (pItem->m_lootGenerated)
11132+
if (GetLootGUID() == pItem->GetGUID())
1113511133
return EQUIP_ERR_LOOT_GONE;
1113611134

1113711135
if (pItem->IsBindedNotWith(this))
@@ -11297,8 +11295,7 @@ InventoryResult Player::CanUnequipItem(uint16 pos, bool swap) const
1129711295
if (!pProto)
1129811296
return EQUIP_ERR_ITEM_NOT_FOUND;
1129911297

11300-
// item used
11301-
if (pItem->m_lootGenerated)
11298+
if (GetLootGUID() == pItem->GetGUID())
1130211299
return EQUIP_ERR_LOOT_GONE;
1130311300

1130411301
if (IsCharmed())
@@ -11336,8 +11333,7 @@ InventoryResult Player::CanBankItem(uint8 bag, uint8 slot, ItemPosCountVec &dest
1133611333
if (!pProto)
1133711334
return swap ? EQUIP_ERR_CANT_SWAP : EQUIP_ERR_ITEM_NOT_FOUND;
1133811335

11339-
// item used
11340-
if (pItem->m_lootGenerated)
11336+
if (GetLootGUID() == pItem->GetGUID())
1134111337
return EQUIP_ERR_LOOT_GONE;
1134211338

1134311339
if (pItem->IsBindedNotWith(this))

0 commit comments

Comments
 (0)