aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/Item.cpp1
-rw-r--r--src/game/Player.cpp5
2 files changed, 4 insertions, 2 deletions
diff --git a/src/game/Item.cpp b/src/game/Item.cpp
index 024e7138c13..35db772e845 100644
--- a/src/game/Item.cpp
+++ b/src/game/Item.cpp
@@ -629,6 +629,7 @@ void Item::SetState(ItemUpdateState state, Player *forplayer)
{
// pretend the item never existed
RemoveFromUpdateQueueOf(forplayer);
+ forplayer->SetNotRefundable(GetGUID());
delete this;
return;
}
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 8def5f05d35..9fbc4c170f5 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -11245,6 +11245,7 @@ Item* Player::_StoreItem( uint16 pos, Item *pItem, uint32 count, bool clone, boo
RemoveItemDurations(pItem);
pItem->SetOwnerGUID(GetGUID()); // prevent error at next SetState in case trade/mail/buy from vendor
+ pItem->SetNotRefundable(this);
pItem->SetState(ITEM_REMOVED, this);
}
@@ -11361,6 +11362,7 @@ Item* Player::EquipItem( uint16 pos, Item *pItem, bool update )
RemoveItemDurations(pItem);
pItem->SetOwnerGUID(GetGUID()); // prevent error at next SetState in case trade/mail/buy from vendor
+ pItem->SetNotRefundable(this);
pItem->SetState(ITEM_REMOVED, this);
pItem2->SetState(ITEM_CHANGED, this);
@@ -11579,8 +11581,7 @@ void Player::DestroyItem(uint8 bag, uint8 slot, bool update)
RemoveEnchantmentDurations(pItem);
RemoveItemDurations(pItem);
- if (pItem->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAGS_REFUNDABLE))
- pItem->SetNotRefundable(this);
+ pItem->SetNotRefundable(this);
ItemRemovedQuestCheck( pItem->GetEntry(), pItem->GetCount() );