From ce31c1e19fca59fa90f19373bed671051664e22b Mon Sep 17 00:00:00 2001 From: VladimirMangos Date: Thu, 12 Feb 2009 04:53:09 +0300 Subject: [PATCH] [7267] Drop `auctionhouse`.`location`. --- sql/characters.sql | 3 +-- sql/updates/7267_01_characters_auctionhouse.sql | 5 +++++ sql/updates/Makefile.am | 2 ++ src/game/AuctionHouseMgr.cpp | 6 +++--- src/shared/revision_nr.h | 2 +- 5 files changed, 12 insertions(+), 6 deletions(-) create mode 100644 sql/updates/7267_01_characters_auctionhouse.sql diff --git a/sql/characters.sql b/sql/characters.sql index c2fefc22..6e32533f 100644 --- a/sql/characters.sql +++ b/sql/characters.sql @@ -21,7 +21,7 @@ DROP TABLE IF EXISTS `character_db_version`; CREATE TABLE `character_db_version` ( - `required_7255_01_characters_characters` bit(1) default NULL + `required_7267_01_characters_auctionhouse` bit(1) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Last applied sql update to DB'; -- @@ -150,7 +150,6 @@ CREATE TABLE `auctionhouse` ( `lastbid` int(11) NOT NULL default '0', `startbid` int(11) NOT NULL default '0', `deposit` int(11) NOT NULL default '0', - `location` tinyint(3) unsigned NOT NULL default '3', PRIMARY KEY (`id`), UNIQUE KEY `item_guid` (`itemguid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/sql/updates/7267_01_characters_auctionhouse.sql b/sql/updates/7267_01_characters_auctionhouse.sql new file mode 100644 index 00000000..ddcbecec --- /dev/null +++ b/sql/updates/7267_01_characters_auctionhouse.sql @@ -0,0 +1,5 @@ +ALTER TABLE character_db_version CHANGE COLUMN required_7255_01_characters_characters required_7267_01_characters_auctionhouse bit; + +ALTER TABLE auctionhouse + DROP COLUMN location; + diff --git a/sql/updates/Makefile.am b/sql/updates/Makefile.am index d002c598..b15a7b57 100644 --- a/sql/updates/Makefile.am +++ b/sql/updates/Makefile.am @@ -175,6 +175,7 @@ pkgdata_DATA = \ 7252_01_mangos_command.sql \ 7252_02_mangos_mangos_string.sql \ 7255_01_characters_characters.sql \ + 7267_01_characters_auctionhouse.sql \ README ## Additional files to include when running 'make dist' @@ -330,4 +331,5 @@ EXTRA_DIST = \ 7252_01_mangos_command.sql \ 7252_02_mangos_mangos_string.sql \ 7255_01_characters_characters.sql \ + 7267_01_characters_auctionhouse.sql \ README diff --git a/src/game/AuctionHouseMgr.cpp b/src/game/AuctionHouseMgr.cpp index 51d003ef..a4f02c75 100644 --- a/src/game/AuctionHouseMgr.cpp +++ b/src/game/AuctionHouseMgr.cpp @@ -676,7 +676,7 @@ void AuctionEntry::DeleteFromDB() const void AuctionEntry::SaveToDB() const { //No SQL injection (no strings) - CharacterDatabase.PExecute("INSERT INTO auctionhouse (id,auctioneerguid,itemguid,item_template,itemowner,buyoutprice,time,buyguid,lastbid,startbid,deposit,location) " - "VALUES ('%u', '%u', '%u', '%u', '%u', '%u', '" I64FMTD "', '%u', '%u', '%u', '%u', '%u')", - Id, auctioneer, item_guidlow, item_template, owner, buyout, (uint64)expire_time, bidder, bid, startbid, deposit, GetHouseId()); + CharacterDatabase.PExecute("INSERT INTO auctionhouse (id,auctioneerguid,itemguid,item_template,itemowner,buyoutprice,time,buyguid,lastbid,startbid,deposit) " + "VALUES ('%u', '%u', '%u', '%u', '%u', '%u', '" I64FMTD "', '%u', '%u', '%u', '%u')", + Id, auctioneer, item_guidlow, item_template, owner, buyout, (uint64)expire_time, bidder, bid, startbid, deposit); } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index bc6c578f..ec08713e 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "7266" + #define REVISION_NR "7267" #endif // __REVISION_NR_H__ -- 2.11.4.GIT