- More changes to the item handling system to prevent an item still being listed in a player's refundable storage

- Remove an assert in _SaveInventory(). Instead, I added an error log and manual removal. Please post these error logs should they occur
- In _LoadInventory, also check for player_guid when loading refund data

--HG--
branch : trunk
This commit is contained in:
Machiavelli
2010-03-21 16:50:04 +01:00
parent 74a2957af5
commit 13024dee64
2 changed files with 0 additions and 3 deletions
-1
View File
@@ -1516,5 +1516,4 @@ void WorldSession::HandleItemRefund(WorldPacket &recv_data)
uint32 arenaRefund = iece->reqarenapoints; uint32 arenaRefund = iece->reqarenapoints;
if (arenaRefund) if (arenaRefund)
_player->ModifyArenaPoints(arenaRefund); _player->ModifyArenaPoints(arenaRefund);
} }
-2
View File
@@ -371,14 +371,12 @@ void WorldSession::HandleAcceptTradeOpcode(WorldPacket& /*recvPacket*/)
if (myItems[i]) if (myItems[i])
{ {
myItems[i]->SetUInt64Value( ITEM_FIELD_GIFTCREATOR, _player->GetGUID()); myItems[i]->SetUInt64Value( ITEM_FIELD_GIFTCREATOR, _player->GetGUID());
myItems[i]->SetNotRefundable(_player, false);
iPtr = _player->GetItemByGuid(_player->tradeItems[i]); iPtr = _player->GetItemByGuid(_player->tradeItems[i]);
_player->MoveItemFromInventory(iPtr->GetBagSlot(), iPtr->GetSlot(), true); _player->MoveItemFromInventory(iPtr->GetBagSlot(), iPtr->GetSlot(), true);
} }
if (hisItems[i]) if (hisItems[i])
{ {
hisItems[i]->SetUInt64Value( ITEM_FIELD_GIFTCREATOR,_player->pTrader->GetGUID()); hisItems[i]->SetUInt64Value( ITEM_FIELD_GIFTCREATOR,_player->pTrader->GetGUID());
hisItems[i]->SetNotRefundable(_player->pTrader, false);
iPtr = _player->pTrader->GetItemByGuid(_player->pTrader->tradeItems[i]); iPtr = _player->pTrader->GetItemByGuid(_player->pTrader->tradeItems[i]);
_player->pTrader->MoveItemFromInventory(iPtr->GetBagSlot(), iPtr->GetSlot(), true); _player->pTrader->MoveItemFromInventory(iPtr->GetBagSlot(), iPtr->GetSlot(), true);
} }