mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 01:37:37 +01:00
Core/AuctionHouse: Partially revert 3cf2600688 to keep compatibility with the "AHBot patch"
Note: Trinity needs/wants an auction house bot in the core but for that to happen AHBot needs to be rewritten (possibly using Mango's implementation as a base)
This commit is contained in:
@@ -411,7 +411,7 @@ void AuctionHouseObject::AddAuction(AuctionEntry* auction)
|
||||
sScriptMgr->OnAuctionAdd(this, auction);
|
||||
}
|
||||
|
||||
bool AuctionHouseObject::RemoveAuction(AuctionEntry* auction)
|
||||
bool AuctionHouseObject::RemoveAuction(AuctionEntry* auction, uint32 /*itemEntry*/)
|
||||
{
|
||||
bool wasInMap = AuctionsMap.erase(auction->Id) ? true : false;
|
||||
|
||||
@@ -467,12 +467,14 @@ void AuctionHouseObject::Update()
|
||||
sScriptMgr->OnAuctionSuccessful(this, auction);
|
||||
}
|
||||
|
||||
uint32 itemEntry = auction->itemEntry;
|
||||
|
||||
///- In any case clear the auction
|
||||
auction->DeleteFromDB(trans);
|
||||
CharacterDatabase.CommitTransaction(trans);
|
||||
|
||||
sAuctionMgr->RemoveAItem(auction->itemGUIDLow);
|
||||
RemoveAuction(auction);
|
||||
RemoveAuction(auction, itemEntry);
|
||||
}
|
||||
while (result->NextRow());
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ class AuctionHouseObject
|
||||
|
||||
void AddAuction(AuctionEntry* auction);
|
||||
|
||||
bool RemoveAuction(AuctionEntry* auction);
|
||||
bool RemoveAuction(AuctionEntry* auction, uint32 itemEntry);
|
||||
|
||||
void Update();
|
||||
|
||||
|
||||
@@ -473,8 +473,9 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket& recvData)
|
||||
|
||||
auction->DeleteFromDB(trans);
|
||||
|
||||
uint32 itemEntry = auction->itemEntry;
|
||||
sAuctionMgr->RemoveAItem(auction->itemGUIDLow);
|
||||
auctionHouse->RemoveAuction(auction);
|
||||
auctionHouse->RemoveAuction(auction, itemEntry);
|
||||
}
|
||||
player->SaveInventoryAndGoldToDB(trans);
|
||||
CharacterDatabase.CommitTransaction(trans);
|
||||
@@ -552,8 +553,9 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket& recvData)
|
||||
auction->DeleteFromDB(trans);
|
||||
CharacterDatabase.CommitTransaction(trans);
|
||||
|
||||
uint32 itemEntry = auction->itemEntry;
|
||||
sAuctionMgr->RemoveAItem(auction->itemGUIDLow);
|
||||
auctionHouse->RemoveAuction(auction);
|
||||
auctionHouse->RemoveAuction(auction, itemEntry);
|
||||
}
|
||||
|
||||
//called when player lists his bids
|
||||
|
||||
Reference in New Issue
Block a user