Core/AuctionHouse: After taking a break at the start of patch 8.3 auction house is now back in business.

Port From (https://github.com/TrinityCore/TrinityCore/commit/aced88b09bd918b0ed17b6c5e8a6048788600d9d)
This commit is contained in:
hondacrx
2020-04-29 13:52:03 -04:00
parent 8bc9cc9c55
commit 6be4414166
24 changed files with 3032 additions and 1285 deletions
+86 -11
View File
@@ -158,6 +158,53 @@ LOCK TABLES `arena_team_member` WRITE;
/*!40000 ALTER TABLE `arena_team_member` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `auction_bidders`
--
DROP TABLE IF EXISTS `auction_bidders`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `auction_bidders` (
`auctionId` int unsigned NOT NULL,
`playerGuid` bigint unsigned NOT NULL,
PRIMARY KEY (`auctionId`,`playerGuid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `auction_bidders`
--
LOCK TABLES `auction_bidders` WRITE;
/*!40000 ALTER TABLE `auction_bidders` DISABLE KEYS */;
/*!40000 ALTER TABLE `auction_bidders` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `auction_items`
--
DROP TABLE IF EXISTS `auction_items`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `auction_items` (
`auctionId` int unsigned NOT NULL,
`itemGuid` bigint unsigned NOT NULL,
PRIMARY KEY (`auctionId`,`itemGuid`),
UNIQUE KEY `idx_itemGuid` (`itemGuid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `auction_items`
--
LOCK TABLES `auction_items` WRITE;
/*!40000 ALTER TABLE `auction_items` DISABLE KEYS */;
/*!40000 ALTER TABLE `auction_items` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `auctionhouse`
--
@@ -167,17 +214,16 @@ DROP TABLE IF EXISTS `auctionhouse`;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `auctionhouse` (
`id` int(10) unsigned NOT NULL DEFAULT '0',
`auctioneerguid` bigint(20) unsigned NOT NULL DEFAULT '0',
`itemguid` bigint(20) unsigned NOT NULL DEFAULT '0',
`itemowner` bigint(20) unsigned NOT NULL DEFAULT '0',
`buyoutprice` bigint(20) unsigned NOT NULL DEFAULT '0',
`time` int(10) unsigned NOT NULL DEFAULT '0',
`buyguid` bigint(20) unsigned NOT NULL DEFAULT '0',
`lastbid` bigint(20) unsigned NOT NULL DEFAULT '0',
`startbid` bigint(20) unsigned NOT NULL DEFAULT '0',
`auctionHouseId` int(10) unsigned NOT NULL DEFAULT '0',
`owner` bigint(20) unsigned NOT NULL DEFAULT '0',
`bidder` bigint(20) unsigned NOT NULL DEFAULT '0',
`minBid` bigint(20) unsigned NOT NULL DEFAULT '0',
`buyoutOrUnitPrice` bigint(20) unsigned NOT NULL DEFAULT '0',
`deposit` bigint(20) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `item_guid` (`itemguid`)
`bidAmount` bigint(20) unsigned NOT NULL DEFAULT '0',
`startTime` int(10) unsigned NOT NULL DEFAULT '0',
`endTime` int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -733,6 +779,33 @@ LOCK TABLES `character_equipmentsets` WRITE;
/*!40000 ALTER TABLE `character_equipmentsets` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `character_favorite_auctions`
--
DROP TABLE IF EXISTS `character_favorite_auctions`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `character_favorite_auctions` (
`guid` bigint(20) unsigned NOT NULL,
`order` int(10) unsigned NOT NULL DEFAULT '0',
`itemId` int(10) unsigned NOT NULL DEFAULT '0',
`itemLevel` int(10) unsigned NOT NULL DEFAULT '0',
`battlePetSpeciesId` int(10) unsigned NOT NULL DEFAULT '0',
`suffixItemNameDescriptionId` int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`guid`,`order`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `character_favorite_auctions`
--
LOCK TABLES `character_favorite_auctions` WRITE;
/*!40000 ALTER TABLE `character_favorite_auctions` DISABLE KEYS */;
/*!40000 ALTER TABLE `character_favorite_auctions` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `character_fishingsteps`
--
@@ -3696,7 +3769,9 @@ INSERT INTO `updates` VALUES
('2019_11_22_00_characters.sql','95DFA71DBD75542C098CD86E9C0051C9690902F0','RELEASED','2019-11-20 15:10:12',0),
('2019_11_30_00_characters.sql','D0678E62B651AECA60C2DD6989BF80BD999AD12B','RELEASED','2019-11-29 22:42:01',0),
('2019_12_05_00_characters.sql','EA381C9634A5646A3168F15DF4E06A708A622762','RELEASED','2019-12-05 20:56:58',0),
('2020_02_17_00_characters.sql','E1519A81D35F19B48B3C75A83A270CB4BA0B84F2','RELEASED','2020-02-17 21:55:17',0);
('2020_02_17_00_characters.sql','E1519A81D35F19B48B3C75A83A270CB4BA0B84F2','RELEASED','2020-02-17 21:55:17',0),
('2020_04_20_00_characters.sql','977B5E0C894E0A7E80B2A9626F17CA636A69BD22','RELEASED','2020-04-20 19:08:18',0),
('2020_04_24_00_characters.sql','85E2E0395A9457A53D73A9E0A7BB39B7E4C429BF','RELEASED','2020-04-24 22:04:59',0);
/*!40000 ALTER TABLE `updates` ENABLE KEYS */;
UNLOCK TABLES;
@@ -0,0 +1,46 @@
ALTER TABLE `auctionhouse` ADD `auctionHouseId` int(10) unsigned NOT NULL DEFAULT '0' AFTER `id`;
ALTER TABLE `auctionhouse` DROP `auctioneerguid`;
-- temporarily mark all auctions as coming from neutral AH (not goblin one) and expired
UPDATE `auctionhouse` SET `auctionHouseId`=1, `time`=UNIX_TIMESTAMP();
DROP TABLE IF EXISTS `auction_bidders`;
CREATE TABLE `auction_bidders` (
`auctionId` int unsigned NOT NULL,
`playerGuid` bigint unsigned NOT NULL,
PRIMARY KEY (`auctionId`,`playerGuid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `auction_bidders` SELECT `id`, `buyguid` FROM `auctionhouse`;
DROP TABLE IF EXISTS `auction_items`;
CREATE TABLE `auction_items` (
`auctionId` int unsigned NOT NULL,
`itemGuid` bigint unsigned NOT NULL,
PRIMARY KEY (`auctionId`,`itemGuid`),
UNIQUE KEY `idx_itemGuid` (`itemGuid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `character_favorite_auctions`;
CREATE TABLE `character_favorite_auctions` (
`guid` bigint(20) unsigned NOT NULL,
`order` int(10) unsigned NOT NULL DEFAULT '0',
`itemId` int(10) unsigned NOT NULL DEFAULT '0',
`itemLevel` int(10) unsigned NOT NULL DEFAULT '0',
`battlePetSpeciesId` int(10) unsigned NOT NULL DEFAULT '0',
`suffixItemNameDescriptionId` int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`guid`,`order`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `auction_items` SELECT `id`, `itemguid` FROM `auctionhouse`;
ALTER TABLE `auctionhouse` DROP INDEX `item_guid`;
ALTER TABLE `auctionhouse` DROP `itemguid`;
ALTER TABLE `auctionhouse` CHANGE `itemowner` `owner` bigint(20) unsigned NOT NULL DEFAULT '0' AFTER `auctionHouseId`;
ALTER TABLE `auctionhouse` CHANGE `buyguid` `bidder` bigint(20) unsigned NOT NULL DEFAULT '0' AFTER `owner`;
ALTER TABLE `auctionhouse` CHANGE `startbid` `minBid` bigint(20) unsigned NOT NULL DEFAULT '0' AFTER `bidder`;
ALTER TABLE `auctionhouse` CHANGE `buyoutprice` `buyoutOrUnitPrice` bigint(20) unsigned NOT NULL DEFAULT '0' AFTER `lastbid`;
ALTER TABLE `auctionhouse` MODIFY `deposit` bigint(20) unsigned NOT NULL DEFAULT '0' AFTER `buyoutOrUnitPrice`;
ALTER TABLE `auctionhouse` CHANGE `lastbid` `bidAmount` bigint(20) unsigned NOT NULL DEFAULT '0' AFTER `deposit`;
ALTER TABLE `auctionhouse` ADD `startTime` int(10) unsigned NOT NULL DEFAULT '0' AFTER `bidAmount`;
ALTER TABLE `auctionhouse` CHANGE `time` `endTime` int(10) unsigned NOT NULL DEFAULT '0' AFTER `startTime`;