aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormegamage <none@none>2008-12-19 16:43:34 -0600
committermegamage <none@none>2008-12-19 16:43:34 -0600
commita6847b336fdb4062dfb25582b2cea86c96df8957 (patch)
treefbf47a3ed8735d0f76ebd00c7da789adf3f42311
parent400f7b859693eef1043a75a18c369dd871ffb721 (diff)
*Merge Mangos to 6717. Source: Mangos.
*Major change: update arena code. (The commit message of the last rev was wrong. But HG does not allow me to rollback.) --HG-- branch : trunk
-rw-r--r--sql/characters.sql65
-rw-r--r--sql/updates/360_characters.sql4
-rw-r--r--sql/updates/541_characters.sql12
-rw-r--r--sql/updates/541_world.sql26
-rw-r--r--src/game/Player.cpp12
5 files changed, 45 insertions, 74 deletions
diff --git a/sql/characters.sql b/sql/characters.sql
index c806d9d83d0..d67c7f02d27 100644
--- a/sql/characters.sql
+++ b/sql/characters.sql
@@ -25,8 +25,6 @@ CREATE TABLE `saved_variables` (
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Variable Saves';
--
-<<<<<<< HEAD:sql/characters.sql
-=======
-- Table structure for table `character_db_version`
--
@@ -86,11 +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',
-<<<<<<< HEAD:sql/characters.sql
- `points_to_add` int(10) unsigned NOT NULL default '0'
-=======
`personal_rating` int(10) UNSIGNED NOT NULL DEFAULT '0'
->>>>>>> upstream/master:sql/characters.sql
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
@@ -180,64 +174,6 @@ LOCK TABLES `bugreport` WRITE;
UNLOCK TABLES;
--
-<<<<<<< HEAD:sql/characters.sql
-=======
--- Table structure for table `characters`
---
-
-DROP TABLE IF EXISTS `characters`;
-CREATE TABLE `characters` (
- `guid` int(11) unsigned NOT NULL default '0' COMMENT 'Global Unique Identifier',
- `account` int(11) unsigned NOT NULL default '0' COMMENT 'Account Identifier',
- `data` longtext,
- `name` varchar(12) NOT NULL default '',
- `race` tinyint(3) unsigned NOT NULL default '0',
- `class` tinyint(3) unsigned NOT NULL default '0',
- `position_x` float NOT NULL default '0',
- `position_y` float NOT NULL default '0',
- `position_z` float NOT NULL default '0',
- `map` int(11) unsigned NOT NULL default '0' COMMENT 'Map Identifier',
- `dungeon_difficulty` tinyint(1) unsigned NOT NULL DEFAULT '0',
- `orientation` float NOT NULL default '0',
- `taximask` longtext,
- `online` tinyint(3) unsigned NOT NULL default '0',
- `cinematic` tinyint(3) unsigned NOT NULL default '0',
- `totaltime` int(11) unsigned NOT NULL default '0',
- `leveltime` int(11) unsigned NOT NULL default '0',
- `logout_time` bigint(20) unsigned NOT NULL default '0',
- `is_logout_resting` tinyint(3) unsigned NOT NULL default '0',
- `rest_bonus` float NOT NULL default '0',
- `resettalents_cost` int(11) unsigned NOT NULL default '0',
- `resettalents_time` bigint(20) unsigned NOT NULL default '0',
- `trans_x` float NOT NULL default '0',
- `trans_y` float NOT NULL default '0',
- `trans_z` float NOT NULL default '0',
- `trans_o` float NOT NULL default '0',
- `transguid` bigint(20) unsigned NOT NULL default '0',
- `extra_flags` int(11) unsigned NOT NULL default '0',
- `stable_slots` tinyint(1) unsigned NOT NULL default '0',
- `at_login` int(11) unsigned NOT NULL default '0',
- `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',
- PRIMARY KEY (`guid`),
- KEY `idx_account` (`account`),
- KEY `idx_online` (`online`),
- KEY `idx_name` (`name`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Player System';
-
---
--- Dumping data for table `characters`
---
-
-LOCK TABLES `characters` WRITE;
-/*!40000 ALTER TABLE `characters` DISABLE KEYS */;
-/*!40000 ALTER TABLE `characters` ENABLE KEYS */;
-UNLOCK TABLES;
-
---
->>>>>>> upstream/master:sql/characters.sql
-- Table structure for table `character_action`
--
@@ -709,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/src/game/Player.cpp b/src/game/Player.cpp
index 26ba1853176..5ec5cbc1c19 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -13714,12 +13714,12 @@ void Player::_LoadArenaTeamInfo(QueryResult *result)
ArenaTeam* aTeam = objmgr.GetArenaTeamById(arenateamid);
uint8 arenaSlot = aTeam->GetSlot();
- m_uint32Values[PLAYER_FIELD_ARENA_TEAM_INFO_1_1 + arenaSlot * 3] = arenateamid; // TeamID
- m_uint32Values[PLAYER_FIELD_ARENA_TEAM_INFO_1_1 + arenaSlot * 3 + 1] = ((aTeam->GetCaptain() == GetGUID()) ? (uint32)0 : (uint32)1); // Captain 0, member 1
- m_uint32Values[PLAYER_FIELD_ARENA_TEAM_INFO_1_1 + arenaSlot * 3 + 2] = played_week; // Played Week
- m_uint32Values[PLAYER_FIELD_ARENA_TEAM_INFO_1_1 + arenaSlot * 3 + 3] = played_season; // Played Season
- m_uint32Values[PLAYER_FIELD_ARENA_TEAM_INFO_1_1 + arenaSlot * 3 + 4] = 0; // Unk
- m_uint32Values[PLAYER_FIELD_ARENA_TEAM_INFO_1_1 + arenaSlot * 3 + 5] = personal_rating; // Personal Rating
+ m_uint32Values[PLAYER_FIELD_ARENA_TEAM_INFO_1_1 + arenaSlot * 6] = arenateamid; // TeamID
+ m_uint32Values[PLAYER_FIELD_ARENA_TEAM_INFO_1_1 + arenaSlot * 6 + 1] = ((aTeam->GetCaptain() == GetGUID()) ? (uint32)0 : (uint32)1); // Captain 0, member 1
+ m_uint32Values[PLAYER_FIELD_ARENA_TEAM_INFO_1_1 + arenaSlot * 6 + 2] = played_week; // Played Week
+ m_uint32Values[PLAYER_FIELD_ARENA_TEAM_INFO_1_1 + arenaSlot * 6 + 3] = played_season; // Played Season
+ m_uint32Values[PLAYER_FIELD_ARENA_TEAM_INFO_1_1 + arenaSlot * 6 + 4] = 0; // Unk
+ m_uint32Values[PLAYER_FIELD_ARENA_TEAM_INFO_1_1 + arenaSlot * 6 + 5] = personal_rating; // Personal Rating
}while (result->NextRow());
delete result;