mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 22:37:02 +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
|
|
@ -2387,7 +2387,7 @@ bool ChatHandler::HandleListItemCommand(const char* args)
|
|||
|
||||
// auction case
|
||||
uint32 auc_count = 0;
|
||||
result=CharacterDatabase.PQuery("SELECT COUNT(item_template) FROM auctionhouse WHERE item_template='%u'",item_id);
|
||||
result=CharacterDatabase.PQuery("SELECT COUNT(item_template) FROM auction WHERE item_template='%u'",item_id);
|
||||
if(result)
|
||||
{
|
||||
auc_count = (*result)[0].GetUInt32();
|
||||
|
|
@ -2398,8 +2398,8 @@ bool ChatHandler::HandleListItemCommand(const char* args)
|
|||
{
|
||||
result=CharacterDatabase.PQuery(
|
||||
// 0 1 2 3
|
||||
"SELECT auctionhouse.itemguid, auctionhouse.itemowner, characters.account, characters.name "
|
||||
"FROM auctionhouse,characters WHERE auctionhouse.item_template='%u' AND characters.guid = auctionhouse.itemowner LIMIT %u",
|
||||
"SELECT auction.itemguid, auction.itemowner, characters.account, characters.name "
|
||||
"FROM auction,characters WHERE auction.item_template='%u' AND characters.guid = auction.itemowner LIMIT %u",
|
||||
item_id,uint32(count));
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue