diff options
Diffstat (limited to 'sql')
| -rw-r--r-- | sql/characters.sql | 33 | ||||
| -rw-r--r-- | sql/updates/360_characters.sql | 4 | ||||
| -rw-r--r-- | sql/updates/541_characters.sql | 12 | ||||
| -rw-r--r-- | sql/updates/541_world.sql | 26 | ||||
| -rw-r--r-- | sql/updates/542_characters.sql | 74 |
5 files changed, 144 insertions, 5 deletions
diff --git a/sql/characters.sql b/sql/characters.sql index 4b5613604c4..d67c7f02d27 100644 --- a/sql/characters.sql +++ b/sql/characters.sql @@ -15,7 +15,37 @@ /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `saved_variables` +-- + +CREATE TABLE `saved_variables` ( + `NextArenaPointDistributionTime` bigint(40) UNSIGNED NOT NULL DEFAULT '0' +) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Variable Saves'; + +-- +-- Table structure for table `character_db_version` +-- + +DROP TABLE IF EXISTS `character_db_version`; +CREATE TABLE `character_db_version` ( + `required_2008_12_15_01_character_arenas` bit(1) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Last applied sql update to DB'; + +-- +-- Dumping data for table `character_db_version` +-- + +LOCK TABLES `character_db_version` WRITE; +/*!40000 ALTER TABLE `character_db_version` DISABLE KEYS */; +INSERT INTO `character_db_version` VALUES +(NULL); +/*!40000 ALTER TABLE `character_db_version` ENABLE KEYS */; +UNLOCK TABLES; + -- +>>>>>>> upstream/master:sql/characters.sql -- Table structure for table `arena_team` -- @@ -54,7 +84,7 @@ CREATE TABLE `arena_team_member` ( `wons_week` int(10) unsigned NOT NULL default '0', `played_season` int(10) unsigned NOT NULL default '0', `wons_season` int(10) unsigned NOT NULL default '0', - `points_to_add` int(10) unsigned NOT NULL default '0' + `personal_rating` int(10) UNSIGNED NOT NULL DEFAULT '0' ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- @@ -615,6 +645,7 @@ CREATE TABLE `characters` ( `zone` int(11) unsigned NOT NULL default '0', `death_expire_time` bigint(20) unsigned NOT NULL default '0', `taxi_path` text, + `arena_pending_points` int(10) UNSIGNED NOT NULL default '0', `latency` int(11) unsigned NOT NULL default '0', PRIMARY KEY (`guid`), KEY `idx_account` (`account`), diff --git a/sql/updates/360_characters.sql b/sql/updates/360_characters.sql deleted file mode 100644 index 40662c380ce..00000000000 --- a/sql/updates/360_characters.sql +++ /dev/null @@ -1,4 +0,0 @@ -ALTER TABLE arena_team_member CHANGE played_week games_week int(10) unsigned NOT NULL default '0'; -ALTER TABLE arena_team_member CHANGE wons_week wins_week int(10) unsigned NOT NULL default '0'; -ALTER TABLE arena_team_member CHANGE played_season games_season int(10) unsigned NOT NULL default '0'; -ALTER TABLE arena_team_member CHANGE wons_season wins_season int(10) unsigned NOT NULL default '0';
\ No newline at end of file diff --git a/sql/updates/541_characters.sql b/sql/updates/541_characters.sql new file mode 100644 index 00000000000..99a083d0387 --- /dev/null +++ b/sql/updates/541_characters.sql @@ -0,0 +1,12 @@ +CREATE TABLE `saved_variables` ( + `NextArenaPointDistributionTime` bigint(40) UNSIGNED NOT NULL DEFAULT '0' +) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Variable Saves'; + +ALTER TABLE arena_team_member CHANGE games_week played_week int(10) unsigned NOT NULL default '0'; +ALTER TABLE arena_team_member CHANGE wins_week wons_week int(10) unsigned NOT NULL default '0'; +ALTER TABLE arena_team_member CHANGE games_season played_season int(10) unsigned NOT NULL default '0'; +ALTER TABLE arena_team_member CHANGE wins_season wons_season int(10) unsigned NOT NULL default '0'; + +ALTER TABLE `arena_team_member` DROP COLUMN `points_to_add`; +ALTER TABLE `arena_team_member` ADD COLUMN `personal_rating` int(10) UNSIGNED NOT NULL DEFAULT '0'; +ALTER TABLE `characters` ADD COLUMN `arena_pending_points` int(10) UNSIGNED NOT NULL default '0' AFTER `taxi_path`;
\ No newline at end of file diff --git a/sql/updates/541_world.sql b/sql/updates/541_world.sql new file mode 100644 index 00000000000..7d8e1fc8e1b --- /dev/null +++ b/sql/updates/541_world.sql @@ -0,0 +1,26 @@ +DELETE FROM `command` WHERE `name` = "flusharenapoints"; +INSERT INTO `command` (`name`, `security`, `help`) VALUES +('flusharenapoints','3','Syntax: .flusharenapoints\r\n\r\nUse it to distribute arena points based on arena team ratings, and start a new week.'); + +DELETE FROM trinity_string WHERE entry BETWEEN 1122 AND 1138; + +INSERT INTO trinity_string (entry, content_default) VALUES + (1122,'Your group is too large for this battleground. Please regroup to join.'), + (1123,'Your group is too large for this arena. Please regroup to join.'), + (1124,'Your group has members not in your arena team. Please regroup to join.'), + (1125,'Your group does not have enough players to join this match.'), + (1126,'The Gold Team wins!'), + (1127,'The Green Team wins!'), + (1128, 'There aren\'t enough players in this battleground. It will end soon unless some more players join to balance the fight.'), + (1129, 'Your group has an offline member. Please remove him before joining.'), + (1130, 'Your group has players from the opposing faction. You can\'t join the battleground as a group.'), + (1131, 'Your group has players from different battleground brakets. You can\'t join as group.'), + (1132, 'Someone in your party is already in this battleground queue. (S)he must leave it before joining as group.'), + (1133, 'Someone in your party is Deserter. You can\'t join as group.'), + (1134, 'Someone in your party is already in three battleground queues. You cannot join as group.'), + (1135, 'You cannot teleport to a battleground or arena map.'), + (1136, 'You cannot summon players to a battleground or arena map.'), + (1137, 'You must be in GM mode to teleport to a player in a battleground.'), + (1138, 'You cannot teleport to a battleground from another battleground. Please leave the current battleground first.'); + +DELETE FROM trinity_string WHERE entry = 714 OR entry = 716;
\ No newline at end of file diff --git a/sql/updates/542_characters.sql b/sql/updates/542_characters.sql new file mode 100644 index 00000000000..cf5e85dbd31 --- /dev/null +++ b/sql/updates/542_characters.sql @@ -0,0 +1,74 @@ +UPDATE + `arena_team_member` AS `a`, + (SELECT + `attq1`.`guid` AS `b_guid`, + `atid`, `atpr` + FROM + (SELECT + `guid`, + `name`, + SUBSTRING_INDEX(SUBSTRING_INDEX(`data`,' ',1545),' ',-1) AS `atid`, + SUBSTRING_INDEX(SUBSTRING_INDEX(`data`,' ',1550),' ',-1) AS `atpr` + FROM + `characters`) AS `attq1` + INNER JOIN + `arena_team_member` ON `arenateamid` = `atid` AND + `arena_team_member`.`guid` = `attq1`.`guid` + WHERE + `atid` <> 0) + AS `b` +SET + `a`.`personal_rating` = `b`.`atpr` +WHERE + `a`.`arenateamid` = `b`.`atid` AND + `a`.`guid` = `b`.`b_guid`; + +UPDATE + `arena_team_member` AS `a`, + (SELECT + `attq1`.`guid` AS `b_guid`, + `atid`, `atpr` + FROM + (SELECT + `guid`, + `name`, + SUBSTRING_INDEX(SUBSTRING_INDEX(`data`,' ',1551),' ',-1) AS `atid`, + SUBSTRING_INDEX(SUBSTRING_INDEX(`data`,' ',1556),' ',-1) AS `atpr` + FROM + `characters`) AS `attq1` + INNER JOIN + `arena_team_member` ON `arenateamid` = `atid` AND + `arena_team_member`.`guid` = `attq1`.`guid` + WHERE + `atid` <> 0) + AS `b` +SET + `a`.`personal_rating` = `b`.`atpr` +WHERE + `a`.`arenateamid` = `b`.`atid` AND + `a`.`guid` = `b`.`b_guid`; + +UPDATE + `arena_team_member` AS `a`, + (SELECT + `attq1`.`guid` AS `b_guid`, + `atid`, `atpr` + FROM + (SELECT + `guid`, + `name`, + SUBSTRING_INDEX(SUBSTRING_INDEX(`data`,' ',1557),' ',-1) AS `atid`, + SUBSTRING_INDEX(SUBSTRING_INDEX(`data`,' ',1562),' ',-1) AS `atpr` + FROM + `characters`) AS `attq1` + INNER JOIN + `arena_team_member` ON `arenateamid` = `atid` AND + `arena_team_member`.`guid` = `attq1`.`guid` + WHERE + `atid` <> 0) + AS `b` +SET + `a`.`personal_rating` = `b`.`atpr` +WHERE + `a`.`arenateamid` = `b`.`atid` AND + `a`.`guid` = `b`.`b_guid`;
\ No newline at end of file |
