[11703] Proper way create items in Item::CreateItem/CloneItem for items not for inventory

Old code way work not allow create item without providing targeting player.
In result creating item that will not placed to inventory required additional hacks
for undo redundent links to player structures.
This commit is contained in:
VladimirMangos 2011-07-02 01:03:48 +04:00
parent cc11366d6b
commit 0daf12a348
3 changed files with 7 additions and 5 deletions

View file

@ -364,8 +364,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data)
if (!pl->HasItemCount(it->GetEntry(), stackSize)) // not enough items
continue;
Item *newItem = it->CloneItem(stackSize, pl);
newItem->RemoveFromUpdateQueueOf(pl); // item not planned to adding to inventory
Item *newItem = it->CloneItem(stackSize);
pl->DestroyItemCount(it, stackSize, true);