Core/Arenas: Refactor arena code and db layout

This commit is contained in:
leak
2011-04-05 21:54:28 +02:00
parent 3a93dff59e
commit ae3ab32ea5
12 changed files with 886 additions and 837 deletions

View File

@@ -1,8 +1,8 @@
-- MySQL dump 10.13 Distrib 5.1.51, for pc-linux-gnu (i686)
-- MySQL dump 10.13 Distrib 5.5.9, for Win64 (x86)
--
-- Host: localhost Database: characters
-- ------------------------------------------------------
-- Server version 5.1.51-log
-- Server version 5.5.9
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -63,7 +63,6 @@ LOCK TABLES `account_instance_times` WRITE;
/*!40000 ALTER TABLE `account_instance_times` DISABLE KEYS */;
/*!40000 ALTER TABLE `account_instance_times` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
--
-- Table structure for table `account_tutorial`
@@ -126,16 +125,22 @@ DROP TABLE IF EXISTS `arena_team`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `arena_team` (
`arenateamid` int(10) unsigned NOT NULL DEFAULT '0',
`arenaTeamId` int(10) unsigned NOT NULL DEFAULT '0',
`name` varchar(24) NOT NULL,
`captainguid` int(10) unsigned NOT NULL DEFAULT '0',
`captainGuid` int(10) unsigned NOT NULL DEFAULT '0',
`type` tinyint(3) unsigned NOT NULL DEFAULT '0',
`BackgroundColor` int(10) unsigned NOT NULL DEFAULT '0',
`EmblemStyle` tinyint(3) unsigned NOT NULL DEFAULT '0',
`EmblemColor` int(10) unsigned NOT NULL DEFAULT '0',
`BorderStyle` tinyint(3) unsigned NOT NULL DEFAULT '0',
`BorderColor` int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`arenateamid`)
`rating` smallint(5) unsigned NOT NULL,
`seasonGames` smallint(5) unsigned NOT NULL DEFAULT '0',
`seasonWins` smallint(5) unsigned NOT NULL DEFAULT '0',
`weekGames` smallint(5) unsigned NOT NULL DEFAULT '0',
`weekWins` smallint(5) unsigned NOT NULL DEFAULT '0',
`rank` int(10) unsigned NOT NULL,
`backgroundColor` int(10) unsigned NOT NULL DEFAULT '0',
`emblemStyle` tinyint(3) unsigned NOT NULL DEFAULT '0',
`emblemColor` int(10) unsigned NOT NULL DEFAULT '0',
`borderStyle` tinyint(3) unsigned NOT NULL DEFAULT '0',
`borderColor` int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`arenaTeamId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -158,10 +163,11 @@ DROP TABLE IF EXISTS `arena_team_member`;
CREATE TABLE `arena_team_member` (
`arenateamid` int(10) unsigned NOT NULL DEFAULT '0',
`guid` int(10) unsigned NOT NULL DEFAULT '0',
`played_week` int(10) unsigned NOT NULL DEFAULT '0',
`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',
`weekGames` smallint(5) unsigned NOT NULL DEFAULT '0',
`weekWins` smallint(5) unsigned NOT NULL DEFAULT '0',
`seasonGames` smallint(5) unsigned NOT NULL DEFAULT '0',
`seasonWins` smallint(5) unsigned NOT NULL DEFAULT '0',
`personalRating` smallint(5) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`arenateamid`,`guid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -175,34 +181,6 @@ LOCK TABLES `arena_team_member` WRITE;
/*!40000 ALTER TABLE `arena_team_member` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `arena_team_stats`
--
DROP TABLE IF EXISTS `arena_team_stats`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `arena_team_stats` (
`arenateamid` int(10) unsigned NOT NULL DEFAULT '0',
`rating` int(10) unsigned NOT NULL DEFAULT '0',
`games` int(10) unsigned NOT NULL DEFAULT '0',
`wins` int(10) unsigned NOT NULL DEFAULT '0',
`played` int(10) unsigned NOT NULL DEFAULT '0',
`wins2` int(10) unsigned NOT NULL DEFAULT '0',
`rank` int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`arenateamid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `arena_team_stats`
--
LOCK TABLES `arena_team_stats` WRITE;
/*!40000 ALTER TABLE `arena_team_stats` DISABLE KEYS */;
/*!40000 ALTER TABLE `arena_team_stats` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `auctionhouse`
--
@@ -397,8 +375,8 @@ DROP TABLE IF EXISTS `character_arena_stats`;
CREATE TABLE `character_arena_stats` (
`guid` int(10) NOT NULL,
`slot` tinyint(3) NOT NULL,
`personal_rating` int(10) NOT NULL,
`matchmaker_rating` int(10) NOT NULL,
`personalRating` smallint(5) NOT NULL,
`matchMakerRating` smallint(5) NOT NULL,
PRIMARY KEY (`guid`,`slot`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -2219,4 +2197,4 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2011-01-20 1:49:32
-- Dump completed on 2011-04-04 21:03:41