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
This commit is contained in:
@@ -629,6 +629,7 @@ void Item::SetState(ItemUpdateState state, Player *forplayer)
|
|||||||
{
|
{
|
||||||
// pretend the item never existed
|
// pretend the item never existed
|
||||||
RemoveFromUpdateQueueOf(forplayer);
|
RemoveFromUpdateQueueOf(forplayer);
|
||||||
|
forplayer->SetNotRefundable(GetGUID());
|
||||||
delete this;
|
delete this;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -11245,6 +11245,7 @@ Item* Player::_StoreItem( uint16 pos, Item *pItem, uint32 count, bool clone, boo
|
|||||||
RemoveItemDurations(pItem);
|
RemoveItemDurations(pItem);
|
||||||
|
|
||||||
pItem->SetOwnerGUID(GetGUID()); // prevent error at next SetState in case trade/mail/buy from vendor
|
pItem->SetOwnerGUID(GetGUID()); // prevent error at next SetState in case trade/mail/buy from vendor
|
||||||
|
pItem->SetNotRefundable(this);
|
||||||
pItem->SetState(ITEM_REMOVED, this);
|
pItem->SetState(ITEM_REMOVED, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -11361,6 +11362,7 @@ Item* Player::EquipItem( uint16 pos, Item *pItem, bool update )
|
|||||||
RemoveItemDurations(pItem);
|
RemoveItemDurations(pItem);
|
||||||
|
|
||||||
pItem->SetOwnerGUID(GetGUID()); // prevent error at next SetState in case trade/mail/buy from vendor
|
pItem->SetOwnerGUID(GetGUID()); // prevent error at next SetState in case trade/mail/buy from vendor
|
||||||
|
pItem->SetNotRefundable(this);
|
||||||
pItem->SetState(ITEM_REMOVED, this);
|
pItem->SetState(ITEM_REMOVED, this);
|
||||||
pItem2->SetState(ITEM_CHANGED, this);
|
pItem2->SetState(ITEM_CHANGED, this);
|
||||||
|
|
||||||
@@ -11579,7 +11581,6 @@ void Player::DestroyItem(uint8 bag, uint8 slot, bool update)
|
|||||||
RemoveEnchantmentDurations(pItem);
|
RemoveEnchantmentDurations(pItem);
|
||||||
RemoveItemDurations(pItem);
|
RemoveItemDurations(pItem);
|
||||||
|
|
||||||
if (pItem->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAGS_REFUNDABLE))
|
|
||||||
pItem->SetNotRefundable(this);
|
pItem->SetNotRefundable(this);
|
||||||
|
|
||||||
ItemRemovedQuestCheck( pItem->GetEntry(), pItem->GetCount() );
|
ItemRemovedQuestCheck( pItem->GetEntry(), pItem->GetCount() );
|
||||||
|
|||||||
Reference in New Issue
Block a user