[Fix] Auctionhouse item loss #5428

Closed
Elron103 opened this Issue Feb 25, 2012 · 0 comments

Projects

None yet

2 participants

@Elron103

Description

Commit 15a2acf implemented the new packet structure for creating auctions. But it also implemented a heavy bug.

When inserting multiple stacks as an auction, the new method is not able to create the new entries in the item_instance table. This results in a heavy loss of items, since the server is not able to link the entries in auctionhouse with the item_instance anymore.

We get a lot of invalid auctions, select query:

select * from characters.auctionhouse where itemguid not in (select guid from characters.item_instance);

Revisions

Trinity: f0f68f1
Database: TDB rev. 46

Fix

http://paste2.org/p/1915792

diff -r 486cac4b9a9a src/server/game/Handlers/AuctionHouseHandler.cpp
--- a/src/server/game/Handlers/AuctionHouseHandler.cpp  Sat Feb 25 00:26:02 2012 +0100
+++ b/src/server/game/Handlers/AuctionHouseHandler.cpp  Sat Feb 25 22:08:27 2012 +0100
@@ -341,6 +341,7 @@ void WorldSession::HandleAuctionSellItem
             }

             SQLTransaction trans = CharacterDatabase.BeginTransaction();
+            newItem->SaveToDB(trans);
             AH->SaveToDB(trans);
             _player->SaveInventoryAndGoldToDB(trans);
             CharacterDatabase.CommitTransaction(trans);
@Shocker Shocker closed this in 7e4fa91 Feb 26, 2012
@Elron103 Elron103 added a commit that referenced this issue Feb 26, 2012
@Shocker Shocker Core/Auction House: Fix item loss issue when inserting multiple stack…
…s (by Elron103)

Closes #5428
eccc1ee
@sinakal sinakal pushed a commit to sinakal/bombay that referenced this issue Mar 3, 2012
@Shocker Shocker Core/Auction House: Fix item loss issue when inserting multiple stack…
…s (by Elron103)

Closes #5428

Signed-off-by: Xanvial <xanvial@gmail.com>
0f9ef05
@Asido Asido pushed a commit to Asido/TrinityCore that referenced this issue Mar 12, 2012
@Shocker Shocker Core/Auction House: Fix item loss issue when inserting multiple stack…
…s (by Elron103)

Closes #5428
e3f6bb7
@raczman raczman pushed a commit to raczman/TrinityCore that referenced this issue Apr 20, 2014
@Shocker Shocker Core/Auction House: Fix item loss issue when inserting multiple stack…
…s (by Elron103)

Closes #5428
36327f8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment