diff options
| author | Machiavelli <none@none> | 2010-03-21 02:53:51 +0100 |
|---|---|---|
| committer | Machiavelli <none@none> | 2010-03-21 02:53:51 +0100 |
| commit | 4a406751afd6b1371b1919bf6d0a6f892d53ae33 (patch) | |
| tree | 267c50ce9f200ae69967fd1dc5ca577658b6e764 /src | |
| parent | dac3af89ec26f67a643d2c67f88b004e40dbd906 (diff) | |
Add some more function calls to remove refund referenced from player's m_refundableItems, preventing the triggering of an assert in _saveInventory.
--HG--
branch : trunk
Diffstat (limited to 'src')
| -rw-r--r-- | src/game/Item.cpp | 1 | ||||
| -rw-r--r-- | src/game/Player.cpp | 5 |
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() ); |
