mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[10254] Remove dependence auction data from auctioneer guid.
* Field `auctioneerguid` replaced by `houseid` and table reanmed to `auction` (it list auctions and `id` is auction id). * Update related code. * SQL update fill `houseid` field by old `auctioneerguid` BUT: SQL update expect that you world DB named `mangos`. If this not true for your case you need modify SQL update BEFORE APPLY in 2 placed in part "mangos.creature AS c, mangos.creature_template AS ct" * Another small possitive result: now possible easy select auctions related to some auction store (1-3 is one team actions, 4-6 another team auction, and 7 is neutral auction store for both teams
This commit is contained in:
parent
6c6ce87867
commit
e3befa2072
10 changed files with 54 additions and 39 deletions
|
|
@ -258,7 +258,6 @@ void WorldSession::HandleAuctionSellItem( WorldPacket & recv_data )
|
|||
|
||||
AuctionEntry *AH = new AuctionEntry;
|
||||
AH->Id = sObjectMgr.GenerateAuctionID();
|
||||
AH->auctioneer = auctioneerGuid.GetCounter();
|
||||
AH->item_guidlow = GUID_LOPART(item);
|
||||
AH->item_template = it->GetEntry();
|
||||
AH->owner = pl->GetGUIDLow();
|
||||
|
|
@ -377,7 +376,7 @@ void WorldSession::HandleAuctionPlaceBid( WorldPacket & recv_data )
|
|||
GetPlayer()->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_AUCTION_BID, price);
|
||||
|
||||
// after this update we should save player's money ...
|
||||
CharacterDatabase.PExecute("UPDATE auctionhouse SET buyguid = '%u',lastbid = '%u' WHERE id = '%u'", auction->bidder, auction->bid, auction->Id);
|
||||
CharacterDatabase.PExecute("UPDATE auction SET buyguid = '%u',lastbid = '%u' WHERE id = '%u'", auction->bidder, auction->bid, auction->Id);
|
||||
|
||||
SendAuctionCommandResult(auction->Id, AUCTION_PLACE_BID, AUCTION_OK, 0 );
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue