diff --git a/sql/base/auth_database.sql b/sql/base/auth_database.sql
index 24d3d6b99ff..588ae576042 100644
--- a/sql/base/auth_database.sql
+++ b/sql/base/auth_database.sql
@@ -116,6 +116,34 @@ LOCK TABLES `account_banned` WRITE;
/*!40000 ALTER TABLE `account_banned` ENABLE KEYS */;
UNLOCK TABLES;
+--
+-- Table structure for table `account_last_played_character`
+--
+
+DROP TABLE IF EXISTS `account_last_played_character`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `account_last_played_character` (
+ `accountId` int(10) unsigned NOT NULL,
+ `region` tinyint(3) unsigned NOT NULL,
+ `battlegroup` tinyint(3) unsigned NOT NULL,
+ `realmId` int(10) unsigned,
+ `characterName` varchar(12),
+ `characterGUID` bigint(20) unsigned,
+ `lastPlayedTime` int(10) unsigned,
+ PRIMARY KEY(`accountId`,`region`,`battlegroup`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `account_last_played_character`
+--
+
+LOCK TABLES `account_last_played_character` WRITE;
+/*!40000 ALTER TABLE `account_last_played_character` DISABLE KEYS */;
+/*!40000 ALTER TABLE `account_last_played_character` ENABLE KEYS */;
+UNLOCK TABLES;
+
--
-- Table structure for table `account_muted`
--
@@ -308,9 +336,6 @@ CREATE TABLE `battlenet_accounts` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Identifier',
`email` varchar(320) NOT NULL,
`sha_pass_hash` varchar(64) NOT NULL DEFAULT '',
- `v` varchar(256) NOT NULL DEFAULT '',
- `s` varchar(64) NOT NULL DEFAULT '',
- `sessionKey` varchar(128) NOT NULL DEFAULT '',
`joindate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`last_ip` varchar(15) NOT NULL DEFAULT '127.0.0.1',
`failed_logins` int(10) unsigned NOT NULL DEFAULT '0',
@@ -334,59 +359,6 @@ LOCK TABLES `battlenet_accounts` WRITE;
/*!40000 ALTER TABLE `battlenet_accounts` ENABLE KEYS */;
UNLOCK TABLES;
---
--- Table structure for table `battlenet_components`
---
-
-DROP TABLE IF EXISTS `battlenet_components`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `battlenet_components` (
- `Program` varchar(4) NOT NULL,
- `Platform` varchar(4) NOT NULL,
- `Build` int(11) unsigned NOT NULL,
- PRIMARY KEY (`Program`,`Platform`,`Build`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Dumping data for table `battlenet_components`
---
-
-LOCK TABLES `battlenet_components` WRITE;
-/*!40000 ALTER TABLE `battlenet_components` DISABLE KEYS */;
-INSERT INTO `battlenet_components` VALUES ('Bnet','Mc64',37165),('Bnet','Win',37165),('Bnet','Wn64',37165),('WoW','base',20726),('WoW','deDE',0),('WoW','enCN',0),('WoW','enGB',0),('WoW','enTW',0),('WoW','enUS',0),('WoW','esES',0),('WoW','esMX',0),('WoW','frFR',0),('WoW','itIT',0),('WoW','koKR',0),('WoW','Mc64',20886),('WoW','ptBR',0),('WoW','ptPT',0),('WoW','ruRU',0),('WoW','Win',20886),('WoW','Wn64',20886),('WoW','zhCN',0),('WoW','zhTW',0);
-/*!40000 ALTER TABLE `battlenet_components` ENABLE KEYS */;
-UNLOCK TABLES;
-
---
--- Table structure for table `battlenet_modules`
---
-
-DROP TABLE IF EXISTS `battlenet_modules`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `battlenet_modules` (
- `Hash` varchar(64) NOT NULL,
- `Name` varchar(64) NOT NULL DEFAULT '',
- `Type` varchar(8) NOT NULL,
- `System` varchar(8) NOT NULL,
- `Data` text,
- PRIMARY KEY (`Name`,`System`),
- UNIQUE KEY `uk_name_type_system` (`Name`,`Type`,`System`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Dumping data for table `battlenet_modules`
---
-
-LOCK TABLES `battlenet_modules` WRITE;
-/*!40000 ALTER TABLE `battlenet_modules` DISABLE KEYS */;
-INSERT INTO `battlenet_modules` VALUES ('cc654428261322763f4cada5b7f4b3b67660e85639bea916986b3f366fe8adc2','ERRS','xml','enGB','AA6C50D3'),('3c2f63e5949aa6fd6cf330b109ca5b9adcd215beac846b7462ed3aa01d5ad6bb','Password','auth','Mac',NULL),('19c91b68752b7826df498bf73aca1103c86962a9a55a0a7033e5ad895f4d927c','Password','auth','Mc64',NULL),('2e6d53adab37a41542b38e01f62cd365eab8805ed0de73c307cc6d9d1dfe478c','Password','auth','Win',NULL),('851c1d2ef926e9b9a345a460874e65517195129b9e3bdec7cc77710fa0b1fad6','Password','auth','Wn64',NULL),('a2ec4b41148214037a2e89a2e557af716d085241b81f5244494bdc77a891ca38','PFTY','pfty','csCZ','DF6C50D3'),('047329d08d433da2622e9fc2ee96c8dd8f35e7770699d07cf74855b9c8ea9125','PFTY','pfty','deDE','DF6C50D3'),('83663d54444eadad40d43725e59bde8eda10276e76fc3c4e6f2ca56332ee8f03','PFTY','pfty','enAU','DF6C50D3'),('83663d54444eadad40d43725e59bde8eda10276e76fc3c4e6f2ca56332ee8f03','PFTY','pfty','enGB','DF6C50D3'),('83663d54444eadad40d43725e59bde8eda10276e76fc3c4e6f2ca56332ee8f03','PFTY','pfty','enSG','DF6C50D3'),('83663d54444eadad40d43725e59bde8eda10276e76fc3c4e6f2ca56332ee8f03','PFTY','pfty','enTH','DF6C50D3'),('83663d54444eadad40d43725e59bde8eda10276e76fc3c4e6f2ca56332ee8f03','PFTY','pfty','enUS','DF6C50D3'),('870f53d10b4e1b09d6b622cd5671ba4ff1ad69512dfa2c676072c52e45c7f0f9','PFTY','pfty','esES','DF6C50D3'),('e8b82becbe0a0a1bbb5561df69320edbd770897a8deaab23caa6736255e0dc33','PFTY','pfty','esMX','DF6C50D3'),('305bbdab1953e65974a249e276867e13ad2c3cabca3668983cb5ed406251bb7b','PFTY','pfty','frFR','DF6C50D3'),('b72e65b6b34d8f859e79b5f28952e26553a796d5e1d75c2b5930bc0daeaa728c','PFTY','pfty','itIT','DF6C50D3'),('a2ec4b41148214037a2e89a2e557af716d085241b81f5244494bdc77a891ca38','PFTY','pfty','jaJP','DF6C50D3'),('7466b2db3f03768aa2527535d4b3c6c9ef9e8fb07c6db88b1019f3d25a2942e8','PFTY','pfty','koKR','DF6C50D3'),('a8c77051991b1a6c5dfe412e9f46d8f584349996fbde37c4f2a527c192163502','PFTY','pfty','plPL','DF6C50D3'),('0a3f6f3f0535ea21dbe620085192afc796203047e270e0e1b76f15a739fe1797','PFTY','pfty','ptBR','DF6C50D3'),('5813f318f7e40a07a7cdfeeec9827942e6fdc5ccee0d4171148443e429ad0ead','PFTY','pfty','ruRU','DF6C50D3'),('2753d31092f1978bdd78ebd4fae2d189364ad7108ceb22fbf1413be1f43bef04','PFTY','pfty','zhCN','DF6C50D3'),('3e381d4f83201f4e3c482eb74da12e5ff9dd924da2413d8fb33f5eea9a02c2c2','PFTY','pfty','zhTW','DF6C50D3'),('00ffd88a437afbb88d7d4b74be2e3b43601605ee229151aa9f4bebb29ef66280','Resume','auth','Mac',NULL),('304627d437c38500c0b5ca0c6220eeade91390e52a2b005ff3f7754afa1f93cd','Resume','auth','Mc64',NULL),('bfe4ceb47700aa872e815e007e27df955d4cd4bc1fe731039ee6498ce209f368','Resume','auth','Win',NULL),('898166926805f897804bdbbf40662c9d768590a51a0b26c40dbcdf332ba11974','Resume','auth','Wn64',NULL),('c0f38d05aa1b83065e839c9bd96c831e9f7e42477085138752657a6a9bb9c520','RiskFingerprint','auth','Mac',NULL),('1af5418a448f8ad05451e3f7dbb2d9af9cb13458eea2368ebfc539476b954f1c','RiskFingerprint','auth','Mc64',NULL),('5e298e530698af905e1247e51ef0b109b352ac310ce7802a1f63613db980ed17','RiskFingerprint','auth','Win',NULL),('8c43bda10be33a32abbc09fb2279126c7f5953336391276cff588565332fcd40','RiskFingerprint','auth','Wn64',NULL),('207640724f4531d3b2a21532224d1486e8c4d2d805170381cbc3093264157960','SelectGameAccount','auth','Mac',NULL),('52e2978db6468dfade7c61da89513f443c9225692b5085fbe956749870993703','SelectGameAccount','auth','Mc64',NULL),('abc6bb719a73ec1055296001910e26afa561f701ad9995b1ecd7f55f9d3ca37c','SelectGameAccount','auth','Win',NULL),('894d25d3219d97d085ea5a8b98e66df5bd9f460ec6f104455246a12b8921409d','SelectGameAccount','auth','Wn64',NULL),('548b5ef9e0dd5c2f89f59c3e0979249b27505c51f0c77d2b27133726eaee0ad0','Thumbprint','auth','Mac','E716F4F0A01EB9C032A6C1393356A4F766F067949D71023C0CFC0613718966EF814E65CC6EE70C432A7F8AFD8A062B52603A2697E851D231D72C0277614181D713369B1E8E4BEEAB72045A9AAD45F319DB918ECDDB83C8EF8B7510600D391D45E7FEC0BEEAE904A5F9FA620F1CCDAD699D84A4739CE669B5A551831E396214E13B4C88F573F5CDC784CD01530C086B674C03BEB66403A0F87ED17ABBB403DE54CF31BE828A20C566C22E4D4263AA77220B0644D99245345BCAC276EA06925EB984D664725C3CB757140AFE12E27CB996F17159B1057E9B58B78BBB5A139C9FF6215A0D250B75FC9DD435655DDEADCD6CFD84800792C146B3633188ECEB53D2038C185E0BD51A9E6C70FD38ADF530F8DF50FB62053C5E894897AB7DD65C7AC80665F18E7989BE6E30F15E939751123D6D8A44F033175301D15AAAD2AEA06FAC60BA4065846AE938F32B1CB15F16DC0E76792A7332346896048065D17C059899E1D2300E402BD0EA74265DA6A42B1C854E2470D7B21AE4A2DAE90E602A759B2CA0EE610B50D5389DB89335D5451FE76DD85B09FD5297D6F9EFB6C34CE885007F7DF20D6A524E0C3E772FA04B3DD2E014D3A337A790943DAD523CBB5453F4FDF8E74DFE361BD5F25AB31952B478148B570DF5762643F32B994FEC99A747E4A265A66EE84A53509EC285C84679606049314FC526C61B537AC8061C788F8B86F52208'),('b37136b39add83cfdbafa81857de3dd8f15b34e0135ec6cd9c3131d3a578d8c2','Thumbprint','auth','Mc64','E716F4F0A01EB9C032A6C1393356A4F766F067949D71023C0CFC0613718966EF814E65CC6EE70C432A7F8AFD8A062B52603A2697E851D231D72C0277614181D713369B1E8E4BEEAB72045A9AAD45F319DB918ECDDB83C8EF8B7510600D391D45E7FEC0BEEAE904A5F9FA620F1CCDAD699D84A4739CE669B5A551831E396214E13B4C88F573F5CDC784CD01530C086B674C03BEB66403A0F87ED17ABBB403DE54CF31BE828A20C566C22E4D4263AA77220B0644D99245345BCAC276EA06925EB984D664725C3CB757140AFE12E27CB996F17159B1057E9B58B78BBB5A139C9FF6215A0D250B75FC9DD435655DDEADCD6CFD84800792C146B3633188ECEB53D2038C185E0BD51A9E6C70FD38ADF530F8DF50FB62053C5E894897AB7DD65C7AC80665F18E7989BE6E30F15E939751123D6D8A44F033175301D15AAAD2AEA06FAC60BA4065846AE938F32B1CB15F16DC0E76792A7332346896048065D17C059899E1D2300E402BD0EA74265DA6A42B1C854E2470D7B21AE4A2DAE90E602A759B2CA0EE610B50D5389DB89335D5451FE76DD85B09FD5297D6F9EFB6C34CE885007F7DF20D6A524E0C3E772FA04B3DD2E014D3A337A790943DAD523CBB5453F4FDF8E74DFE361BD5F25AB31952B478148B570DF5762643F32B994FEC99A747E4A265A66EE84A53509EC285C84679606049314FC526C61B537AC8061C788F8B86F52208'),('36b27cd911b33c61730a8b82c8b2495fd16e8024fc3b2dde08861c77a852941c','Thumbprint','auth','Win','E716F4F0A01EB9C032A6C1393356A4F766F067949D71023C0CFC0613718966EF814E65CC6EE70C432A7F8AFD8A062B52603A2697E851D231D72C0277614181D713369B1E8E4BEEAB72045A9AAD45F319DB918ECDDB83C8EF8B7510600D391D45E7FEC0BEEAE904A5F9FA620F1CCDAD699D84A4739CE669B5A551831E396214E13B4C88F573F5CDC784CD01530C086B674C03BEB66403A0F87ED17ABBB403DE54CF31BE828A20C566C22E4D4263AA77220B0644D99245345BCAC276EA06925EB984D664725C3CB757140AFE12E27CB996F17159B1057E9B58B78BBB5A139C9FF6215A0D250B75FC9DD435655DDEADCD6CFD84800792C146B3633188ECEB53D2038C185E0BD51A9E6C70FD38ADF530F8DF50FB62053C5E894897AB7DD65C7AC80665F18E7989BE6E30F15E939751123D6D8A44F033175301D15AAAD2AEA06FAC60BA4065846AE938F32B1CB15F16DC0E76792A7332346896048065D17C059899E1D2300E402BD0EA74265DA6A42B1C854E2470D7B21AE4A2DAE90E602A759B2CA0EE610B50D5389DB89335D5451FE76DD85B09FD5297D6F9EFB6C34CE885007F7DF20D6A524E0C3E772FA04B3DD2E014D3A337A790943DAD523CBB5453F4FDF8E74DFE361BD5F25AB31952B478148B570DF5762643F32B994FEC99A747E4A265A66EE84A53509EC285C84679606049314FC526C61B537AC8061C788F8B86F52208'),('c3a1ac0694979e709c3b5486927e558af1e2be02ca96e5615c5a65aacc829226','Thumbprint','auth','Wn64','E716F4F0A01EB9C032A6C1393356A4F766F067949D71023C0CFC0613718966EF814E65CC6EE70C432A7F8AFD8A062B52603A2697E851D231D72C0277614181D713369B1E8E4BEEAB72045A9AAD45F319DB918ECDDB83C8EF8B7510600D391D45E7FEC0BEEAE904A5F9FA620F1CCDAD699D84A4739CE669B5A551831E396214E13B4C88F573F5CDC784CD01530C086B674C03BEB66403A0F87ED17ABBB403DE54CF31BE828A20C566C22E4D4263AA77220B0644D99245345BCAC276EA06925EB984D664725C3CB757140AFE12E27CB996F17159B1057E9B58B78BBB5A139C9FF6215A0D250B75FC9DD435655DDEADCD6CFD84800792C146B3633188ECEB53D2038C185E0BD51A9E6C70FD38ADF530F8DF50FB62053C5E894897AB7DD65C7AC80665F18E7989BE6E30F15E939751123D6D8A44F033175301D15AAAD2AEA06FAC60BA4065846AE938F32B1CB15F16DC0E76792A7332346896048065D17C059899E1D2300E402BD0EA74265DA6A42B1C854E2470D7B21AE4A2DAE90E602A759B2CA0EE610B50D5389DB89335D5451FE76DD85B09FD5297D6F9EFB6C34CE885007F7DF20D6A524E0C3E772FA04B3DD2E014D3A337A790943DAD523CBB5453F4FDF8E74DFE361BD5F25AB31952B478148B570DF5762643F32B994FEC99A747E4A265A66EE84A53509EC285C84679606049314FC526C61B537AC8061C788F8B86F52208'),('393ca8d75aff6f04f79532cf95a88b91e5743bc59121520ac31fc4508019fe60','Token','auth','Mac',NULL),('a1edab845d9e13e9c84531369be2f61b930a37c8e7a9c66d11ef8963380e178a','Token','auth','Mc64',NULL),('fbe675a99fb5f4b7fb3eb5e5a22add91a4cabf83e3c5930c6659ad13c457ba18','Token','auth','Win',NULL),('a330f388b6687f8a42fe8fbb592a3df724b20b65fb0989342bb8261f2f452318','Token','auth','Wn64',NULL);
-/*!40000 ALTER TABLE `battlenet_modules` ENABLE KEYS */;
-UNLOCK TABLES;
-
--
-- Table structure for table `ip2nation`
--
@@ -712,7 +684,7 @@ CREATE TABLE `updates` (
LOCK TABLES `updates` WRITE;
/*!40000 ALTER TABLE `updates` DISABLE KEYS */;
-INSERT INTO `updates` VALUES ('2014_10_04_00_auth.sql','C3BC70A6EC381474B7308F442346F1E721176BC6','ARCHIVED','2015-03-21 16:55:52',0),('2014_10_19_00_auth.sql','7472B490A4F86C9D3DA609CDD3197499CB80C87C','ARCHIVED','2015-03-21 16:55:52',0),('2014_10_26_00_auth.sql','75CC67ADE2A3B2E54FD57D6B0DCAA8FE50F4EE35','ARCHIVED','2015-03-21 16:55:52',0),('2014_11_03_00_auth.sql','5948C9F286CF0FEA8E241785C0259FF36B73BDC5','ARCHIVED','2015-03-21 16:55:52',0),('2014_11_04_00_auth.sql','3AFC68B2375C2A417DDEA94583C53AFF83DE50DF','ARCHIVED','2015-03-21 16:55:52',0),('2014_11_09_00_auth.sql','B8DD1A7047C0FDDB80344B239343EC33BF1A0D97','ARCHIVED','2015-03-21 16:55:52',0),('2014_11_10_00_auth.sql','8FBA737A1D3FF4631A1E662A5B500A8BD304EC63','ARCHIVED','2015-03-21 16:55:52',0),('2014_11_10_00_auth_from_335.sql','0E3CB119442D09DD88E967015319BBC8DAFBBFE0','ARCHIVED','2015-03-21 16:55:52',0),('2014_11_10_01_auth.sql','327E77A1DA3546D5275AB249915DD57EDD6FDD3D','ARCHIVED','2015-03-21 16:55:52',0),('2014_11_23_00_auth.sql','0BBEB3EB3AED0FEF277A062819B6B2C00084A742','ARCHIVED','2015-03-21 16:55:52',0),('2014_11_25_00_auth.sql','4F45CDB26BDBB3EE83F1988E3D7818C5926ADC02','ARCHIVED','2015-03-21 16:55:52',0),('2014_12_05_00_auth.sql','6A7BBCEF43111C73A2D2C3CCB6911BE50DE7DD94','ARCHIVED','2015-03-21 16:55:52',0),('2014_12_10_00_auth.sql','821703A96D80F9080074852B5A46E2909C9562EA','ARCHIVED','2015-03-21 16:55:52',0),('2014_12_19_00_auth.sql','44D8E12FFF327AD07878FBDF8D9C16B6B7DCB122','ARCHIVED','2015-03-21 16:55:52',0),('2014_12_20_00_auth.sql','4DAA02AE285C02AE6C82EA2C8B97AC71990F1085','ARCHIVED','2015-03-21 16:55:52',0),('2014_12_25_00_auth.sql','61411930F482BC73FC7FD2C370C811E944F5FF92','ARCHIVED','2015-03-21 16:55:52',0),('2014_12_27_00_auth.sql','CE2E5D2CD82E79C25294539ADED27A1429105B43','ARCHIVED','2015-03-21 16:55:52',0),('2014_12_28_00_auth.sql','0A913217610E76AFF119C27259737BBC523090E6','ARCHIVED','2015-03-21 16:55:52',0),('2015_02_22_00_auth.sql','21CCCF8B01252E16CA3D6C9E3E8DAA4C9B28ED6E','ARCHIVED','2015-03-21 16:55:52',0),('2015_03_01_00_auth.sql','911881E273207FF6182D1FDAC8C85FFAE8F1C852','ARCHIVED','2015-03-21 16:55:52',0),('2015_03_10_00_auth.sql','2CC8502C11412EFEB5C11BE166761A8754A59009','ARCHIVED','2015-03-21 16:55:52',0),('2015_03_20_00_auth.sql','B761760804EA73BD297F296C5C1919687DF7191C','ARCHIVED','2015-03-21 16:55:52',0),('2015_03_20_01_auth.sql','5CCEDF20C8189FB1E8DF064A9F0DDC342841FBF0','ARCHIVED','2015-03-21 16:55:52',0),('2015_03_20_02_auth.sql','85E4ACD9AA099C0C4AC034575F2BB07D348EAC72','ARCHIVED','2015-03-21 16:56:46',0),('2015_03_15_00_auth.sql','1D8E107FBEFE5E7F47E09F45240DFF499B77CDED','ARCHIVED','2015-05-02 13:57:57',0),('2015_03_26_00_auth.sql','34AC8543E6A9C6C832DE58EAB33618EEEF70B9F9','ARCHIVED','2015-05-02 13:57:57',0),('2015_04_04_00_auth.sql','57146B35E54A2EC7869C945034AB078358020311','ARCHIVED','2015-05-02 13:57:57',0),('2015_04_06_00_auth.sql','2A8049DC2923420A002D42FB6F02C2FFCC5CDD22','ARCHIVED','2015-05-02 13:57:57',0),('2015_04_08_00_auth.sql','4D7D8EEF285C982BB676836602266501BEC26764','ARCHIVED','2015-05-02 13:57:57',0),('2015_04_10_00_auth.sql','4AE68FD97A95CEE5143EA20FD33F5D557367AC1F','ARCHIVED','2015-05-02 13:57:57',0),('2015_04_11_00_auth.sql','80A71C8921CFEBB547D264558B6DE27201685B84','ARCHIVED','2015-05-02 13:57:57',0),('2015_04_11_01_auth.sql','3E88183E1A85D11BFD74CF9A32A725C44AE02EEC','ARCHIVED','2015-05-02 13:57:57',0),('2015_04_21_00_auth.sql','1B3B48DBA06368B985C548D166C515C9DD598CB9','ARCHIVED','2015-05-02 13:57:57',0),('2015_05_02_00_auth.sql','96AB595E0D2A088750E3F48B0AF0A8A14F3CFE1E','ARCHIVED','2015-05-02 13:57:57',0),('2015_05_02_01_auth.sql','FB11FB834E488B0FD3AFDABCC1A3113092E7C2E5','ARCHIVED','2015-05-02 13:57:57',0),('2015_07_02_00_auth.sql','E5EE3842AB9B01851E49B360FBAF6FFEEAB2A8DA','ARCHIVED','2015-07-10 19:30:56',0),('2015_07_06_00_auth.sql','6D1ADBA496DC6E6D7B3BF887DA8D4D17D3FBACE0','ARCHIVED','2015-07-10 19:30:56',0),('2015_07_08_00_auth.sql','CB54020AFD1E31742FD8BF9CE16879625E289788','ARCHIVED','2015-07-10 19:30:56',0),('2015_07_08_01_auth.sql','74D281CB82E0DA36D628BDC7AC797AE5498DB461','ARCHIVED','2015-07-10 19:30:56',0),('2015_07_16_00_auth.sql','A057E95B5553B6A57A1642FE3FEC8E2E62EDE3C6','ARCHIVED','2015-10-10 08:30:48',0),('2015_07_29_00_auth.sql','0000FECBC413E96C7C45F303D162E263EFBA7116','ARCHIVED','2015-10-10 08:30:48',0),('2015_08_26_00_auth.sql','3071C02A2EB7DCBF4CEE10279FEFAB7C29A43A3A','ARCHIVED','2015-10-10 08:30:48',0),('2015_09_05_00_auth.sql','F765D82B37873FA67447347D5B83C99C159FB452','ARCHIVED','2015-10-10 08:30:48',0),('2015_09_05_01_auth.sql','97A72DBCBF14D27A1863834A22296905FF276086','ARCHIVED','2015-10-10 08:30:48',0),('2015_09_09_00_auth.sql','495A0CF1B1C49205D4A5D3C25A4E1EB95616D6B4','ARCHIVED','2015-10-10 08:30:48',0),('2015_09_15_00_auth.sql','D1FEFDA4C98F30384DF4B64D5A53187303EB5786','ARCHIVED','2015-10-10 08:30:48',0),('2015_10_09_00_auth.sql','B6D643D444C6AE711503F73B96B6252A852913D6','ARCHIVED','2015-10-10 08:30:48',0),('2015_10_16_00_auth.sql','366AFFD1088762866091A81CE1EC64138B8B35F1','ARCHIVED','2015-11-08 00:46:02',62),('2015_10_17_00_auth.sql','AC0D45E905033F42093852D2C4476663BDACCB3D','ARCHIVED','2015-10-17 12:39:12',0),('2015_11_01_00_auth_2015_08_21_00.sql','C31A9E1D28E11B60BE8F8198637DD51F6D75123F','ARCHIVED','2015-11-01 14:50:26',0),('2015_11_08_00_auth.sql','0ACDD35EC9745231BCFA701B78056DEF94D0CC53','RELEASED','2015-11-08 00:51:45',0),('2015_11_21_00_auth.sql','575A1D697CC6C7C517F7CCB950988267C99CE7FA','RELEASED','2015-11-21 21:25:38',0),('2015_12_07_00_auth.sql','24A07AC1F38E5D26A3599FC06D29E267418F69F3','RELEASED','2015-12-07 20:55:48',0),('2016_01_13_00_auth.sql','114527BCCB0DE286CBE6FDA3029DD0523D1037FA','RELEASED','2016-01-13 21:39:13',0),('2016_03_22_01_auth_2016_01_13_00_auth.sql','24615CC69B3CD7BB4699874647C35BA86E8A93FD','RELEASED','2016-03-22 22:55:13',0);
+INSERT INTO `updates` VALUES ('2014_10_04_00_auth.sql','C3BC70A6EC381474B7308F442346F1E721176BC6','ARCHIVED','2015-03-21 16:55:52',0),('2014_10_19_00_auth.sql','7472B490A4F86C9D3DA609CDD3197499CB80C87C','ARCHIVED','2015-03-21 16:55:52',0),('2014_10_26_00_auth.sql','75CC67ADE2A3B2E54FD57D6B0DCAA8FE50F4EE35','ARCHIVED','2015-03-21 16:55:52',0),('2014_11_03_00_auth.sql','5948C9F286CF0FEA8E241785C0259FF36B73BDC5','ARCHIVED','2015-03-21 16:55:52',0),('2014_11_04_00_auth.sql','3AFC68B2375C2A417DDEA94583C53AFF83DE50DF','ARCHIVED','2015-03-21 16:55:52',0),('2014_11_09_00_auth.sql','B8DD1A7047C0FDDB80344B239343EC33BF1A0D97','ARCHIVED','2015-03-21 16:55:52',0),('2014_11_10_00_auth.sql','8FBA737A1D3FF4631A1E662A5B500A8BD304EC63','ARCHIVED','2015-03-21 16:55:52',0),('2014_11_10_00_auth_from_335.sql','0E3CB119442D09DD88E967015319BBC8DAFBBFE0','ARCHIVED','2015-03-21 16:55:52',0),('2014_11_10_01_auth.sql','327E77A1DA3546D5275AB249915DD57EDD6FDD3D','ARCHIVED','2015-03-21 16:55:52',0),('2014_11_23_00_auth.sql','0BBEB3EB3AED0FEF277A062819B6B2C00084A742','ARCHIVED','2015-03-21 16:55:52',0),('2014_11_25_00_auth.sql','4F45CDB26BDBB3EE83F1988E3D7818C5926ADC02','ARCHIVED','2015-03-21 16:55:52',0),('2014_12_05_00_auth.sql','6A7BBCEF43111C73A2D2C3CCB6911BE50DE7DD94','ARCHIVED','2015-03-21 16:55:52',0),('2014_12_10_00_auth.sql','821703A96D80F9080074852B5A46E2909C9562EA','ARCHIVED','2015-03-21 16:55:52',0),('2014_12_19_00_auth.sql','44D8E12FFF327AD07878FBDF8D9C16B6B7DCB122','ARCHIVED','2015-03-21 16:55:52',0),('2014_12_20_00_auth.sql','4DAA02AE285C02AE6C82EA2C8B97AC71990F1085','ARCHIVED','2015-03-21 16:55:52',0),('2014_12_25_00_auth.sql','61411930F482BC73FC7FD2C370C811E944F5FF92','ARCHIVED','2015-03-21 16:55:52',0),('2014_12_27_00_auth.sql','CE2E5D2CD82E79C25294539ADED27A1429105B43','ARCHIVED','2015-03-21 16:55:52',0),('2014_12_28_00_auth.sql','0A913217610E76AFF119C27259737BBC523090E6','ARCHIVED','2015-03-21 16:55:52',0),('2015_02_22_00_auth.sql','21CCCF8B01252E16CA3D6C9E3E8DAA4C9B28ED6E','ARCHIVED','2015-03-21 16:55:52',0),('2015_03_01_00_auth.sql','911881E273207FF6182D1FDAC8C85FFAE8F1C852','ARCHIVED','2015-03-21 16:55:52',0),('2015_03_10_00_auth.sql','2CC8502C11412EFEB5C11BE166761A8754A59009','ARCHIVED','2015-03-21 16:55:52',0),('2015_03_20_00_auth.sql','B761760804EA73BD297F296C5C1919687DF7191C','ARCHIVED','2015-03-21 16:55:52',0),('2015_03_20_01_auth.sql','5CCEDF20C8189FB1E8DF064A9F0DDC342841FBF0','ARCHIVED','2015-03-21 16:55:52',0),('2015_03_20_02_auth.sql','85E4ACD9AA099C0C4AC034575F2BB07D348EAC72','ARCHIVED','2015-03-21 16:56:46',0),('2015_03_15_00_auth.sql','1D8E107FBEFE5E7F47E09F45240DFF499B77CDED','ARCHIVED','2015-05-02 13:57:57',0),('2015_03_26_00_auth.sql','34AC8543E6A9C6C832DE58EAB33618EEEF70B9F9','ARCHIVED','2015-05-02 13:57:57',0),('2015_04_04_00_auth.sql','57146B35E54A2EC7869C945034AB078358020311','ARCHIVED','2015-05-02 13:57:57',0),('2015_04_06_00_auth.sql','2A8049DC2923420A002D42FB6F02C2FFCC5CDD22','ARCHIVED','2015-05-02 13:57:57',0),('2015_04_08_00_auth.sql','4D7D8EEF285C982BB676836602266501BEC26764','ARCHIVED','2015-05-02 13:57:57',0),('2015_04_10_00_auth.sql','4AE68FD97A95CEE5143EA20FD33F5D557367AC1F','ARCHIVED','2015-05-02 13:57:57',0),('2015_04_11_00_auth.sql','80A71C8921CFEBB547D264558B6DE27201685B84','ARCHIVED','2015-05-02 13:57:57',0),('2015_04_11_01_auth.sql','3E88183E1A85D11BFD74CF9A32A725C44AE02EEC','ARCHIVED','2015-05-02 13:57:57',0),('2015_04_21_00_auth.sql','1B3B48DBA06368B985C548D166C515C9DD598CB9','ARCHIVED','2015-05-02 13:57:57',0),('2015_05_02_00_auth.sql','96AB595E0D2A088750E3F48B0AF0A8A14F3CFE1E','ARCHIVED','2015-05-02 13:57:57',0),('2015_05_02_01_auth.sql','FB11FB834E488B0FD3AFDABCC1A3113092E7C2E5','ARCHIVED','2015-05-02 13:57:57',0),('2015_07_02_00_auth.sql','E5EE3842AB9B01851E49B360FBAF6FFEEAB2A8DA','ARCHIVED','2015-07-10 19:30:56',0),('2015_07_06_00_auth.sql','6D1ADBA496DC6E6D7B3BF887DA8D4D17D3FBACE0','ARCHIVED','2015-07-10 19:30:56',0),('2015_07_08_00_auth.sql','CB54020AFD1E31742FD8BF9CE16879625E289788','ARCHIVED','2015-07-10 19:30:56',0),('2015_07_08_01_auth.sql','74D281CB82E0DA36D628BDC7AC797AE5498DB461','ARCHIVED','2015-07-10 19:30:56',0),('2015_07_16_00_auth.sql','A057E95B5553B6A57A1642FE3FEC8E2E62EDE3C6','ARCHIVED','2015-10-10 08:30:48',0),('2015_07_29_00_auth.sql','0000FECBC413E96C7C45F303D162E263EFBA7116','ARCHIVED','2015-10-10 08:30:48',0),('2015_08_26_00_auth.sql','3071C02A2EB7DCBF4CEE10279FEFAB7C29A43A3A','ARCHIVED','2015-10-10 08:30:48',0),('2015_09_05_00_auth.sql','F765D82B37873FA67447347D5B83C99C159FB452','ARCHIVED','2015-10-10 08:30:48',0),('2015_09_05_01_auth.sql','97A72DBCBF14D27A1863834A22296905FF276086','ARCHIVED','2015-10-10 08:30:48',0),('2015_09_09_00_auth.sql','495A0CF1B1C49205D4A5D3C25A4E1EB95616D6B4','ARCHIVED','2015-10-10 08:30:48',0),('2015_09_15_00_auth.sql','D1FEFDA4C98F30384DF4B64D5A53187303EB5786','ARCHIVED','2015-10-10 08:30:48',0),('2015_10_09_00_auth.sql','B6D643D444C6AE711503F73B96B6252A852913D6','ARCHIVED','2015-10-10 08:30:48',0),('2015_10_16_00_auth.sql','366AFFD1088762866091A81CE1EC64138B8B35F1','ARCHIVED','2015-11-08 00:46:02',62),('2015_10_17_00_auth.sql','AC0D45E905033F42093852D2C4476663BDACCB3D','ARCHIVED','2015-10-17 12:39:12',0),('2015_11_01_00_auth_2015_08_21_00.sql','C31A9E1D28E11B60BE8F8198637DD51F6D75123F','ARCHIVED','2015-11-01 14:50:26',0),('2015_11_08_00_auth.sql','0ACDD35EC9745231BCFA701B78056DEF94D0CC53','RELEASED','2015-11-08 00:51:45',0),('2015_11_21_00_auth.sql','575A1D697CC6C7C517F7CCB950988267C99CE7FA','RELEASED','2015-11-21 21:25:38',0),('2015_12_07_00_auth.sql','24A07AC1F38E5D26A3599FC06D29E267418F69F3','RELEASED','2015-12-07 20:55:48',0),('2016_01_13_00_auth.sql','114527BCCB0DE286CBE6FDA3029DD0523D1037FA','RELEASED','2016-01-13 21:39:13',0),('2016_03_22_01_auth_2016_01_13_00_auth.sql','24615CC69B3CD7BB4699874647C35BA86E8A93FD','RELEASED','2016-03-22 22:55:13',0),('2016_03_28_00_auth.sql','BA14D23D81FA24565F04A359090DE86C5E195209','RELEASED','2016-03-28 16:49:32',0);
/*!40000 ALTER TABLE `updates` ENABLE KEYS */;
UNLOCK TABLES;
diff --git a/sql/updates/auth/2016_03_28_00_auth.sql b/sql/updates/auth/2016_03_28_00_auth.sql
new file mode 100644
index 00000000000..2adcb9bce4c
--- /dev/null
+++ b/sql/updates/auth/2016_03_28_00_auth.sql
@@ -0,0 +1,21 @@
+DROP TABLE IF EXISTS `battlenet_components`;
+DROP TABLE IF EXISTS `battlenet_modules`;
+
+DROP TABLE IF EXISTS `account_last_played_character`;
+CREATE TABLE `account_last_played_character` (
+ `accountId` int(10) unsigned NOT NULL,
+ `region` tinyint(3) unsigned NOT NULL,
+ `battlegroup` tinyint(3) unsigned NOT NULL,
+ `realmId` int(10) unsigned,
+ `characterName` varchar(12),
+ `characterGUID` bigint(20) unsigned,
+ `lastPlayedTime` int(10) unsigned,
+ PRIMARY KEY(`accountId`,`region`,`battlegroup`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+ALTER TABLE `battlenet_accounts`
+ DROP `s`,
+ DROP `v`,
+ DROP `sessionKey`;
+
+UPDATE `realmlist` SET `gamebuild`=21355 WHERE `gamebuild`=20726;
diff --git a/src/server/bnetserver/Authentication/AuthCodes.cpp b/src/server/bnetserver/Authentication/AuthCodes.cpp
deleted file mode 100644
index 41e2aad35ef..00000000000
--- a/src/server/bnetserver/Authentication/AuthCodes.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2008-2016 TrinityCore
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program. If not, see .
- */
-
-#include "AuthCodes.h"
-#include "Define.h"
-#include
-
-namespace AuthHelper
-{
- // List of client builds for verbose version info in realmlist packet
- static std::vector const ClientBuilds =
- {
- { 20726, 6, 2, 3, ' ' },
- { 20574, 6, 2, 2, 'a' },
- { 20490, 6, 2, 2, 'a' },
- { 15595, 4, 3, 4, ' ' },
- { 14545, 4, 2, 2, ' ' },
- { 13623, 4, 0, 6, 'a' },
- { 13930, 3, 3, 5, 'a' }, // 3.3.5a China Mainland build
- { 12340, 3, 3, 5, 'a' },
- { 11723, 3, 3, 3, 'a' },
- { 11403, 3, 3, 2, ' ' },
- { 11159, 3, 3, 0, 'a' },
- { 10505, 3, 2, 2, 'a' },
- { 9947, 3, 1, 3, ' ' },
- { 8606, 2, 4, 3, ' ' },
- { 6141, 1, 12, 3, ' ' },
- { 6005, 1, 12, 2, ' ' },
- { 5875, 1, 12, 1, ' ' },
- };
-
- RealmBuildInfo const* GetBuildInfo(int build)
- {
- for (std::size_t i = 0; i < ClientBuilds.size(); ++i)
- if (ClientBuilds[i].Build == build)
- return &ClientBuilds[i];
-
- return nullptr;
- }
-
- bool IsBuildSupportingBattlenet(int build)
- {
- return build >= 15595;
- }
-}
diff --git a/src/server/bnetserver/Authentication/AuthCodes.h b/src/server/bnetserver/Authentication/AuthCodes.h
deleted file mode 100644
index dc545445e68..00000000000
--- a/src/server/bnetserver/Authentication/AuthCodes.h
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * Copyright (C) 2008-2016 TrinityCore
- * Copyright (C) 2005-2009 MaNGOS
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program. If not, see .
- */
-
-#ifndef _AUTHCODES_H
-#define _AUTHCODES_H
-
-enum GameAccountFlags
-{
- GAMEACCOUNT_FLAG_GM = 0x00000001,
- GAMEACCOUNT_FLAG_NOKICK = 0x00000002,
- GAMEACCOUNT_FLAG_COLLECTOR = 0x00000004,
- GAMEACCOUNT_FLAG_WOW_TRIAL = 0x00000008,
- GAMEACCOUNT_FLAG_CANCELLED = 0x00000010,
- GAMEACCOUNT_FLAG_IGR = 0x00000020,
- GAMEACCOUNT_FLAG_WHOLESALER = 0x00000040,
- GAMEACCOUNT_FLAG_PRIVILEGED = 0x00000080,
- GAMEACCOUNT_FLAG_EU_FORBID_ELV = 0x00000100,
- GAMEACCOUNT_FLAG_EU_FORBID_BILLING = 0x00000200,
- GAMEACCOUNT_FLAG_WOW_RESTRICTED = 0x00000400,
- GAMEACCOUNT_FLAG_PARENTAL_CONTROL = 0x00000800,
- GAMEACCOUNT_FLAG_REFERRAL = 0x00001000,
- GAMEACCOUNT_FLAG_BLIZZARD = 0x00002000,
- GAMEACCOUNT_FLAG_RECURRING_BILLING = 0x00004000,
- GAMEACCOUNT_FLAG_NOELECTUP = 0x00008000,
- GAMEACCOUNT_FLAG_KR_CERTIFICATE = 0x00010000,
- GAMEACCOUNT_FLAG_EXPANSION_COLLECTOR = 0x00020000,
- GAMEACCOUNT_FLAG_DISABLE_VOICE = 0x00040000,
- GAMEACCOUNT_FLAG_DISABLE_VOICE_SPEAK = 0x00080000,
- GAMEACCOUNT_FLAG_REFERRAL_RESURRECT = 0x00100000,
- GAMEACCOUNT_FLAG_EU_FORBID_CC = 0x00200000,
- GAMEACCOUNT_FLAG_OPENBETA_DELL = 0x00400000,
- GAMEACCOUNT_FLAG_PROPASS = 0x00800000,
- GAMEACCOUNT_FLAG_PROPASS_LOCK = 0x01000000,
- GAMEACCOUNT_FLAG_PENDING_UPGRADE = 0x02000000,
- GAMEACCOUNT_FLAG_RETAIL_FROM_TRIAL = 0x04000000,
- GAMEACCOUNT_FLAG_EXPANSION2_COLLECTOR = 0x08000000,
- GAMEACCOUNT_FLAG_OVERMIND_LINKED = 0x10000000,
- GAMEACCOUNT_FLAG_DEMOS = 0x20000000,
- GAMEACCOUNT_FLAG_DEATH_KNIGHT_OK = 0x40000000,
-};
-
-namespace Battlenet
-{
- enum AuthResult
- {
- AUTH_OK = 0,
- AUTH_INTERNAL_ERROR = 100,
- AUTH_CORRUPTED_MODULE = 101,
- AUTH_NO_BATTLETAGS = 102,
- AUTH_BAD_SERVER_PROOF = 103,
- AUTH_UNKNOWN_ACCOUNT = 104,
- AUTH_CLOSED = 105,
- AUTH_LOGIN_TIMEOUT = 106,
- AUTH_NO_GAME_ACCOUNTS = 107,
- AUTH_INVALID_TOKEN = 108,
- AUTH_INVALID_PROGRAM = 109,
- AUTH_INVALID_OS = 110,
- AUTH_UNSUPPORTED_LANGUAGE = 111,
- AUTH_REGION_BAD_VERSION = 112,
- AUTH_TEMP_OUTAGE = 113,
- AUTH_CANT_DOWNLOAD_MODULE = 114,
- AUTH_DUPLICATE_LOGON = 115,
- AUTH_BAD_CREDENTIALS_2 = 116,
- AUTH_VERSION_CHECK_SUCCEEDED = 117,
- AUTH_BAD_VERSION_HASH = 118,
- AUTH_CANT_RETRIEVE_PORTAL_LIST = 119,
- AUTH_DARK_PORTAL_DOES_NOT_EXIST = 120,
- AUTH_DARK_PORTAL_FILE_CORRUPTED = 121,
- AUTH_BATTLENET_MAINTENANCE = 122,
- AUTH_LOGON_TOO_FAST = 123,
- AUTH_USE_GRUNT_LOGON = 124,
- AUTH_NO_GAME_ACCOUNTS_IN_REGION = 140,
- AUTH_ACCOUNT_LOCKED = 141,
-
- LOGIN_SERVER_BUSY = 200,
- LOGIN_NO_GAME_ACCOUNT = 201,
- LOGIN_BANNED = 202,
- LOGIN_SUSPENDED = 203,
- LOGIN_GAME_ACCOUNT_LOCKED = 204,
- LOGIN_ALREADY_ONLINE = 205,
- LOGIN_NOTIME = 206,
- LOGIN_EXPIRED = 207,
- LOGIN_EXPIRED_2 = 208,
- LOGIN_PARENTALCONTROL = 209,
- LOGIN_TRIAL_EXPIRED = 210,
- LOGIN_ANTI_INDULGENCE = 211,
- LOGIN_INCORRECT_REGION = 212,
- LOGIN_LOCKED_ENFORCED = 213,
- LOGIN_CHARGEBACK = 214,
- LOGIN_IGR_WITHOUT_BNET = 215,
- LOGIN_UNLOCKABLE_LOCK = 216,
- LOGIN_IGR_REQUIRED = 217,
- LOGIN_PAYMENT_CHANGED = 218,
- LOGIN_INVALID_PAYMENT = 219,
- LOGIN_INVALID_ACCOUNT_STATE = 220
- };
-
- namespace Wow
- {
- enum AuthResult
- {
- WOW_SUCCESS = 0,
- WOW_FAIL_BANNED = 3,
- WOW_FAIL_UNKNOWN_ACCOUNT = 4,
- WOW_FAIL_INCORRECT_PASSWORD = 5,
- WOW_FAIL_ALREADY_ONLINE = 6,
- WOW_FAIL_NO_TIME = 7,
- WOW_FAIL_DB_BUSY = 8,
- WOW_FAIL_VERSION_INVALID = 9,
- WOW_FAIL_VERSION_UPDATE = 10,
- WOW_FAIL_INVALID_SERVER = 11,
- WOW_FAIL_SUSPENDED = 12,
- WOW_FAIL_FAIL_NOACCESS = 13,
- WOW_SUCCESS_SURVEY = 14,
- WOW_FAIL_PARENTCONTROL = 15,
- WOW_FAIL_LOCKED_ENFORCED = 16,
- WOW_FAIL_TRIAL_ENDED = 17,
- WOW_FAIL_OVERMIND_CONVERTED = 18,
- WOW_FAIL_ANTI_INDULGENCE = 19,
- WOW_FAIL_EXPIRED = 20,
- WOW_FAIL_NO_GAME_ACCOUNT = 21,
- WOW_FAIL_BILLING_LOCK = 22,
- WOW_FAIL_IGR_WITHOUT_BNET = 23,
- WOW_FAIL_AA_LOCK = 24,
- WOW_FAIL_UNLOCKABLE_LOCK = 25,
- WOW_FAIL_MUST_USE_BNET = 26,
- WOW_FAIL_OTHER = 255,
- };
- }
-}
-
-struct RealmBuildInfo
-{
- int Build;
- int MajorVersion;
- int MinorVersion;
- int BugfixVersion;
- int HotfixVersion;
-};
-
-namespace AuthHelper
-{
- RealmBuildInfo const* GetBuildInfo(int build);
- bool IsBuildSupportingBattlenet(int build);
-}
-
-#endif
diff --git a/src/server/bnetserver/Authentication/BattlenetPacketCrypt.cpp b/src/server/bnetserver/Authentication/BattlenetPacketCrypt.cpp
deleted file mode 100644
index c23a7931c67..00000000000
--- a/src/server/bnetserver/Authentication/BattlenetPacketCrypt.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 2008-2016 TrinityCore
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program. If not, see .
- */
-
-#include "BattlenetPacketCrypt.h"
-#include "Cryptography/HmacHash.h"
-#include "Cryptography/BigNumber.h"
-
-Battlenet::PacketCrypt::PacketCrypt() : ::PacketCrypt(SHA256_DIGEST_LENGTH)
-{
-}
-
-void Battlenet::PacketCrypt::Init(BigNumber* K)
-{
- uint8 ServerEncryptionKey[SEED_KEY_SIZE] = { 0x68, 0xE0, 0xC7, 0x2E, 0xDD, 0xD6, 0xD2, 0xF3, 0x1E, 0x5A, 0xB1, 0x55, 0xB1, 0x8B, 0x63, 0x1E };
- uint8 ClientDecryptionKey[SEED_KEY_SIZE] = { 0xDE, 0xA9, 0x65, 0xAE, 0x54, 0x3A, 0x1E, 0x93, 0x9E, 0x69, 0x0C, 0xAA, 0x68, 0xDE, 0x78, 0x39 };
-
- HmacSha256 serverEncryptHmac(K->GetNumBytes(), K->AsByteArray().get());
- serverEncryptHmac.UpdateData(ServerEncryptionKey, SEED_KEY_SIZE);
- serverEncryptHmac.Finalize();
-
- HmacSha256 clientDecryptHmac(K->GetNumBytes(), K->AsByteArray().get());
- clientDecryptHmac.UpdateData(ClientDecryptionKey, SEED_KEY_SIZE);
- clientDecryptHmac.Finalize();
-
- _clientDecrypt.Init(clientDecryptHmac.GetDigest());
- _serverEncrypt.Init(serverEncryptHmac.GetDigest());
- _initialized = true;
-}
diff --git a/src/server/bnetserver/CMakeLists.txt b/src/server/bnetserver/CMakeLists.txt
index 7aa861499d9..c6e8808b69a 100644
--- a/src/server/bnetserver/CMakeLists.txt
+++ b/src/server/bnetserver/CMakeLists.txt
@@ -16,9 +16,9 @@ CollectSourceFiles(
# Exclude
${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders)
-if( WIN32 )
+if (WIN32)
list(APPEND PRIVATE_SOURCES ${sources_windows})
- if ( MSVC )
+ if (MSVC)
list(APPEND PRIVATE_SOURCES bnetserver.rc)
endif()
endif()
@@ -35,7 +35,7 @@ add_executable(bnetserver
${PRIVATE_PCH_SOURCE}
)
-if( NOT WIN32 )
+if (NOT WIN32)
set_target_properties(bnetserver PROPERTIES
COMPILE_DEFINITIONS _TRINITY_BNET_CONFIG="${CONF_DIR}/bnetserver.conf"
)
@@ -62,26 +62,32 @@ set_target_properties(bnetserver
FOLDER
"server")
-if( WIN32 )
- if ( MSVC )
+if (WIN32)
+ if (MSVC)
add_custom_command(TARGET bnetserver
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/bnetserver.conf.dist ${CMAKE_BINARY_DIR}/bin/$(ConfigurationName)/
+ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/bnetserver.cert.pem ${CMAKE_BINARY_DIR}/bin/$(ConfigurationName)/
+ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/bnetserver.key.pem ${CMAKE_BINARY_DIR}/bin/$(ConfigurationName)/
)
- elseif ( MINGW )
+ elseif (MINGW)
add_custom_command(TARGET bnetserver
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/bnetserver.conf.dist ${CMAKE_BINARY_DIR}/bin/
+ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/bnetserver.cert.pem ${CMAKE_BINARY_DIR}/bin/
+ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/bnetserver.key.pem ${CMAKE_BINARY_DIR}/bin/
)
endif()
endif()
-if( UNIX )
+if (UNIX)
install(TARGETS bnetserver DESTINATION bin)
- install(FILES bnetserver.conf.dist DESTINATION ${CONF_DIR})
-elseif( WIN32 )
+ install(FILES bnetserver.conf.dist DESTINATION ${CONF_DIR})
+ install(FILES bnetserver.cert.pem bnetserver.key.pem DESTINATION bin)
+elseif (WIN32)
install(TARGETS bnetserver DESTINATION "${CMAKE_INSTALL_PREFIX}")
install(FILES bnetserver.conf.dist DESTINATION "${CMAKE_INSTALL_PREFIX}")
+ install(FILES bnetserver.cert.pem bnetserver.key.pem DESTINATION "${CMAKE_INSTALL_PREFIX}")
endif()
# Generate precompiled header
diff --git a/src/server/bnetserver/Main.cpp b/src/server/bnetserver/Main.cpp
index 65b8d6e772b..f95c7b90d07 100644
--- a/src/server/bnetserver/Main.cpp
+++ b/src/server/bnetserver/Main.cpp
@@ -1,6 +1,5 @@
/*
* Copyright (C) 2008-2016 TrinityCore
- * Copyright (C) 2005-2009 MaNGOS
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -24,25 +23,17 @@
* authentication server
*/
-#include "ComponentManager.h"
-#include "ModuleManager.h"
#include "SessionManager.h"
-#include "Common.h"
-#include "Config.h"
-#include "DatabaseEnv.h"
-#include "Log.h"
#include "AppenderDB.h"
#include "ProcessPriority.h"
#include "RealmList.h"
#include "GitRevision.h"
-#include "Util.h"
+#include "SslContext.h"
#include "DatabaseLoader.h"
-#include
+#include "LoginRESTService.h"
#include
-#include
#include
-#include
-#include
+#include
using boost::asio::ip::tcp;
using namespace boost::program_options;
@@ -92,6 +83,8 @@ int main(int argc, char** argv)
if (vm.count("help") || vm.count("version"))
return 0;
+ GOOGLE_PROTOBUF_VERIFY_VERSION;
+
#if PLATFORM == PLATFORM_WINDOWS
if (configService.compare("install") == 0)
return WinServiceInstall() ? 0 : 1;
@@ -135,15 +128,18 @@ int main(int argc, char** argv)
}
}
+ if (!Battlenet::SslContext::Initialize())
+ {
+ TC_LOG_ERROR("server.bnetserver", "Failed to initialize SSL context");
+ return 1;
+ }
+
// Initialize the database connection
if (!StartDB())
return 1;
_ioService = new boost::asio::io_service();
- // Get the list of realms for the server
- sRealmList->Initialize(*_ioService, sConfigMgr->GetIntDefault("RealmsStateUpdateDelay", 10));
-
// Start the listening port (acceptor) for auth connections
int32 bnport = sConfigMgr->GetIntDefault("BattlenetPort", 1119);
if (bnport < 0 || bnport > 0xFFFF)
@@ -154,6 +150,17 @@ int main(int argc, char** argv)
return 1;
}
+ if (!sLoginService.Start(*_ioService))
+ {
+ StopDB();
+ delete _ioService;
+ TC_LOG_ERROR("server.bnetserver", "Failed to initialize login service");
+ return 1;
+ }
+
+ // Get the list of realms for the server
+ sRealmList->Initialize(*_ioService, sConfigMgr->GetIntDefault("RealmsStateUpdateDelay", 10));
+
std::string bindIp = sConfigMgr->GetStringDefault("BindIP", "0.0.0.0");
sSessionMgr.StartNetwork(*_ioService, bindIp, bnport);
@@ -179,9 +186,6 @@ int main(int argc, char** argv)
_banExpiryCheckTimer->expires_from_now(boost::posix_time::seconds(_banExpiryCheckInterval));
_banExpiryCheckTimer->async_wait(BanExpiryHandler);
- sComponentMgr->Load();
- sModuleMgr->Load();
-
#if PLATFORM == PLATFORM_WINDOWS
if (m_ServiceStatus != -1)
{
@@ -197,6 +201,8 @@ int main(int argc, char** argv)
_banExpiryCheckTimer->cancel();
_dbPingTimer->cancel();
+ sLoginService.Stop();
+
sSessionMgr.StopNetwork();
sRealmList->Close();
@@ -211,6 +217,7 @@ int main(int argc, char** argv)
delete _banExpiryCheckTimer;
delete _dbPingTimer;
delete _ioService;
+ google::protobuf::ShutdownProtobufLibrary();
return 0;
}
diff --git a/src/server/bnetserver/Packets/AuthenticationPackets.cpp b/src/server/bnetserver/Packets/AuthenticationPackets.cpp
deleted file mode 100644
index d9dd3ad6bd7..00000000000
--- a/src/server/bnetserver/Packets/AuthenticationPackets.cpp
+++ /dev/null
@@ -1,428 +0,0 @@
-/*
- * Copyright (C) 2008-2016 TrinityCore
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program. If not, see .
- */
-
-#include "AuthenticationPackets.h"
-#include "Session.h"
-#include "Util.h"
-
-std::string Battlenet::Authentication::RequestCommon::ToString() const
-{
- std::ostringstream stream;
- stream << "Battlenet::Authentication::RequestCommon" << std::endl;
- APPEND_FIELD(stream, Program);
- APPEND_FIELD(stream, Platform);
- APPEND_FIELD(stream, Locale);
- APPEND_FIELD(stream, Versions);
- return stream.str();
-}
-
-void Battlenet::Authentication::ResumeRequest::Read()
-{
- Common.Program = _stream.ReadFourCC();
- Common.Platform = _stream.ReadFourCC();
- Common.Locale = _stream.ReadFourCC();
-
- Common.Versions.resize(_stream.Read(6));
- for (size_t i = 0; i < Common.Versions.size(); ++i)
- {
- Version::Record& component = Common.Versions[i];
- component.ProgramId = _stream.ReadFourCC();
- component.Component = _stream.ReadFourCC();
- component.Version = _stream.Read(32);
- }
-
- Account = _stream.ReadString(9, 3);
- GameAccountRegion = _stream.Read(8);
- GameAccountName = _stream.ReadString(5, 1);
-}
-
-std::string Battlenet::Authentication::ResumeRequest::ToString() const
-{
- std::ostringstream stream;
- stream << "Battlenet::Authentication::ResumeRequest" << std::endl;
- APPEND_FIELD(stream, Common);
- APPEND_FIELD(stream, Account);
- APPEND_FIELD(stream, GameAccountRegion);
- APPEND_FIELD(stream, GameAccountName);
- return stream.str();
-}
-
-void Battlenet::Authentication::ResumeRequest::CallHandler(Session* session)
-{
- session->HandleResumeRequest(*this);
-}
-
-Battlenet::Authentication::ProofResponse::~ProofResponse()
-{
- for (size_t i = 0; i < Response.size(); ++i)
- delete Response[i];
-}
-
-void Battlenet::Authentication::ProofResponse::Read()
-{
- Response.resize(_stream.Read(3));
- for (size_t i = 0; i < Response.size(); ++i)
- {
- BitStream*& dataStream = Response[i];
- dataStream = new BitStream(_stream.Read(10));
- memcpy(dataStream->GetBuffer(), _stream.ReadBytes(dataStream->GetSize()).get(), dataStream->GetSize());
- }
-}
-
-std::string Battlenet::Authentication::ProofResponse::ToString() const
-{
- std::ostringstream stream;
- stream << "Battlenet::Authentication::ProofRequest" << std::endl;
- APPEND_FIELD(stream, Response.size());
- return stream.str();
-}
-
-void Battlenet::Authentication::ProofResponse::CallHandler(Session* session)
-{
- session->HandleProofResponse(*this);
-}
-
-void Battlenet::Authentication::LogonRequest3::Read()
-{
- Common.Program = _stream.ReadFourCC();
- Common.Platform = _stream.ReadFourCC();
- Common.Locale = _stream.ReadFourCC();
-
- Common.Versions.resize(_stream.Read(6));
- for (size_t i = 0; i < Common.Versions.size(); ++i)
- {
- Version::Record& component = Common.Versions[i];
- component.ProgramId = _stream.ReadFourCC();
- component.Component = _stream.ReadFourCC();
- component.Version = _stream.Read(32);
- }
-
- if (_stream.Read(1))
- Account = _stream.ReadString(9, 3);
-
- Compatibility = _stream.Read(64);
-}
-
-std::string Battlenet::Authentication::LogonRequest3::ToString() const
-{
- std::ostringstream stream;
- stream << "Battlenet::Authentication::LogonRequest3" << std::endl;
- APPEND_FIELD(stream, Common);
- APPEND_FIELD(stream, Account);
- APPEND_FIELD(stream, Compatibility);
- return stream.str();
-}
-
-void Battlenet::Authentication::LogonRequest3::CallHandler(Session* session)
-{
- session->HandleLogonRequest(*this);
-}
-
-Battlenet::Authentication::LogonResponse::~LogonResponse()
-{
- for (ModuleInfo* m : Result.Success.FinalRequest)
- delete m;
-}
-
-void Battlenet::Authentication::LogonResponse::Write()
-{
- _stream.Write(Result.Type, 1);
- if (Result.Type == ResultType::SUCCESS)
- {
- _stream.Write(Result.Success.FinalRequest.size(), 3);
- for (size_t i = 0; i < Result.Success.FinalRequest.size(); ++i)
- {
- ModuleInfo* info = Result.Success.FinalRequest[i];
- _stream.WriteBytes(info->Handle.Type.c_str(), 4);
- _stream.WriteFourCC(info->Handle.Region);
- _stream.WriteBytes(info->Handle.ModuleId, 32);
- _stream.Write(info->DataSize, 10);
- _stream.WriteBytes(info->Data, info->DataSize);
- }
-
- _stream.Write(Result.Success.PingTimeout + std::numeric_limits::min(), 32);
- _stream.Write(Result.Success.RegulatorRules.is_initialized(), 1);
- if (Result.Success.RegulatorRules.is_initialized())
- {
- _stream.Write(Result.Success.RegulatorRules->Type == Regulator::LEAKY_BUCKET, 1);
- if (Result.Success.RegulatorRules->Type == Regulator::LEAKY_BUCKET)
- {
- _stream.Write(Result.Success.RegulatorRules->LeakyBucket.Threshold, 32);
- _stream.Write(Result.Success.RegulatorRules->LeakyBucket.Rate, 32);
- }
- }
-
- _stream.WriteString(Result.Success.FullName.GivenName, 8);
- _stream.WriteString(Result.Success.FullName.Surname, 8);
- _stream.Write(Result.Success.AccountId, 32);
- _stream.Write(Result.Success.Region, 8);
- _stream.Write(Result.Success.Flags, 64);
- _stream.Write(Result.Success.GameAccountRegion, 8);
- _stream.WriteString(Result.Success.GameAccountName, 5, -1);
- _stream.Write(Result.Success.GameAccountFlags, 64);
- _stream.Write(Result.Success.LogonFailures, 32);
- }
- else
- {
- _stream.Write(Result.Failure.Strings.is_initialized(), 1);
- if (Result.Failure.Strings.is_initialized())
- {
- _stream.WriteBytes(Result.Failure.Strings->Type.c_str(), 4);
- _stream.WriteFourCC(Result.Failure.Strings->Region);
- _stream.WriteBytes(Result.Failure.Strings->ModuleId, 32);
- }
-
- _stream.Write(Result.Failure.Result.Type, 2);
- if (Result.Failure.Result.Type == FailureType::FAILURE)
- {
- _stream.Write(Result.Failure.Result.Failure.Error, 16);
- _stream.Write(Result.Failure.Result.Failure.Wait + std::numeric_limits::min(), 32);
- }
- }
-
- _stream.Write(Raf.is_initialized(), 1);
- if (Raf.is_initialized())
- {
- _stream.Write(Raf->size(), 10);
- _stream.WriteBytes(Raf->data(), Raf->size());
- }
-}
-
-std::string Battlenet::Authentication::LogonResponse::ToString() const
-{
- std::ostringstream stream;
- stream << "Battlenet::Authentication::LogonResponse" << std::endl;
- APPEND_FIELD(stream, Result);
- APPEND_FIELD(stream, Raf);
- return stream.str();
-}
-
-std::string Battlenet::Authentication::FailureType::ToString() const
-{
- std::ostringstream stream;
- stream << "Battlenet::Authentication::FailureType" << std::endl;
- APPEND_FIELD(stream, Strings);
- APPEND_FIELD(stream, Result);
- return stream.str();
-}
-
-std::string Battlenet::Authentication::FailureType::ResultType::ToString() const
-{
- std::ostringstream stream;
- stream << "Battlenet::Authentication::ResponseFailure::Result" << std::endl;
- switch (Type)
- {
- case UPDATE:
- APPEND_FIELD(stream, Update);
- break;
- case FAILURE:
- APPEND_FIELD(stream, Failure);
- break;
- case VERSION_CHECK_DISCONNECT:
- APPEND_FIELD(stream, VersionCheckDisconnect);
- break;
- default:
- break;
- }
- return stream.str();
-}
-
-std::string Battlenet::Authentication::FailureType::ResultType::UpdateType::ToString() const
-{
- return "Battlenet::Authentication::ResponseFailure::Result::Update";
-}
-
-std::string Battlenet::Authentication::FailureType::ResultType::FailureType::ToString() const
-{
- std::ostringstream stream;
- stream << "Battlenet::Authentication::ResponseFailure::Result::Failure" << std::endl;
- APPEND_FIELD(stream, Error);
- APPEND_FIELD(stream, Wait);
- return stream.str();
-}
-
-std::string Battlenet::Authentication::FailureType::ResultType::VersionCheckDisconnectType::ToString() const
-{
- return "Battlenet::Authentication::ResponseFailure::Result::VersionCheckDisconnect";
-}
-
-std::string Battlenet::Authentication::Regulator::NoneType::ToString() const
-{
- return "Battlenet::Regulator::None";
-}
-
-std::string Battlenet::Authentication::Regulator::LeakyBucketType::ToString() const
-{
- std::ostringstream stream;
- stream << "Battlenet::Regulator::LeakyBucket" << std::endl;
- APPEND_FIELD(stream, Threshold);
- APPEND_FIELD(stream, Rate);
- return stream.str();
-}
-
-std::string Battlenet::Authentication::Regulator::ToString() const
-{
- std::ostringstream stream;
- stream << "Battlenet::Regulator" << std::endl;
- switch (Type)
- {
- case NONE:
- APPEND_FIELD(stream, None);
- break;
- case LEAKY_BUCKET:
- APPEND_FIELD(stream, LeakyBucket);
- break;
- default:
- break;
- }
- return stream.str();
-}
-
-std::string Battlenet::Authentication::LogonResponse::ResultType::ToString() const
-{
- std::ostringstream stream;
- stream << "Battlenet::Authentication::LogonResponse::Result" << std::endl;
- switch (Type)
- {
- case SUCCESS:
- APPEND_FIELD(stream, Success);
- break;
- case FAILURE:
- APPEND_FIELD(stream, Failure);
- break;
- default:
- break;
- }
- return stream.str();
-}
-
-std::string Battlenet::Authentication::LogonResponse::ResultType::SuccessType::ToString() const
-{
- std::ostringstream stream;
- stream << "Battlenet::Authentication::LogonResponse::Result::Success" << std::endl;
- APPEND_FIELD(stream, FinalRequest);
- APPEND_FIELD(stream, PingTimeout);
- APPEND_FIELD(stream, RegulatorRules);
- APPEND_FIELD(stream, FullName);
- APPEND_FIELD(stream, AccountId);
- APPEND_FIELD(stream, Region);
- APPEND_FIELD(stream, Flags);
- APPEND_FIELD(stream, GameAccountRegion);
- APPEND_FIELD(stream, GameAccountName);
- APPEND_FIELD(stream, GameAccountFlags);
- APPEND_FIELD(stream, LogonFailures);
- return stream.str();
-}
-
-void Battlenet::Authentication::LogonResponse::SetAuthResult(AuthResult result)
-{
- Result.Type = result != AUTH_OK ? ResultType::FAILURE : ResultType::SUCCESS;
- Result.Failure.Result.Failure.Error = result;
-}
-
-Battlenet::Authentication::ResumeResponse::~ResumeResponse()
-{
- for (ModuleInfo* m : Result.Success.FinalRequest)
- delete m;
-}
-
-void Battlenet::Authentication::ResumeResponse::Write()
-{
- _stream.Write(Result.Type, 1);
- if (Result.Type == ResultType::SUCCESS)
- {
- _stream.Write(Result.Success.FinalRequest.size(), 3);
- for (size_t i = 0; i < Result.Success.FinalRequest.size(); ++i)
- {
- ModuleInfo* info = Result.Success.FinalRequest[i];
- _stream.WriteBytes(info->Handle.Type.c_str(), 4);
- _stream.WriteFourCC(info->Handle.Region);
- _stream.WriteBytes(info->Handle.ModuleId, 32);
- _stream.Write(info->DataSize, 10);
- _stream.WriteBytes(info->Data, info->DataSize);
- }
-
- _stream.Write(Result.Success.PingTimeout + std::numeric_limits::min(), 32);
- _stream.Write(Result.Success.RegulatorRules.is_initialized(), 1);
- if (Result.Success.RegulatorRules.is_initialized())
- {
- _stream.Write(Result.Success.RegulatorRules->Type == Regulator::LEAKY_BUCKET, 1);
- if (Result.Success.RegulatorRules->Type == Regulator::LEAKY_BUCKET)
- {
- _stream.Write(Result.Success.RegulatorRules->LeakyBucket.Threshold, 32);
- _stream.Write(Result.Success.RegulatorRules->LeakyBucket.Rate, 32);
- }
- }
- }
- else
- {
- _stream.Write(Result.Failure.Strings.is_initialized(), 1);
- if (Result.Failure.Strings.is_initialized())
- {
- _stream.WriteBytes(Result.Failure.Strings->Type.c_str(), 4);
- _stream.WriteFourCC(Result.Failure.Strings->Region);
- _stream.WriteBytes(Result.Failure.Strings->ModuleId, 32);
- }
-
- _stream.Write(Result.Failure.Result.Type, 2);
- if (Result.Failure.Result.Type == FailureType::FAILURE)
- {
- _stream.Write(Result.Failure.Result.Failure.Error, 16);
- _stream.Write(Result.Failure.Result.Failure.Wait + std::numeric_limits::min(), 32);
- }
- }
-}
-
-std::string Battlenet::Authentication::ResumeResponse::ToString() const
-{
- std::ostringstream stream;
- stream << "Battlenet::Authentication::ResumeResponse" << std::endl;
- return stream.str();
-}
-
-void Battlenet::Authentication::ResumeResponse::SetAuthResult(AuthResult result)
-{
- Result.Type = result != AUTH_OK ? ResultType::FAILURE : ResultType::SUCCESS;
- Result.Failure.Result.Failure.Error = result;
-}
-
-Battlenet::Authentication::ProofRequest::~ProofRequest()
-{
- for (size_t i = 0; i < Modules.size(); ++i)
- delete Modules[i];
-}
-
-void Battlenet::Authentication::ProofRequest::Write()
-{
- _stream.Write(Modules.size(), 3);
- for (ModuleInfo const* info : Modules)
- {
- _stream.WriteBytes(info->Handle.Type.c_str(), 4);
- _stream.WriteFourCC(info->Handle.Region);
- _stream.WriteBytes(info->Handle.ModuleId, 32);
- _stream.Write(info->DataSize, 10);
- _stream.WriteBytes(info->Data, info->DataSize);
- }
-}
-
-std::string Battlenet::Authentication::ProofRequest::ToString() const
-{
- std::ostringstream stream;
- stream << "Battlenet::Authentication::ProofRequest" << std::endl;
- APPEND_FIELD(stream, Modules);
- return stream.str();
-}
diff --git a/src/server/bnetserver/Packets/AuthenticationPackets.h b/src/server/bnetserver/Packets/AuthenticationPackets.h
deleted file mode 100644
index 9082585085d..00000000000
--- a/src/server/bnetserver/Packets/AuthenticationPackets.h
+++ /dev/null
@@ -1,267 +0,0 @@
-/*
- * Copyright (C) 2008-2016 TrinityCore
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program. If not, see .
- */
-
-#ifndef AuthenticationPackets_h__
-#define AuthenticationPackets_h__
-
-#include "PacketsBase.h"
-#include "ComponentManager.h"
-#include "ModuleManager.h"
-
-namespace Battlenet
-{
- namespace Authentication
- {
- enum Opcode
- {
- CMSG_LOGON_REQUEST = 0x0, // Deprecated
- CMSG_RESUME_REQUEST = 0x1,
- CMSG_PROOF_RESPONSE = 0x2,
- CMSG_GENERATE_SINGLE_SIGN_ON_TOKEN_REQUEST_2 = 0x8, // Not implemented
- CMSG_LOGON_REQUEST_3 = 0x9,
- CMSG_SINGLE_SIGN_ON_REQUEST_3 = 0xA, // Not implemented
-
- SMSG_LOGON_RESPONSE = 0x0,
- SMSG_RESUME_RESPONSE = 0x1,
- SMSG_PROOF_REQUEST = 0x2,
- SMSG_PATCH = 0x3, // Not implemented
- SMSG_AUTHORIZED_LICENSES = 0x4, // Not implemented
- SMSG_GENERATE_SINGLE_SIGN_ON_TOKEN_RESPONSE_2 = 0x8 // Not implemented
- };
-
- struct RequestCommon : public PrintableComponent
- {
- std::string Program;
- std::string Platform;
- std::string Locale;
- std::vector Versions;
-
- std::string ToString() const override;
- };
-
- class ResumeRequest final : public ClientPacket
- {
- public:
- ResumeRequest(PacketHeader const& header, BitStream& stream) : ClientPacket(header, stream)
- {
- ASSERT(header == PacketHeader(CMSG_RESUME_REQUEST, AUTHENTICATION) && "Invalid packet header for ResumeRequest");
- }
-
- void Read() override;
- std::string ToString() const override;
- void CallHandler(Session* session) override;
-
- RequestCommon Common;
- std::string Account;
- uint8 GameAccountRegion = 0;
- std::string GameAccountName;
- };
-
- class ProofResponse final : public ClientPacket
- {
- public:
- ProofResponse(PacketHeader const& header, BitStream& stream) : ClientPacket(header, stream)
- {
- ASSERT(header == PacketHeader(CMSG_PROOF_RESPONSE, AUTHENTICATION) && "Invalid packet header for ProofResponse");
- }
-
- ~ProofResponse();
-
- void Read() override;
- std::string ToString() const override;
- void CallHandler(Session* session) override;
-
- std::vector Response;
- };
-
- class LogonRequest3 final : public ClientPacket
- {
- public:
- LogonRequest3(PacketHeader const& header, BitStream& stream) : ClientPacket(header, stream)
- {
- ASSERT(header == PacketHeader(CMSG_LOGON_REQUEST_3, AUTHENTICATION) && "Invalid packet header for LogonRequest3");
- }
-
- void Read() override;
- std::string ToString() const override;
- void CallHandler(Session* session) override;
-
- RequestCommon Common;
- std::string Account;
- uint64 Compatibility = 0;
- };
-
- struct FailureType : public PrintableComponent
- {
- Optional Strings;
-
- enum
- {
- UPDATE = 0,
- FAILURE = 1,
- VERSION_CHECK_DISCONNECT = 2
- };
-
- struct ResultType : public PrintableComponent
- {
- int32 Type = FAILURE;
-
- struct UpdateType : public PrintableComponent
- {
- std::string ToString() const override;
- } Update;
-
- struct FailureType : public PrintableComponent
- {
- AuthResult Error = AUTH_OK;
- int32 Wait = 0;
-
- std::string ToString() const override;
- } Failure;
-
- struct VersionCheckDisconnectType : public PrintableComponent
- {
- std::string ToString() const override;
- } VersionCheckDisconnect;
-
- std::string ToString() const override;
- } Result;
-
- std::string ToString() const override;
- };
-
- struct Regulator : public PrintableComponent
- {
- enum
- {
- NONE = 0,
- LEAKY_BUCKET = 1
- };
-
- int32 Type = LEAKY_BUCKET;
- struct NoneType : public PrintableComponent
- {
- std::string ToString() const override;
- } None;
-
- struct LeakyBucketType : public PrintableComponent
- {
- uint32 Threshold = 25000000;
- uint32 Rate = 1000;
-
- std::string ToString() const override;
- } LeakyBucket;
-
- std::string ToString() const override;
- };
-
- class LogonResponse final : public ServerPacket
- {
- public:
- LogonResponse() : ServerPacket(PacketHeader(SMSG_LOGON_RESPONSE, AUTHENTICATION))
- {
- }
-
- ~LogonResponse();
-
- void Write() override;
- std::string ToString() const override;
- void SetAuthResult(AuthResult result);
-
- struct ResultType : public PrintableComponent
- {
- enum
- {
- SUCCESS = 0,
- FAILURE = 1
- };
-
- int32 Type = SUCCESS;
- struct SuccessType : public PrintableComponent
- {
- std::vector FinalRequest;
- int32 PingTimeout = 120000;
- Optional RegulatorRules;
- Battlenet::Account::FullName FullName;
- uint32 AccountId = 0;
- uint8 Region = 2;
- uint64 Flags = 0;
- uint8 GameAccountRegion = 2;
- std::string GameAccountName;
- uint64 GameAccountFlags = 0;
- uint32 LogonFailures = 0;
-
- std::string ToString() const override;
- } Success;
-
- FailureType Failure;
-
- std::string ToString() const override;
- } Result;
-
- Optional> Raf;
- };
-
- class ResumeResponse final : public ServerPacket
- {
- public:
- ResumeResponse() : ServerPacket(PacketHeader(SMSG_RESUME_RESPONSE, AUTHENTICATION))
- {
- }
-
- ~ResumeResponse();
-
- void Write() override;
- std::string ToString() const override;
-
- void SetAuthResult(AuthResult result);
-
- struct ResultType
- {
- enum
- {
- SUCCESS = 0,
- FAILURE = 1
- };
-
- int32 Type = SUCCESS;
- struct SuccessType
- {
- std::vector FinalRequest;
- int32 PingTimeout = 120000;
- Optional RegulatorRules;
- } Success;
-
- FailureType Failure;
- } Result;
- };
-
- class ProofRequest final : public ServerPacket
- {
- public:
- ProofRequest() : ServerPacket(PacketHeader(SMSG_PROOF_REQUEST, AUTHENTICATION)) { }
- ~ProofRequest();
-
- void Write() override;
- std::string ToString() const override;
-
- std::vector Modules;
- };
- }
-}
-
-#endif // AuthenticationPackets_h__
diff --git a/src/server/bnetserver/Packets/BitStream.h b/src/server/bnetserver/Packets/BitStream.h
deleted file mode 100644
index 0e91c930514..00000000000
--- a/src/server/bnetserver/Packets/BitStream.h
+++ /dev/null
@@ -1,258 +0,0 @@
-/*
- * Copyright (C) 2008-2016 TrinityCore
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program. If not, see .
- */
-
-#ifndef BitStream_h__
-#define BitStream_h__
-
-#include "Common.h"
-#include "ByteConverter.h"
-#include "MessageBuffer.h"
-#include
-#include
-#include
-#include
-
-namespace Battlenet
-{
- union FloatToInt
- {
- float AsFloat;
- uint32 AsInt;
- };
-
- class BitStreamPositionException : public std::exception
- {
- static uint32 const MessageSize = 128;
-
- public:
- BitStreamPositionException(bool read, uint32 operationSize, uint32 position, uint32 streamSize)
- {
- memset(_message, 0, MessageSize);
- snprintf(_message, MessageSize, "Attempted to %s more bits (%u) %s stream than %s (%u)\n",
- (read ? "read" : "write"),
- operationSize + position,
- (read ? "from" : "to"),
- (read ? "exist" : "allowed"),
- streamSize);
- }
-
- char const* what() const throw()
- {
- return _message;
- }
-
- private:
- char _message[MessageSize];
- };
-
- class BitStream
- {
- public:
- static uint32 const MaxSize = 0x4000;
-
- // length : The maximum number of bytes to read
- BitStream(uint32 length) : _writePos(length * 8), _readPos(0)
- {
- _buffer.resize(length, 0);
- }
-
- BitStream(MessageBuffer&& buffer) : _writePos(uint32(buffer.GetActiveSize()) << 3), _readPos(0), _buffer(buffer.Move())
- {
- }
-
- BitStream() : _writePos(0), _readPos(0)
- {
- _buffer.reserve(0x1000);
- }
-
- void AlignToNextByte()
- {
- _readPos = (_readPos + 7) & ~7;
- _writePos = (_writePos + 7) & ~7;
- }
-
- std::string ReadString(uint32 bitCount, int32 baseLength = 0)
- {
- uint32 len = Read(bitCount) + baseLength;
- AlignToNextByte();
- std::string str(reinterpret_cast(&_buffer[_readPos >> 3]), len);
- _readPos += len * 8;
- return str;
- }
-
- std::unique_ptr ReadBytes(uint32 count)
- {
- AlignToNextByte();
- if (_readPos + count * 8 > _writePos)
- throw BitStreamPositionException(true, count * 8, _readPos, _writePos);
-
- std::unique_ptr buf(new uint8[count]);
- memcpy(buf.get(), &_buffer[_readPos >> 3], count);
- _readPos += count * 8;
- return buf;
- }
-
- float ReadFloat()
- {
- union
- {
- float AsFloat;
- uint32 AsInt;
- } convert;
-
- convert.AsInt = Read(32);
- return convert.AsFloat;
- }
-
- std::string ReadFourCC()
- {
- uint32 fcc = Read(32);
- EndianConvertReverse(fcc);
- size_t len = 4;
- while (!(fcc & 0xFF) && len)
- {
- fcc >>= 8;
- --len;
- }
-
- return std::string(reinterpret_cast(&fcc), len);
- }
-
- template
- T Read(uint32 bitCount)
- {
- static_assert(std::is_integral::value || std::is_enum::value, "T must be an integer type");
-
- if (_readPos + bitCount > _writePos)
- throw BitStreamPositionException(true, bitCount, _readPos, _writePos);
-
- uint64 ret = 0;
- while (bitCount != 0)
- {
- uint32 bitPos = (_readPos & 7);
- uint32 bitsLeftInByte = 8 - bitPos;
- if (bitsLeftInByte >= bitCount)
- bitsLeftInByte = bitCount;
-
- bitCount -= bitsLeftInByte;
- ret |= (uint64)(_buffer[_readPos >> 3] >> bitPos & (uint32)((uint8)(1 << bitsLeftInByte) - 1)) << bitCount;
- _readPos += bitsLeftInByte;
- }
-
- return static_cast(ret);
- }
-
- void WriteString(std::string const& str, uint32 bitCount, int32 baseLength = 0)
- {
- Write(str.length() + baseLength, bitCount);
- WriteBytes(str.c_str(), uint32(str.length()));
- }
-
- template
- void WriteBytes(T* data, uint32 count)
- {
- AlignToNextByte();
- if (!count || !data)
- return;
-
- if ((_writePos >> 3) + count > MaxSize)
- throw BitStreamPositionException(false, count * 8, _writePos, MaxSize * 8);
-
- _buffer.resize(_buffer.size() + count);
- memcpy(&_buffer[_writePos >> 3], data, count);
- _writePos += count * 8;
- }
-
- void WriteFloat(float value)
- {
- union
- {
- float AsFloat;
- uint32 AsInt;
- } convert;
-
- convert.AsFloat = value;
- Write(convert.AsInt, 32);
- }
-
- void WriteFourCC(std::string const& fcc)
- {
- uint32 intVal = *(uint32*)fcc.c_str();
- size_t len = fcc.length();
- EndianConvertReverse(intVal);
- // Add padding
- while (len++ < 4)
- intVal >>= 8;
-
- Write(intVal, 32);
- }
-
- template
- void Write(T value, uint32 bitCount)
- {
- static_assert(std::is_integral::value || std::is_enum::value, "T must be an integer type");
-
- if (_writePos + bitCount > 8 * MaxSize)
- throw BitStreamPositionException(false, bitCount, _writePos, MaxSize * 8);
-
- while (bitCount != 0)
- {
- uint32 bitPos = (_writePos & 7);
- uint32 bitsLeftInByte = 8 - bitPos;
- if (bitsLeftInByte >= bitCount)
- bitsLeftInByte = bitCount;
-
- bitCount -= bitsLeftInByte;
-
- uint8 firstHalf = (uint8)(~(((uint8)(1 << bitsLeftInByte) - 1) << bitPos));
- uint8 secondHalf = (uint8)((((uint8)(1 << bitsLeftInByte) - 1) & (uint8)(value >> bitCount)) << bitPos);
-
- if (_buffer.size() > (_writePos >> 3))
- _buffer[_writePos >> 3] = (uint8)((_buffer[_writePos >> 3] & firstHalf) | secondHalf);
- else
- _buffer.push_back(secondHalf);
-
- _writePos += bitsLeftInByte;
- }
- }
-
- bool IsRead() const { return _readPos >= _writePos; }
-
- uint8* GetBuffer() { return _buffer.data(); }
- uint8 const* GetBuffer() const { return _buffer.data(); }
-
- uint32 GetReadPos() const { return _readPos; }
- size_t GetSize() const { return ((_writePos + 7) & ~7) / 8; }
-
- // These methods are meant to only be used when their corresponding actions in the client ignore the value completely
- void ReadSkip(uint32 bitCount) { _readPos += bitCount; }
- void WriteSkip(uint32 bitCount) { Write(0, bitCount); }
-
- private:
- uint32 _writePos;
- uint32 _readPos;
- std::vector _buffer;
- };
-
- template<>
- bool BitStream::Read(uint32 bitCount);
-
- template<>
- void BitStream::Write(bool value, uint32 bitCount);
-}
-
-#endif // BitStream_h__
diff --git a/src/server/bnetserver/Packets/CachePackets.cpp b/src/server/bnetserver/Packets/CachePackets.cpp
deleted file mode 100644
index ece7a9db08b..00000000000
--- a/src/server/bnetserver/Packets/CachePackets.cpp
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright (C) 2008-2016 TrinityCore
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program. If not, see .
- */
-
-#include "Session.h"
-#include "Util.h"
-#include "CachePackets.h"
-
-void Battlenet::Cache::GetStreamItemsRequest::Read()
-{
- _stream.ReadSkip(31);
- Token = _stream.Read(32);
- ReferenceTime = _stream.Read(32) - std::numeric_limits::min();
- Direction = _stream.Read(1);
- MaxItems = _stream.Read(6);
- Locale = _stream.ReadFourCC();
- Stream.Type = _stream.Read(1);
- if (Stream.Type == StreamId::DESCRIPTION)
- {
- Stream.Description.ItemName = _stream.ReadFourCC();
- Stream.Description.Channel = _stream.ReadFourCC();
- }
- else
- Stream.Index = _stream.Read(16);
-}
-
-std::string Battlenet::Cache::GetStreamItemsRequest::StreamId::ToString() const
-{
- std::ostringstream stream;
- stream << "Battlenet::Cache::GetStreamItemsRequest::StreamId" << std::endl;
-
- if (Type == INDEX)
- APPEND_FIELD(stream, Index);
- else
- APPEND_FIELD(stream, Description);
-
- return stream.str();
-}
-
-std::string Battlenet::Cache::GetStreamItemsRequest::StreamId::DescriptionType::ToString() const
-{
- std::ostringstream stream;
- stream << "Battlenet::Cache::GetStreamItemsRequest::StreamId::Description" << std::endl;
- APPEND_FIELD(stream, Channel);
- APPEND_FIELD(stream, ItemName);
- return stream.str();
-}
-
-std::string Battlenet::Cache::GetStreamItemsRequest::ToString() const
-{
- std::ostringstream stream;
- stream << "Battlenet::Cache::GetStreamItemsRequest" << std::endl;
- APPEND_FIELD(stream, Token);
- APPEND_FIELD(stream, MaxItems);
- APPEND_FIELD(stream, ReferenceTime);
- APPEND_FIELD(stream, Direction);
- APPEND_FIELD(stream, Stream);
- APPEND_FIELD(stream, Locale);
- return stream.str();
-}
-
-void Battlenet::Cache::GetStreamItemsRequest::CallHandler(Session* session)
-{
- session->HandleGetStreamItemsRequest(*this);
-}
-
-Battlenet::Cache::GetStreamItemsResponse::~GetStreamItemsResponse()
-{
- for (size_t i = 0; i < Items.size(); ++i)
- delete Items[i];
-}
-
-void Battlenet::Cache::GetStreamItemsResponse::Write()
-{
- _stream.Write(Offset, 16);
- _stream.Write(TotalNumItems, 16);
- _stream.Write(Token, 32);
- _stream.Write(Items.size(), 6);
- for (ModuleInfo const* info : Items)
- {
- _stream.WriteBytes(info->Handle.Type.c_str(), 4);
- _stream.WriteFourCC(info->Handle.Region);
- _stream.WriteBytes(info->Handle.ModuleId, 32);
- _stream.WriteSkip(27);
- _stream.WriteBytes(info->Data, 4);
- }
-}
-
-std::string Battlenet::Cache::GetStreamItemsResponse::ToString() const
-{
- std::ostringstream stream;
- stream << "Battlenet::Cache::GetStreamItemsResponse" << std::endl;
- APPEND_FIELD(stream, Items);
- APPEND_FIELD(stream, Offset);
- APPEND_FIELD(stream, TotalNumItems);
- APPEND_FIELD(stream, Token);
- return stream.str();
-}
diff --git a/src/server/bnetserver/Packets/CachePackets.h b/src/server/bnetserver/Packets/CachePackets.h
deleted file mode 100644
index 5cdd0905289..00000000000
--- a/src/server/bnetserver/Packets/CachePackets.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright (C) 2008-2016 TrinityCore
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program. If not, see .
- */
-
-#ifndef CachePackets_h__
-#define CachePackets_h__
-
-#include "ModuleManager.h"
-#include "PacketsBase.h"
-
-namespace Battlenet
-{
- namespace Cache
- {
- enum Opcode
- {
- CMSG_GATEWAY_LOOKUP_REQUEST = 0x2, // Not implemented
- CMSG_CONNECT_REQUEST = 0x4, // Not implemented
- CMSG_DATA_CHUNK = 0x7, // Not implemented
- CMSG_GET_STREAM_ITEMS_REQUEST = 0x9,
-
- SMSG_GATEWAY_LOOKUP_RESPONSE = 0x3, // Not implemented
- SMSG_CONNECT_RESPONSE = 0x4, // Not implemented
- SMSG_PUBLISH_LIST_RESPONSE = 0x7, // Not implemented
- SMSG_RESULT = 0x8, // Not implemented
- SMSG_GET_STREAM_ITEMS_RESPONSE = 0x9
- };
-
- class GetStreamItemsRequest final : public ClientPacket
- {
- public:
- GetStreamItemsRequest(PacketHeader const& header, BitStream& stream) : ClientPacket(header, stream)
- {
- ASSERT(header == PacketHeader(CMSG_GET_STREAM_ITEMS_REQUEST, CACHE) && "Invalid packet header for GetStreamItemsRequest");
- }
-
- void Read() override;
- std::string ToString() const override;
- void CallHandler(Session* session) override;
-
- enum
- {
- BEFORE = 0,
- AFTER = 1
- };
-
- uint32 Token = 0;
- uint8 MaxItems = 0;
- int32 ReferenceTime = 0;
- uint8 Direction = BEFORE;
-
- struct StreamId : public PrintableComponent
- {
- enum
- {
- INDEX = 0,
- DESCRIPTION = 1
- };
-
- int32 Type;
-
- uint16 Index;
- struct DescriptionType : public PrintableComponent
- {
- std::string Channel;
- std::string ItemName;
-
- std::string ToString() const override;
- } Description;
-
- std::string ToString() const override;
- } Stream;
-
- std::string Locale;
- };
-
- class GetStreamItemsResponse final : public ServerPacket
- {
- public:
- GetStreamItemsResponse() : ServerPacket(PacketHeader(SMSG_GET_STREAM_ITEMS_RESPONSE, CACHE))
- {
- }
-
- ~GetStreamItemsResponse();
-
- void Write() override;
- std::string ToString() const override;
-
- std::vector Items;
- uint16 Offset = 0;
- uint16 TotalNumItems = 1;
- uint32 Token = 0;
- };
- }
-}
-
-#endif // CachePackets_h__
diff --git a/src/server/bnetserver/Packets/ChatPackets.h b/src/server/bnetserver/Packets/ChatPackets.h
deleted file mode 100644
index 3b1c5c155e0..00000000000
--- a/src/server/bnetserver/Packets/ChatPackets.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (C) 2008-2016 TrinityCore
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program. If not, see .
- */
-
-#ifndef ChatPackets_h__
-#define ChatPackets_h__
-
-#include "PacketsBase.h"
-
-namespace Battlenet
-{
- namespace Chat
- {
- enum Opcode
- {
- CMSG_JOIN_REQUEST_2 = 0x00, // Not implemented
- CMSG_LEAVE_REQUEST = 0x02, // Not implemented
- CMSG_INVITE_REQUEST = 0x03, // Not implemented
- CMSG_CREATE_AND_INVITE_REQUEST = 0x0A, // Not implemented
- CMSG_MESSAGE_SEND = 0x0B, // Not implemented
- CMSG_DATAGRAM_CONNECTION_UPDATE = 0x0D, // Not implemented
- CMSG_REPORT_SPAM_REQUEST = 0x0E, // Not implemented
- CMSG_WHISPER_SEND = 0x13, // Not implemented
- CMSG_ENUM_CATEGORY_DESCRIPTIONS = 0x15, // Not implemented
- CMSG_ENUM_CONFERENCE_DESCRIPTIONS = 0x17, // Not implemented
- CMSG_ENUM_CONFERENCE_MEMBER_COUNTS = 0x19, // Not implemented
- CMSG_MODIFY_CHANNEL_LIST_REQUEST = 0x1B, // Deprecated in client
- CMSG_GET_MEMBER_COUNT_REQUEST = 0x1F, // Not implemented
- CMSG_MODIFY_CHANNEL_LIST_REQUEST_2 = 0x20, // Not implemented
- CMSG_GAME_DATA_SEND_REQUEST = 0x22, // Not implemented
-
- SMSG_MEMBERSHIP_CHANGE_NOTIFY = 0x01, // Not implemented
- SMSG_INVITE_NOTIFY = 0x04, // Not implemented
- SMSG_INVITE_CANCELED = 0x07, // Not implemented
- SMSG_MESSAGE_RECV = 0x0B, // Not implemented
- SMSG_MESSAGE_UNDELIVERABLE = 0x0C, // Not implemented
- SMSG_DATAGRAM_CONNECTION_UPDATE = 0x0D, // Not implemented
- SMSG_INVITE_FAILURE = 0x0F, // Not implemented
- SMSG_SYSTEM_MESSAGE = 0x10, // Not implemented
- SMSG_MESSAGE_BLOCKED = 0x12, // Not implemented
- SMSG_WHISPER_RECV = 0x13, // Not implemented
- SMSG_WHISPER_UNDELIVERABLE = 0x14, // Not implemented
- SMSG_CATEGORY_DESCRIPTIONS = 0x16, // Not implemented
- SMSG_CONFERENCE_DESCRIPTIONS = 0x18, // Not implemented
- SMSG_CONFERENCE_MEMBER_COUNTS = 0x1A, // Not implemented
- SMSG_JOIN_NOTIFY_2 = 0x1B, // Not implemented
- SMSG_MODIFY_CHANNEL_LIST_RESPONSE = 0x1C, // Deprecated in client
- SMSG_CONFIG_CHANGED = 0x1D, // Not implemented
- SMSG_WHISPER_ECHO_RECV = 0x1E, // Not implemented
- SMSG_GET_MEMBER_COUNT_RESPONSE = 0x1F, // Not implemented
- SMSG_MODIFY_CHANNEL_LIST_RESPONSE_2 = 0x21, // Not implemented
- SMSG_GAME_DATA_SEND_RESPONSE = 0x23, // Not implemented
- SMSG_GAME_DATA_RECV = 0x24 // Not implemented
- };
- }
-}
-
-#endif // ChatPackets_h__
diff --git a/src/server/bnetserver/Packets/ConnectionPackets.cpp b/src/server/bnetserver/Packets/ConnectionPackets.cpp
deleted file mode 100644
index cdb438085f1..00000000000
--- a/src/server/bnetserver/Packets/ConnectionPackets.cpp
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright (C) 2008-2016 TrinityCore
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program. If not, see .
- */
-
-#include "Session.h"
-#include "ConnectionPackets.h"
-
-std::string Battlenet::Connection::Ping::ToString() const
-{
- return "Battlenet::Connection::Ping";
-}
-
-void Battlenet::Connection::Ping::CallHandler(Session* session)
-{
- session->HandlePing(*this);
-}
-
-std::string Battlenet::Connection::EnableEncryption::ToString() const
-{
- return "Battlenet::Connection::EnableEncryption";
-}
-
-void Battlenet::Connection::EnableEncryption::CallHandler(Session* session)
-{
- session->HandleEnableEncryption(*this);
-}
-
-std::string Battlenet::Connection::LogoutRequest::ToString() const
-{
- return "Battlenet::Connection::LogoutRequest";
-}
-
-void Battlenet::Connection::LogoutRequest::CallHandler(Session* session)
-{
- session->HandleLogoutRequest(*this);
-}
-
-void Battlenet::Connection::DisconnectRequest::Read()
-{
- Error = _stream.Read(16);
- Timeout = _stream.Read(32);
-}
-
-std::string Battlenet::Connection::DisconnectRequest::ToString() const
-{
- std::ostringstream str;
- str << "Battlenet::Connection::DisconnectRequest" << std::endl;
- APPEND_FIELD(str, Error);
- APPEND_FIELD(str, Timeout);
- return str.str();
-}
-
-void Battlenet::Connection::ConnectionClosing::Read()
-{
- Packets.resize(_stream.Read(6));
- for (size_t i = 0; i < Packets.size(); ++i)
- {
- PacketInfo& info = Packets[i];
- info.Command = _stream.ReadFourCC();
- info.Time = _stream.Read(32);
- info.Size = _stream.Read(16);
- info.Layer = _stream.ReadFourCC();
- info.Offset = _stream.Read(16);
- }
-
- Reason = _stream.Read(4);
- _stream.ReadBytes(_stream.Read(8)); // BadData
-
- if (_stream.Read(1)) // HasHeader
- {
- Header.Command = _stream.Read(6);
- if (_stream.Read(1))
- Header.Channel = _stream.Read(4);
- }
-
- Now = _stream.Read(32);
-}
-
-std::string Battlenet::Connection::ConnectionClosing::PacketInfo::ToString() const
-{
- std::ostringstream stream;
- stream << "Battlenet::Connection::ConnectionClosing::PacketInfo" << std::endl;
- APPEND_FIELD(stream, Layer);
- APPEND_FIELD(stream, Command);
- APPEND_FIELD(stream, Offset);
- APPEND_FIELD(stream, Size);
- APPEND_FIELD(stream, Time);
- return stream.str();
-}
-
-std::string Battlenet::Connection::ConnectionClosing::ToString() const
-{
- std::ostringstream stream;
- stream << "Battlenet::Connection::ConnectionClosing" << std::endl;
- APPEND_FIELD(stream, Header);
- APPEND_FIELD(stream, Reason);
- APPEND_FIELD(stream, Packets);
- APPEND_FIELD(stream, Now);
- return stream.str();
-}
-
-void Battlenet::Connection::ConnectionClosing::CallHandler(Session* session)
-{
- session->HandleConnectionClosing(*this);
-}
-
-std::string Battlenet::Connection::Pong::ToString() const
-{
- return "Battlenet::Connection::Pong";
-}
diff --git a/src/server/bnetserver/Packets/ConnectionPackets.h b/src/server/bnetserver/Packets/ConnectionPackets.h
deleted file mode 100644
index 9987c65d770..00000000000
--- a/src/server/bnetserver/Packets/ConnectionPackets.h
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Copyright (C) 2008-2016 TrinityCore
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program. If not, see .
- */
-
-#ifndef ConnectionPackets_h__
-#define ConnectionPackets_h__
-
-#include "PacketsBase.h"
-
-namespace Battlenet
-{
- namespace Connection
- {
- enum Opcode
- {
- CMSG_PING = 0x0,
- CMSG_ENABLE_ENCRYPTION = 0x5,
- CMSG_LOGOUT_REQUEST = 0x6,
- CMSG_DISCONNECT_REQUEST = 0x7, // Not handled
- CMSG_CONNECTION_CLOSING = 0x9,
-
- SMSG_PONG = 0x0,
- SMSG_BOOM = 0x1, // Not implemented
- SMSG_REGULATOR_UPDATE = 0x2, // Not implemented
- SMSG_SERVER_VERSION = 0x3, // Not implemented
- SMSG_STUN_SERVERS = 0x4 // Not implemented
- };
-
- class Ping final : public ClientPacket
- {
- public:
- Ping(PacketHeader const& header, BitStream& stream) : ClientPacket(header, stream)
- {
- ASSERT(header == PacketHeader(CMSG_PING, CONNECTION) && "Invalid packet header for Ping");
- }
-
- void Read() override { }
- std::string ToString() const override;
- void CallHandler(Session* session) override;
- };
-
- class EnableEncryption final : public ClientPacket
- {
- public:
- EnableEncryption(PacketHeader const& header, BitStream& stream) : ClientPacket(header, stream)
- {
- ASSERT(header == PacketHeader(CMSG_ENABLE_ENCRYPTION, CONNECTION) && "Invalid packet header for EnableEncryption");
- }
-
- void Read() override { }
- std::string ToString() const override;
- void CallHandler(Session* session) override;
- uint8* GetRemainingData() { return _stream.GetBuffer() + (((_stream.GetReadPos() + 7) & ~7) / 8); }
- size_t GetRemainingSize() const { return _stream.GetSize() - (((_stream.GetReadPos() + 7) & ~7) / 8); }
- };
-
- class LogoutRequest final : public ClientPacket
- {
- public:
- LogoutRequest(PacketHeader const& header, BitStream& stream) : ClientPacket(header, stream)
- {
- ASSERT(header == PacketHeader(CMSG_LOGOUT_REQUEST, CONNECTION) && "Invalid packet header for LogoutRequest");
- }
-
- void Read() override { }
- std::string ToString() const override;
- void CallHandler(Session* session) override;
- };
-
- class DisconnectRequest final : public ClientPacket
- {
- public:
- DisconnectRequest(PacketHeader const& header, BitStream& stream) : ClientPacket(header, stream)
- {
- ASSERT(header == PacketHeader(CMSG_DISCONNECT_REQUEST, CONNECTION) && "Invalid packet header for DisconnectRequest");
- }
-
- void Read() override;
- std::string ToString() const override;
-
- uint16 Error = 0;
- uint32 Timeout = 0;
- };
-
- class ConnectionClosing final : public ClientPacket
- {
- public:
- enum ClosingReason
- {
- PACKET_TOO_LARGE = 1,
- PACKET_CORRUPT = 2,
- PACKET_INVALID = 3,
- PACKET_INCORRECT = 4,
- HEADER_CORRUPT = 5,
- HEADER_IGNORED = 6,
- HEADER_INCORRECT = 7,
- PACKET_REJECTED = 8,
- CHANNEL_UNHANDLED = 9,
- COMMAND_UNHANDLED = 10,
- COMMAND_BAD_PERMISSIONS = 11,
- DIRECT_CALL = 12,
- TIMEOUT = 13,
- };
-
- struct PacketInfo : public PrintableComponent
- {
- std::string Layer;
- std::string Command;
- uint16 Offset;
- uint16 Size;
- uint32 Time;
-
- std::string ToString() const override;
- };
-
- ConnectionClosing(PacketHeader const& header, BitStream& stream) : ClientPacket(header, stream)
- {
- ASSERT(header == PacketHeader(CMSG_CONNECTION_CLOSING, CONNECTION) && "Invalid packet header for ConnectionClosing");
- }
-
- void Read() override;
- std::string ToString() const override;
- void CallHandler(Session* session) override;
-
- PacketHeader Header;
- ClosingReason Reason = PACKET_CORRUPT;
- std::vector Packets;
- time_t Now = 0;
- };
-
- class Pong final : public ServerPacket
- {
- public:
- Pong() : ServerPacket(PacketHeader(SMSG_PONG, CONNECTION))
- {
- }
-
- void Write() override { }
- std::string ToString() const override;
- };
- }
-}
-
-#endif // ConnectionPackets_h__
diff --git a/src/server/bnetserver/Packets/FriendsPackets.cpp b/src/server/bnetserver/Packets/FriendsPackets.cpp
deleted file mode 100644
index 90a124fb915..00000000000
--- a/src/server/bnetserver/Packets/FriendsPackets.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (C) 2008-2016 TrinityCore
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program. If not, see .
- */
-
-#include "FriendsPackets.h"
-
-void Battlenet::Friends::SendInvitationRequest::Read()
-{
- Token = _stream.Read(32);
-
- if (_stream.Read(1))
- PresenceId = _stream.Read(32);
-
- if (_stream.Read(1))
- AccountMail = _stream.ReadString(9, 3);
-
- if (_stream.Read(1))
- AccountId = _stream.Read(32);
-
- if (_stream.Read(1))
- {
- GameAccount = boost::in_place();
- GameAccount->Region = _stream.Read(8);
- GameAccount->ProgramId = _stream.ReadFourCC();
- GameAccount->Id = _stream.Read(32);
- }
-
- _stream.ReadSkip(7);
-
- if (_stream.Read(1))
- Nickname = _stream.ReadString(7);
-
- Source = _stream.ReadFourCC();
- Role = _stream.Read(32);
-
- if (_stream.Read(1))
- InvitationMsg = _stream.ReadString(9);
-}
-
-std::string Battlenet::Friends::SendInvitationRequest::ToString() const
-{
- std::ostringstream stream;
- stream << "Battlenet::Friends::SendInvitationRequest" << std::endl;
- APPEND_FIELD(stream, Token);
- APPEND_FIELD(stream, PresenceId);
- APPEND_FIELD(stream, GameAccount);
- APPEND_FIELD(stream, AccountId);
- APPEND_FIELD(stream, AccountMail);
- APPEND_FIELD(stream, Nickname);
- APPEND_FIELD(stream, InvitationMsg);
- APPEND_FIELD(stream, Source);
- APPEND_FIELD(stream, Role);
- return stream.str();
-}
-
-void Battlenet::Friends::SendInvitationRequest::CallHandler(Session* /*session*/)
-{
-}
diff --git a/src/server/bnetserver/Packets/FriendsPackets.h b/src/server/bnetserver/Packets/FriendsPackets.h
deleted file mode 100644
index 8f1f513f521..00000000000
--- a/src/server/bnetserver/Packets/FriendsPackets.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (C) 2008-2016 TrinityCore
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program. If not, see .
- */
-
-#ifndef FriendsPackets_h__
-#define FriendsPackets_h__
-
-#include "PacketsBase.h"
-
-namespace Battlenet
-{
- namespace Friends
- {
- enum Opcode
- {
- CMSG_FRIEND_INVITE = 0x01, // Not implemented
- CMSG_FRIEND_INVITE_RESPONSE = 0x02, // Not implemented
- CMSG_FRIEND_REMOVE = 0x04, // Not implemented
- CMSG_FRIEND_NOTE = 0x05, // Not implemented
- CMSG_TOONS_OF_FRIEND_REQUEST = 0x06, // Not implemented
- CMSG_BLOCK_ADD = 0x08, // Not implemented
- CMSG_BLOCK_REMOVE = 0x0A, // Not implemented
- CMSG_GET_FRIENDS_OF_FRIEND = 0x0B, // Not implemented
- CMSG_GET_SOCIAL_NETWORK_FRIENDS = 0x0D, // Deprecated in client
- CMSG_SOCIAL_NETWORK_CONNECT = 0x0F, // Deprecated in client
- CMSG_SOCIAL_NETWORK_DISCONNECT = 0x11, // Deprecated in client
- CMSG_SOCIAL_NETWORK_CHECK_CONNECTED = 0x13, // Deprecated in client
- CMSG_REALID_FRIEND_INVITE = 0x16, // Deprecated in client
- CMSG_SEND_INVITATION_REQUEST = 0x1A, // Not implemented
-
- SMSG_FRIEND_INVITE_NOTIFY = 0x01, // Not implemented
- SMSG_FRIEND_INVITE_RESULT = 0x03, // Not implemented
- SMSG_TOONS_OF_FRIEND_NOTIFY = 0x06, // Not implemented
- SMSG_BLOCK_INVITE_NOTIFY = 0x07, // Deprecated in client
- SMSG_BLOCK_ADD_FAILURE = 0x09, // Not implemented
- SMSG_FRIENDS_OF_FRIEND = 0x0C, // Deprecated in client
- SMSG_SOCIAL_NETWORK_FRIENDS = 0x0E, // Deprecated in client
- SMSG_SOCIAL_NETWORK_CONNECT_RESULT = 0x10, // Deprecated in client
- SMSG_SOCIAL_NETWORK_DISCONNECT_RESULT = 0x12, // Deprecated in client
- SMSG_SOCIAL_NETWORK_CHECK_CONNECTED_RESULT = 0x14, // Deprecated in client
- SMSG_MAX_FRIENDS_NOTIFY = 0x15, // Not implemented
- SMSG_FRIENDS_LIST_NOTIFY_3 = 0x18, // Deprecated in client
- SMSG_SEND_INVITATION_RESULT = 0x1B, // Not implemented
- SMSG_FRIEND_INVITATION_ADDED_NOTIFY = 0x1C, // Not implemented
- SMSG_FRIEND_INVITATION_REMOVED_NOTIFY = 0x1D, // Not implemented
- SMSG_FRIENDS_LIST_NOTIFY_5 = 0x1E, // Not implemented
- SMSG_ACCOUNT_BLOCK_ADDED_NOTIFY = 0x1F, // Not implemented
- SMSG_ACCOUNT_BLOCK_REMOVED_NOTIFY = 0x20, // Not implemented
- SMSG_TOON_BLOCK_NOTIFY = 0x21, // Not implemented
- SMSG_FRIENDS_OF_FRIEND_RESULT = 0x22 // Not implemented
- };
-
- class SendInvitationRequest final : public ClientPacket
- {
- public:
- SendInvitationRequest(PacketHeader const& header, BitStream& stream) : ClientPacket(header, stream) { }
-
- void Read() override;
- std::string ToString() const override;
- void CallHandler(Session* session) override;
-
- uint32 Token = 0;
-
- Optional PresenceId;
- Optional GameAccount;
- Optional AccountId;
- Optional AccountMail;
- Optional Nickname;
-
- Optional InvitationMsg;
- std::string Source;
- uint32 Role = 0;
- };
- }
-}
-
-#endif // FriendsPackets_h__
diff --git a/src/server/bnetserver/Packets/PacketManager.cpp b/src/server/bnetserver/Packets/PacketManager.cpp
deleted file mode 100644
index 588ca1a0a86..00000000000
--- a/src/server/bnetserver/Packets/PacketManager.cpp
+++ /dev/null
@@ -1,263 +0,0 @@
-/*
- * Copyright (C) 2008-2016 TrinityCore
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program. If not, see .
- */
-
-#include "PacketManager.h"
-
-Battlenet::ClientPacket* Battlenet::PacketManager::CreateClientPacket(PacketHeader const& header, BitStream& stream)
-{
- auto packetInfo = _clientPacketTable.find(header);
- if (packetInfo == _clientPacketTable.end())
- return nullptr;
-
- if (!packetInfo->second.Constructor)
- return nullptr;
-
- ClientPacket* packet = packetInfo->second.Constructor(header, stream);
- packet->Read();
- return packet;
-}
-
-char const* Battlenet::PacketManager::GetClientPacketName(PacketHeader const& header)
-{
- auto packetInfo = _clientPacketTable.find(header);
- if (packetInfo == _clientPacketTable.end())
- return nullptr;
-
- return packetInfo->second.Name;
-}
-
-char const* Battlenet::PacketManager::GetServerPacketName(PacketHeader const& header)
-{
- auto packetInfo = _serverPacketTable.find(header);
- if (packetInfo == _serverPacketTable.end())
- return nullptr;
-
- return packetInfo->second.Name;
-}
-
-bool Battlenet::PacketManager::IsHandled(PacketHeader const& header)
-{
- auto packetInfo = _clientPacketTable.find(header);
- if (packetInfo == _clientPacketTable.end())
- return false;
-
- return packetInfo->second.HasHandler;
-}
-
-Battlenet::PacketManager::PacketManager()
-{
- RegisterAuthenticationPackets();
- RegisterConnectionPackets();
- RegisterWoWRealmPackets();
- RegisterFriendsPackets();
- RegisterPresencePackets();
- RegisterChatPackets();
- RegisterSupportPackets();
- RegisterCachePackets();
- RegisterAchievementPackets();
- RegisterProfilePackets();
-}
-
-#define REGISTER_CLIENT_PACKET(header, packetClass) RegisterClientPacket(header, #packetClass)
-#define REGISTER_SERVER_PACKET(header, packetClass) RegisterPacketName(_serverPacketTable, header, #packetClass)
-#define REGISTER_CLIENT_PACKET_NAME(header, name) RegisterPacketName(_clientPacketTable, header, name)
-#define REGISTER_SERVER_PACKET_NAME(header, name) RegisterPacketName(_serverPacketTable, header, name)
-
-void Battlenet::PacketManager::RegisterAuthenticationPackets()
-{
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(Authentication::CMSG_LOGON_REQUEST, AUTHENTICATION), "Authentication::LogonRequest");
- REGISTER_CLIENT_PACKET(PacketHeader(Authentication::CMSG_RESUME_REQUEST, AUTHENTICATION), Authentication::ResumeRequest);
- REGISTER_CLIENT_PACKET(PacketHeader(Authentication::CMSG_PROOF_RESPONSE, AUTHENTICATION), Authentication::ProofResponse);
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(Authentication::CMSG_GENERATE_SINGLE_SIGN_ON_TOKEN_REQUEST_2, AUTHENTICATION), "Authentication::GenerateSingleSignOnTokenRequest2");
- REGISTER_CLIENT_PACKET(PacketHeader(Authentication::CMSG_LOGON_REQUEST_3, AUTHENTICATION), Authentication::LogonRequest3);
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(Authentication::CMSG_SINGLE_SIGN_ON_REQUEST_3, AUTHENTICATION), "Authentication::SingleSignOnRequest3");
-
- REGISTER_SERVER_PACKET(PacketHeader(Authentication::SMSG_LOGON_RESPONSE, AUTHENTICATION), Authentication::LogonResponse);
- REGISTER_SERVER_PACKET(PacketHeader(Authentication::SMSG_RESUME_RESPONSE, AUTHENTICATION), Authentication::ResumeResponse);
- REGISTER_SERVER_PACKET(PacketHeader(Authentication::SMSG_PROOF_REQUEST, AUTHENTICATION), Authentication::ProofRequest);
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Authentication::SMSG_PATCH, AUTHENTICATION), "Authentication::Patch");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Authentication::SMSG_AUTHORIZED_LICENSES, AUTHENTICATION), "Authentication::AuthorizedLicenses");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Authentication::SMSG_GENERATE_SINGLE_SIGN_ON_TOKEN_RESPONSE_2, AUTHENTICATION), "Authentication::GenerateSingleSignOnTokenResponse2");
-}
-
-void Battlenet::PacketManager::RegisterConnectionPackets()
-{
- REGISTER_CLIENT_PACKET(PacketHeader(Connection::CMSG_PING, CONNECTION), Connection::Ping);
- REGISTER_CLIENT_PACKET(PacketHeader(Connection::CMSG_ENABLE_ENCRYPTION, CONNECTION), Connection::EnableEncryption);
- REGISTER_CLIENT_PACKET(PacketHeader(Connection::CMSG_LOGOUT_REQUEST, CONNECTION), Connection::LogoutRequest);
- REGISTER_CLIENT_PACKET(PacketHeader(Connection::CMSG_DISCONNECT_REQUEST, CONNECTION), Connection::DisconnectRequest);
- REGISTER_CLIENT_PACKET(PacketHeader(Connection::CMSG_CONNECTION_CLOSING, CONNECTION), Connection::ConnectionClosing);
-
- REGISTER_SERVER_PACKET(PacketHeader(Connection::SMSG_PONG, CONNECTION), Connection::Pong);
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Connection::SMSG_BOOM, CONNECTION), "Connection::Boom");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Connection::SMSG_REGULATOR_UPDATE, CONNECTION), "Connection::RegulatorUpdate");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Connection::SMSG_SERVER_VERSION, CONNECTION), "Connection::ServerVersion");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Connection::SMSG_STUN_SERVERS, CONNECTION), "Connection::STUNServers");
-}
-
-void Battlenet::PacketManager::RegisterWoWRealmPackets()
-{
- REGISTER_CLIENT_PACKET(PacketHeader(WoWRealm::CMSG_LIST_SUBSCRIBE_REQUEST, WOWREALM), WoWRealm::ListSubscribeRequest);
- REGISTER_CLIENT_PACKET(PacketHeader(WoWRealm::CMSG_LIST_UNSUBSCRIBE, WOWREALM), WoWRealm::ListUnsubscribe);
- REGISTER_CLIENT_PACKET(PacketHeader(WoWRealm::CMSG_JOIN_REQUEST_V2, WOWREALM), WoWRealm::JoinRequestV2);
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(WoWRealm::CMSG_MULTI_LOGON_REQUEST_V2, WOWREALM), "WoWRealm::MultiLogonRequestV2");
-
- REGISTER_SERVER_PACKET(PacketHeader(WoWRealm::SMSG_LIST_SUBSCRIBE_RESPONSE, WOWREALM), WoWRealm::ListSubscribeResponse);
- REGISTER_SERVER_PACKET(PacketHeader(WoWRealm::SMSG_LIST_UPDATE, WOWREALM), WoWRealm::ListUpdate);
- REGISTER_SERVER_PACKET(PacketHeader(WoWRealm::SMSG_LIST_COMPLETE, WOWREALM), WoWRealm::ListComplete);
- REGISTER_SERVER_PACKET(PacketHeader(WoWRealm::SMSG_TOON_READY, WOWREALM), WoWRealm::ToonReady);
- REGISTER_SERVER_PACKET(PacketHeader(WoWRealm::SMSG_TOON_LOGGED_OUT, WOWREALM), WoWRealm::ToonLoggedOut);
- REGISTER_SERVER_PACKET(PacketHeader(WoWRealm::SMSG_JOIN_RESPONSE_V2, WOWREALM), WoWRealm::JoinResponseV2);
-}
-
-void Battlenet::PacketManager::RegisterFriendsPackets()
-{
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(Friends::CMSG_FRIEND_INVITE, FRIENDS), "Friends::FriendInvite");
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(Friends::CMSG_FRIEND_INVITE_RESPONSE, FRIENDS), "Friends::FriendInviteResponse");
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(Friends::CMSG_FRIEND_REMOVE, FRIENDS), "Friends::FriendRemove");
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(Friends::CMSG_FRIEND_NOTE, FRIENDS), "Friends::FriendNote");
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(Friends::CMSG_TOONS_OF_FRIEND_REQUEST, FRIENDS), "Friends::ToonsOfFriendRequest");
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(Friends::CMSG_BLOCK_ADD, FRIENDS), "Friends::BlockAdd");
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(Friends::CMSG_BLOCK_REMOVE, FRIENDS), "Friends::BlockRemove");
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(Friends::CMSG_GET_FRIENDS_OF_FRIEND, FRIENDS), "Friends::GetFriendsOfFriend");
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(Friends::CMSG_GET_SOCIAL_NETWORK_FRIENDS, FRIENDS), "Friends::GetSocialNetworkFriends");
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(Friends::CMSG_SOCIAL_NETWORK_CONNECT, FRIENDS), "Friends::SocialNetworkConnect");
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(Friends::CMSG_SOCIAL_NETWORK_DISCONNECT, FRIENDS), "Friends::SocialNetworkDisconnect");
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(Friends::CMSG_SOCIAL_NETWORK_CHECK_CONNECTED, FRIENDS), "Friends::SocialNetworkCheckConnected");
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(Friends::CMSG_REALID_FRIEND_INVITE, FRIENDS), "Friends::RealIdFriendInvite");
- REGISTER_CLIENT_PACKET(PacketHeader(Friends::CMSG_SEND_INVITATION_REQUEST, FRIENDS), Friends::SendInvitationRequest);
-
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Friends::SMSG_FRIEND_INVITE_NOTIFY, FRIENDS), "Friends::FriendInviteNotify");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Friends::SMSG_FRIEND_INVITE_RESULT, FRIENDS), "Friends::FriendInviteResult");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Friends::SMSG_TOONS_OF_FRIEND_NOTIFY, FRIENDS), "Friends::ToonsOfFriendNotify");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Friends::SMSG_BLOCK_INVITE_NOTIFY, FRIENDS), "Friends::BlockInviteNotify");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Friends::SMSG_BLOCK_ADD_FAILURE, FRIENDS), "Friends::BlockAddFailure");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Friends::SMSG_FRIENDS_OF_FRIEND, FRIENDS), "Friends::FriendsOfFriend");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Friends::SMSG_SOCIAL_NETWORK_FRIENDS, FRIENDS), "Friends::SocialNetworkFriends");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Friends::SMSG_SOCIAL_NETWORK_CONNECT_RESULT, FRIENDS), "Friends::SocialNetworkConnectResult");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Friends::SMSG_SOCIAL_NETWORK_DISCONNECT_RESULT, FRIENDS), "Friends::SocialNetworkDisconnectResult");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Friends::SMSG_SOCIAL_NETWORK_CHECK_CONNECTED_RESULT, FRIENDS), "Friends::SocialNetworkCheckConnectedResult");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Friends::SMSG_MAX_FRIENDS_NOTIFY, FRIENDS), "Friends::MaxFriendsNotify");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Friends::SMSG_FRIENDS_LIST_NOTIFY_3, FRIENDS), "Friends::FriendsListNotify3");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Friends::SMSG_SEND_INVITATION_RESULT, FRIENDS), "SendInvitationResult");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Friends::SMSG_FRIEND_INVITATION_ADDED_NOTIFY, FRIENDS), "Friends::FriendInvitationAddedNotify");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Friends::SMSG_FRIEND_INVITATION_REMOVED_NOTIFY, FRIENDS), "Friends::FriendInvitationRemovedNotify");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Friends::SMSG_FRIENDS_LIST_NOTIFY_5, FRIENDS), "Friends::FriendsListNotify5");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Friends::SMSG_ACCOUNT_BLOCK_ADDED_NOTIFY, FRIENDS), "Friends::AccountBlockAddedNotify");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Friends::SMSG_ACCOUNT_BLOCK_REMOVED_NOTIFY, FRIENDS), "Friends::AccountBlockRemovedNotify");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Friends::SMSG_TOON_BLOCK_NOTIFY, FRIENDS), "Friends::ToonBlockNotify");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Friends::SMSG_FRIENDS_OF_FRIEND_RESULT, FRIENDS), "Friends::FriendsOfFriendResult");
-}
-
-void Battlenet::PacketManager::RegisterPresencePackets()
-{
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(Presence::CMSG_UPDATE_REQUEST, PRESENCE), "Presence::UpdateRequest");
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(Presence::CMSG_STATISTIC_SUBSCRIBE, PRESENCE), "Presence::StatisticSubscribe");
-
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Presence::SMSG_UPDATE_NOTIFY, PRESENCE), "Presence::UpdateNotify");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Presence::SMSG_FIELD_SPEC_ANNOUNCE, PRESENCE), "Presence::FieldSpecAnnounce");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Presence::SMSG_STATISTICS_UPDATE, PRESENCE), "Presence::StatisticsUpdate");
-}
-
-void Battlenet::PacketManager::RegisterChatPackets()
-{
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(Chat::CMSG_JOIN_REQUEST_2, CHAT), "Chat::JoinRequest2");
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(Chat::CMSG_LEAVE_REQUEST, CHAT), "Chat::LeaveRequest");
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(Chat::CMSG_INVITE_REQUEST, CHAT), "Chat::InviteRequest");
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(Chat::CMSG_CREATE_AND_INVITE_REQUEST, CHAT), "Chat::CreateAndInviteRequest");
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(Chat::CMSG_MESSAGE_SEND, CHAT), "Chat::MessageSend");
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(Chat::CMSG_DATAGRAM_CONNECTION_UPDATE, CHAT), "Chat::DatagramConnectionUpdate");
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(Chat::CMSG_REPORT_SPAM_REQUEST, CHAT), "Chat::ReportSpamRequest");
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(Chat::CMSG_WHISPER_SEND, CHAT), "Chat::WhisperSend");
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(Chat::CMSG_ENUM_CATEGORY_DESCRIPTIONS, CHAT), "Chat::EnumCategoryDescriptions");
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(Chat::CMSG_ENUM_CONFERENCE_DESCRIPTIONS, CHAT), "Chat::EnumConferenceDescriptions");
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(Chat::CMSG_ENUM_CONFERENCE_MEMBER_COUNTS, CHAT), "Chat::EnumConferenceMemberCounts");
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(Chat::CMSG_MODIFY_CHANNEL_LIST_REQUEST, CHAT), "Chat::ModifyChannelListRequest");
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(Chat::CMSG_GET_MEMBER_COUNT_REQUEST, CHAT), "Chat::GetMemberCountRequest");
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(Chat::CMSG_MODIFY_CHANNEL_LIST_REQUEST_2, CHAT), "Chat::ModifyChannelListRequest2");
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(Chat::CMSG_GAME_DATA_SEND_REQUEST, CHAT), "Chat::GameDataSendRequest");
-
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Chat::SMSG_MEMBERSHIP_CHANGE_NOTIFY, CHAT), "Chat::MembershipChangeNotify");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Chat::SMSG_INVITE_NOTIFY, CHAT), "Chat::InviteNotify");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Chat::SMSG_INVITE_CANCELED, CHAT), "Chat::InviteCanceled");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Chat::SMSG_MESSAGE_RECV, CHAT), "Chat::MessageRecv");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Chat::SMSG_MESSAGE_UNDELIVERABLE, CHAT), "Chat::MessageUndeliverable");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Chat::SMSG_DATAGRAM_CONNECTION_UPDATE, CHAT), "Chat::DatagramConnectionUpdate");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Chat::SMSG_INVITE_FAILURE, CHAT), "Chat::InviteFailed");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Chat::SMSG_SYSTEM_MESSAGE, CHAT), "Chat::SystemMessage");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Chat::SMSG_MESSAGE_BLOCKED, CHAT), "Chat::MessageBlocked");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Chat::SMSG_WHISPER_RECV, CHAT), "Chat::WhisperRecv");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Chat::SMSG_WHISPER_UNDELIVERABLE, CHAT), "Chat::WhisperUndeliverable");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Chat::SMSG_CATEGORY_DESCRIPTIONS, CHAT), "Chat::CategoryDescriptions");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Chat::SMSG_CONFERENCE_DESCRIPTIONS, CHAT), "Chat::ConferenceDescriptions");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Chat::SMSG_CONFERENCE_MEMBER_COUNTS, CHAT), "Chat::ConferenceMemberCounts");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Chat::SMSG_JOIN_NOTIFY_2, CHAT), "Chat::JoinNotify2");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Chat::SMSG_MODIFY_CHANNEL_LIST_RESPONSE, CHAT), "Chat::ModifyChannelListResponse");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Chat::SMSG_CONFIG_CHANGED, CHAT), "Chat::ConfigChanged");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Chat::SMSG_WHISPER_ECHO_RECV, CHAT), "Chat::WhisperEchoRecv");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Chat::SMSG_GET_MEMBER_COUNT_RESPONSE, CHAT), "Chat::GetMemberCountResponse");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Chat::SMSG_MODIFY_CHANNEL_LIST_RESPONSE_2, CHAT), "Chat::ModifyChannelListResponse2");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Chat::SMSG_GAME_DATA_SEND_RESPONSE, CHAT), "Chat::GameDataSendResponse");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Chat::SMSG_GAME_DATA_RECV, CHAT), "Chat::GameDataRecv");
-}
-
-void Battlenet::PacketManager::RegisterSupportPackets()
-{
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(Support::CMSG_COMPLAINT_REQUEST, SUPPORT), "Support::ComplaintRequest");
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(Support::CMSG_COMPLAINT_REQUEST_2, SUPPORT), "Support::ComplaintRequest2");
-}
-
-void Battlenet::PacketManager::RegisterAchievementPackets()
-{
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(Achievement::CMSG_LISTEN_REQUEST, ACHIEVEMENT), "Achievement::ListenRequest");
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(Achievement::CMSG_CRITERIA_FLUSH_REQUEST, ACHIEVEMENT), "Achievement::CriteriaFlushRequest");
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(Achievement::CMSG_CHANGE_TROPHY_CASE_REQUEST, ACHIEVEMENT), "Achievement::ChangeTrophyCaseRequest");
-
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Achievement::SMSG_DATA, ACHIEVEMENT), "Achievement::Data");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Achievement::SMSG_CRITERIA_FLUSH_RESPONSE, ACHIEVEMENT), "Achievement::CriteriaFlushResponse");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Achievement::SMSG_ACHIEVEMENT_HANDLE_UPDATE, ACHIEVEMENT), "Achievement::AchievementHandleUpdate");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Achievement::SMSG_CHANGE_TROPHY_CASE_RESULT, ACHIEVEMENT), "Achievement::ChangeTrophyCaseResult");
-}
-
-void Battlenet::PacketManager::RegisterCachePackets()
-{
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(Cache::CMSG_GATEWAY_LOOKUP_REQUEST, CACHE), "Cache::GatewayLookupRequest");
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(Cache::CMSG_CONNECT_REQUEST, CACHE), "Cache::ConnectRequest");
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(Cache::CMSG_DATA_CHUNK, CACHE), "Cache::DataChunk");
- REGISTER_CLIENT_PACKET(PacketHeader(Cache::CMSG_GET_STREAM_ITEMS_REQUEST, CACHE), Cache::GetStreamItemsRequest);
-
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Cache::SMSG_GATEWAY_LOOKUP_RESPONSE, CACHE), "Cache::GatewayLookupResponse");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Cache::SMSG_CONNECT_RESPONSE, CACHE), "Cache::ConnectResponse");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Cache::SMSG_PUBLISH_LIST_RESPONSE, CACHE), "Cache::PublishListResponse");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Cache::SMSG_RESULT, CACHE), "Cache::Result");
- REGISTER_SERVER_PACKET(PacketHeader(Cache::SMSG_GET_STREAM_ITEMS_RESPONSE, CACHE), Cache::GetStreamItemsResponse);
-}
-
-void Battlenet::PacketManager::RegisterProfilePackets()
-{
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(Profile::CMSG_READ_REQUEST, PROFILE), "Profile::ReadRequest");
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(Profile::CMSG_ADDRESS_QUERY_REQUEST, PROFILE), "Profile::AddressQueryRequest");
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(Profile::CMSG_RESOLVE_TOON_HANDLE_TO_NAME_REQUEST, PROFILE), "Profile::ResolveHandleToToonNameRequest");
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(Profile::CMSG_RESOLVE_TOON_NAME_TO_HANDLE_REQUEST, PROFILE), "Profile::ResolveToonNameToHandleRequest");
- REGISTER_CLIENT_PACKET_NAME(PacketHeader(Profile::CMSG_CHANGE_SETTINGS, PROFILE), "Profile::ChangeSettings");
-
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Profile::SMSG_READ_RESPONSE, PROFILE), "Profile::ReadResponse");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Profile::SMSG_ADDRESS_QUERY_RESPONSE, PROFILE), "Profile::AddressQueryResponse");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Profile::SMSG_RESOLVE_TOON_HANDLE_TO_NAME_RESPONSE, PROFILE), "Profile::ResolveHandleToToonNameResponse");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Profile::SMSG_RESOLVE_TOON_NAME_TO_HANDLE_RESPONSE, PROFILE), "Profile::ResolveToonNameToHandleResponse");
- REGISTER_SERVER_PACKET_NAME(PacketHeader(Profile::SMSG_SETTINGS_AVAILABLE, PROFILE), "Profile::SettingsAvailable");
-}
diff --git a/src/server/bnetserver/Packets/PacketManager.h b/src/server/bnetserver/Packets/PacketManager.h
deleted file mode 100644
index 50fcaaa0d05..00000000000
--- a/src/server/bnetserver/Packets/PacketManager.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright (C) 2008-2016 TrinityCore
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program. If not, see .
- */
-
-#ifndef PacketManager_h__
-#define PacketManager_h__
-
-#include "Packets.h"
-#include