diff --git a/data/sql/base/characters.sql b/data/sql/base/characters.sql index 937ecfbb94..345e32957e 100644 --- a/data/sql/base/characters.sql +++ b/data/sql/base/characters.sql @@ -533,22 +533,22 @@ DROP TABLE IF EXISTS `character_aura`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `character_aura` ( `guid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier', - `caster_guid` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Full Global Unique Identifier', - `item_guid` bigint(20) unsigned NOT NULL DEFAULT '0', + `casterGuid` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Full Global Unique Identifier', + `itemGuid` bigint(20) unsigned NOT NULL DEFAULT '0', `spell` mediumint(8) unsigned NOT NULL DEFAULT '0', - `effect_mask` tinyint(3) unsigned NOT NULL DEFAULT '0', - `recalculate_mask` tinyint(3) unsigned NOT NULL DEFAULT '0', - `stackcount` tinyint(3) unsigned NOT NULL DEFAULT '1', + `effectMask` tinyint(3) unsigned NOT NULL DEFAULT '0', + `recalculateMask` tinyint(3) unsigned NOT NULL DEFAULT '0', + `stackCount` tinyint(3) unsigned NOT NULL DEFAULT '1', `amount0` int(11) NOT NULL DEFAULT '0', `amount1` int(11) NOT NULL DEFAULT '0', `amount2` int(11) NOT NULL DEFAULT '0', `base_amount0` int(11) NOT NULL DEFAULT '0', `base_amount1` int(11) NOT NULL DEFAULT '0', `base_amount2` int(11) NOT NULL DEFAULT '0', - `maxduration` int(11) NOT NULL DEFAULT '0', - `remaintime` int(11) NOT NULL DEFAULT '0', - `remaincharges` tinyint(3) unsigned NOT NULL DEFAULT '0', - PRIMARY KEY (`guid`,`caster_guid`,`item_guid`,`spell`,`effect_mask`) + `maxDuration` int(11) NOT NULL DEFAULT '0', + `remainTime` int(11) NOT NULL DEFAULT '0', + `remainCharges` tinyint(3) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`guid`,`casterGuid`,`itemGuid`,`spell`,`effectMask`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Player System'; /*!40101 SET character_set_client = @saved_cs_client */; @@ -772,14 +772,14 @@ DROP TABLE IF EXISTS `character_glyphs`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `character_glyphs` ( `guid` int(10) unsigned NOT NULL, - `spec` tinyint(3) unsigned NOT NULL DEFAULT '0', + `talentGroup` tinyint(3) unsigned NOT NULL DEFAULT '0', `glyph1` smallint(5) unsigned DEFAULT '0', `glyph2` smallint(5) unsigned DEFAULT '0', `glyph3` smallint(5) unsigned DEFAULT '0', `glyph4` smallint(5) unsigned DEFAULT '0', `glyph5` smallint(5) unsigned DEFAULT '0', `glyph6` smallint(5) unsigned DEFAULT '0', - PRIMARY KEY (`guid`,`spec`) + PRIMARY KEY (`guid`,`talentGroup`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1368,8 +1368,8 @@ CREATE TABLE `characters` ( `power6` int(10) unsigned NOT NULL DEFAULT '0', `power7` int(10) unsigned NOT NULL DEFAULT '0', `latency` mediumint(8) unsigned NOT NULL DEFAULT '0', - `speccount` tinyint(3) unsigned NOT NULL DEFAULT '1', - `activespec` tinyint(3) unsigned NOT NULL DEFAULT '0', + `talentGroupsCount` tinyint(3) unsigned NOT NULL DEFAULT '1', + `activeTalentGroup` tinyint(3) unsigned NOT NULL DEFAULT '0', `exploredZones` longtext, `equipmentCache` longtext, `ammoId` int(10) unsigned NOT NULL DEFAULT '0', @@ -1403,7 +1403,7 @@ DROP TABLE IF EXISTS `characters_db_version`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `characters_db_version` ( - `2016_07_10_00` bit(1) DEFAULT NULL + `2016_08_12_00` bit(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Last applied sql update to DB'; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1519,7 +1519,6 @@ CREATE TABLE `creature_respawn` ( LOCK TABLES `creature_respawn` WRITE; /*!40000 ALTER TABLE `creature_respawn` DISABLE KEYS */; -INSERT INTO `creature_respawn` VALUES (40270,1470675514,571,0); /*!40000 ALTER TABLE `creature_respawn` ENABLE KEYS */; UNLOCK TABLES; @@ -1598,42 +1597,42 @@ LOCK TABLES `gameobject_respawn` WRITE; UNLOCK TABLES; -- --- Table structure for table `gm_subsurveys` +-- Table structure for table `gm_subsurvey` -- -DROP TABLE IF EXISTS `gm_subsurveys`; +DROP TABLE IF EXISTS `gm_subsurvey`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `gm_subsurveys` ( +CREATE TABLE `gm_subsurvey` ( `surveyId` int(10) unsigned NOT NULL AUTO_INCREMENT, - `subsurveyId` int(10) unsigned NOT NULL DEFAULT '0', - `rank` int(10) unsigned NOT NULL DEFAULT '0', - `comment` text NOT NULL, - PRIMARY KEY (`surveyId`,`subsurveyId`) + `questionId` int(10) unsigned NOT NULL DEFAULT '0', + `answer` int(10) unsigned NOT NULL DEFAULT '0', + `answerComment` text NOT NULL, + PRIMARY KEY (`surveyId`,`questionId`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Player System'; /*!40101 SET character_set_client = @saved_cs_client */; -- --- Dumping data for table `gm_subsurveys` +-- Dumping data for table `gm_subsurvey` -- -LOCK TABLES `gm_subsurveys` WRITE; -/*!40000 ALTER TABLE `gm_subsurveys` DISABLE KEYS */; -/*!40000 ALTER TABLE `gm_subsurveys` ENABLE KEYS */; +LOCK TABLES `gm_subsurvey` WRITE; +/*!40000 ALTER TABLE `gm_subsurvey` DISABLE KEYS */; +/*!40000 ALTER TABLE `gm_subsurvey` ENABLE KEYS */; UNLOCK TABLES; -- --- Table structure for table `gm_surveys` +-- Table structure for table `gm_survey` -- -DROP TABLE IF EXISTS `gm_surveys`; +DROP TABLE IF EXISTS `gm_survey`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `gm_surveys` ( +CREATE TABLE `gm_survey` ( `surveyId` int(10) unsigned NOT NULL AUTO_INCREMENT, `guid` int(10) unsigned NOT NULL DEFAULT '0', `mainSurvey` int(10) unsigned NOT NULL DEFAULT '0', - `overallComment` longtext NOT NULL, + `comment` longtext NOT NULL, `createTime` int(10) unsigned NOT NULL DEFAULT '0', `maxMMR` smallint(5) NOT NULL, PRIMARY KEY (`surveyId`) @@ -1641,12 +1640,12 @@ CREATE TABLE `gm_surveys` ( /*!40101 SET character_set_client = @saved_cs_client */; -- --- Dumping data for table `gm_surveys` +-- Dumping data for table `gm_survey` -- -LOCK TABLES `gm_surveys` WRITE; -/*!40000 ALTER TABLE `gm_surveys` DISABLE KEYS */; -/*!40000 ALTER TABLE `gm_surveys` ENABLE KEYS */; +LOCK TABLES `gm_survey` WRITE; +/*!40000 ALTER TABLE `gm_survey` DISABLE KEYS */; +/*!40000 ALTER TABLE `gm_survey` ENABLE KEYS */; UNLOCK TABLES; -- @@ -1739,7 +1738,7 @@ CREATE TABLE `groups` ( `icon8` int(10) unsigned NOT NULL, `groupType` tinyint(3) unsigned NOT NULL, `difficulty` tinyint(3) unsigned NOT NULL DEFAULT '0', - `raiddifficulty` tinyint(3) unsigned NOT NULL DEFAULT '0', + `raidDifficulty` tinyint(3) unsigned NOT NULL DEFAULT '0', `masterLooterGuid` int(10) unsigned NOT NULL, PRIMARY KEY (`guid`), KEY `leaderGuid` (`leaderGuid`) @@ -2069,7 +2068,7 @@ CREATE TABLE `instance_reset` ( LOCK TABLES `instance_reset` WRITE; /*!40000 ALTER TABLE `instance_reset` DISABLE KEYS */; -INSERT INTO `instance_reset` VALUES (249,0,1471060800),(249,1,1471060800),(269,1,1470715200),(309,0,1470715200),(409,0,1471060800),(469,0,1471060800),(509,0,1470715200),(531,0,1471060800),(532,0,1471060800),(533,0,1471060800),(533,1,1471060800),(534,0,1471060800),(540,1,1470715200),(542,1,1470715200),(543,1,1470715200),(544,0,1471060800),(545,1,1470715200),(546,1,1470715200),(547,1,1470715200),(548,0,1471060800),(550,0,1471060800),(552,1,1470715200),(553,1,1470715200),(554,1,1470715200),(555,1,1470715200),(556,1,1470715200),(557,1,1470715200),(558,1,1470715200),(560,1,1470715200),(564,0,1471060800),(565,0,1471060800),(568,0,1470715200),(574,1,1470715200),(575,1,1470715200),(576,1,1470715200),(578,1,1470715200),(580,0,1471060800),(585,1,1470715200),(595,1,1470715200),(598,1,1470715200),(599,1,1470715200),(600,1,1470715200),(601,1,1470715200),(602,1,1470715200),(603,0,1471060800),(603,1,1471060800),(604,1,1470715200),(608,1,1470715200),(615,0,1471060800),(615,1,1471060800),(616,0,1471060800),(616,1,1471060800),(619,1,1470715200),(624,0,1471060800),(624,1,1471060800),(631,0,1471060800),(631,1,1471060800),(631,2,1471060800),(631,3,1471060800),(632,1,1470715200),(649,0,1471060800),(649,1,1471060800),(649,2,1471060800),(649,3,1471060800),(650,1,1470715200),(658,1,1470715200),(668,1,1470715200),(724,0,1471060800),(724,1,1471060800),(724,2,1471060800),(724,3,1471060800); +INSERT INTO `instance_reset` VALUES (249,0,1471060800),(249,1,1471060800),(269,1,1471060800),(309,0,1471233600),(409,0,1471060800),(469,0,1471060800),(509,0,1471233600),(531,0,1471060800),(532,0,1471060800),(533,0,1471060800),(533,1,1471060800),(534,0,1471060800),(540,1,1471060800),(542,1,1471060800),(543,1,1471060800),(544,0,1471060800),(545,1,1471060800),(546,1,1471060800),(547,1,1471060800),(548,0,1471060800),(550,0,1471060800),(552,1,1471060800),(553,1,1471060800),(554,1,1471060800),(555,1,1471060800),(556,1,1471060800),(557,1,1471060800),(558,1,1471060800),(560,1,1471060800),(564,0,1471060800),(565,0,1471060800),(568,0,1471233600),(574,1,1471060800),(575,1,1471060800),(576,1,1471060800),(578,1,1471060800),(580,0,1471060800),(585,1,1471060800),(595,1,1471060800),(598,1,1471060800),(599,1,1471060800),(600,1,1471060800),(601,1,1471060800),(602,1,1471060800),(603,0,1471060800),(603,1,1471060800),(604,1,1471060800),(608,1,1471060800),(615,0,1471060800),(615,1,1471060800),(616,0,1471060800),(616,1,1471060800),(619,1,1471060800),(624,0,1471060800),(624,1,1471060800),(631,0,1471060800),(631,1,1471060800),(631,2,1471060800),(631,3,1471060800),(632,1,1471060800),(649,0,1471060800),(649,1,1471060800),(649,2,1471060800),(649,3,1471060800),(650,1,1471060800),(658,1,1471060800),(668,1,1471060800),(724,0,1471060800),(724,1,1471060800),(724,2,1471060800),(724,3,1471060800); /*!40000 ALTER TABLE `instance_reset` ENABLE KEYS */; UNLOCK TABLES; @@ -2427,21 +2426,21 @@ DROP TABLE IF EXISTS `pet_aura`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `pet_aura` ( `guid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier', - `caster_guid` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Full Global Unique Identifier', + `casterGuid` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Full Global Unique Identifier', `spell` mediumint(8) unsigned NOT NULL DEFAULT '0', - `effect_mask` tinyint(3) unsigned NOT NULL DEFAULT '0', - `recalculate_mask` tinyint(3) unsigned NOT NULL DEFAULT '0', - `stackcount` tinyint(3) unsigned NOT NULL DEFAULT '1', + `effectMask` tinyint(3) unsigned NOT NULL DEFAULT '0', + `recalculateMask` tinyint(3) unsigned NOT NULL DEFAULT '0', + `stackCount` tinyint(3) unsigned NOT NULL DEFAULT '1', `amount0` mediumint(8) NOT NULL, `amount1` mediumint(8) NOT NULL, `amount2` mediumint(8) NOT NULL, `base_amount0` mediumint(8) NOT NULL, `base_amount1` mediumint(8) NOT NULL, `base_amount2` mediumint(8) NOT NULL, - `maxduration` int(11) NOT NULL DEFAULT '0', - `remaintime` int(11) NOT NULL DEFAULT '0', - `remaincharges` tinyint(3) unsigned NOT NULL DEFAULT '0', - PRIMARY KEY (`guid`,`spell`,`effect_mask`) + `maxDuration` int(11) NOT NULL DEFAULT '0', + `remainTime` int(11) NOT NULL DEFAULT '0', + `remainCharges` tinyint(3) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`guid`,`spell`,`effectMask`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Pet System'; /*!40101 SET character_set_client = @saved_cs_client */; @@ -2576,7 +2575,7 @@ CREATE TABLE `pool_quest_save` ( LOCK TABLES `pool_quest_save` WRITE; /*!40000 ALTER TABLE `pool_quest_save` DISABLE KEYS */; -INSERT INTO `pool_quest_save` VALUES (348,24635),(349,14102),(350,13889),(351,13914),(352,11379),(353,11666),(354,13425),(356,11370),(357,11500),(358,14074),(359,14112),(360,14144),(361,14141),(362,12760),(363,14108),(380,12737),(381,12734),(382,12761),(384,13191),(385,13153),(386,12563),(5662,13673),(5663,13764),(5664,13770),(5665,13774),(5666,13780),(5667,13783),(5668,13669),(5669,13616),(5670,13743),(5671,13748),(5672,13757),(5673,13753),(5674,13103),(5675,13116),(5676,13836),(5677,12962),(5678,24586); +INSERT INTO `pool_quest_save` VALUES (348,24629),(349,14104),(350,13905),(351,13916),(352,11377),(353,11669),(354,13423),(356,11363),(357,11385),(358,14080),(359,14076),(360,14136),(361,14092),(362,12759),(363,14107),(380,12736),(381,12741),(382,12762),(384,13192),(385,13154),(386,12587),(5662,13675),(5663,13762),(5664,13769),(5665,13773),(5666,13778),(5667,13784),(5668,13670),(5669,13603),(5670,13741),(5671,13746),(5672,13759),(5673,13752),(5674,13107),(5675,13114),(5676,13832),(5677,12961),(5678,24581); /*!40000 ALTER TABLE `pool_quest_save` ENABLE KEYS */; UNLOCK TABLES; @@ -2733,7 +2732,7 @@ CREATE TABLE `worldstates` ( LOCK TABLES `worldstates` WRITE; /*!40000 ALTER TABLE `worldstates` DISABLE KEYS */; -INSERT INTO `worldstates` VALUES (3781,9000000,NULL),(3801,0,NULL),(3802,1,NULL),(20001,1454691600,NULL),(20002,1470888000,NULL),(20003,1470715200,NULL),(20005,1470715200,NULL),(20006,1470715200,NULL),(20007,1472702400,NULL); +INSERT INTO `worldstates` VALUES (3781,9000000,NULL),(3801,0,NULL),(3802,1,NULL),(20001,1454691600,NULL),(20002,1471492800,NULL),(20003,1471060800,NULL),(20005,1471060800,NULL),(20006,1471060800,NULL),(20007,1472702400,NULL); /*!40000 ALTER TABLE `worldstates` ENABLE KEYS */; UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; @@ -2746,4 +2745,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2016-08-08 19:00:21 +-- Dump completed on 2016-08-12 11:33:43 diff --git a/data/sql/base/world.sql b/data/sql/base/world.sql index 77f306fffb..2a948c2814 100644 --- a/data/sql/base/world.sql +++ b/data/sql/base/world.sql @@ -5026,7 +5026,7 @@ CREATE TABLE `version` ( LOCK TABLES `version` WRITE; /*!40000 ALTER TABLE `version` DISABLE KEYS */; -INSERT INTO `version` VALUES ('AzerothCore rev. f2dfe2b8e362+ 2016-08-10 19:17:26 +0200 (Unix, Release)','f2dfe2b8e362+','TDB 335.52',52); +INSERT INTO `version` VALUES ('AzerothCore rev. e95659b2c374+ 2016-08-12 11:21:02 +0200 (Unix, Release)','e95659b2c374+','TDB 335.52',52); /*!40000 ALTER TABLE `version` ENABLE KEYS */; UNLOCK TABLES; @@ -5167,7 +5167,7 @@ DROP TABLE IF EXISTS `world_db_version`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `world_db_version` ( - `2016_07_14_00` bit(1) DEFAULT NULL + `2016_08_10_01` bit(1) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Last applied sql update to DB'; /*!40101 SET character_set_client = @saved_cs_client */; @@ -5189,4 +5189,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2016-08-10 19:53:30 +-- Dump completed on 2016-08-12 11:51:47 diff --git a/data/sql/updates/characters/2016_08_12_00.sql b/data/sql/updates/characters/2016_08_12_00.sql new file mode 100644 index 0000000000..c43494ce5c --- /dev/null +++ b/data/sql/updates/characters/2016_08_12_00.sql @@ -0,0 +1,47 @@ +ALTER TABLE characters_db_version CHANGE COLUMN 2016_08_08_00 2016_08_12_00 bit; + +-- `character_aura` +ALTER TABLE `character_aura` +CHANGE `caster_guid` `casterGuid` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Full Global Unique Identifier', +CHANGE `item_guid` `itemGuid` bigint(20) unsigned NOT NULL DEFAULT '0', +CHANGE `effect_mask` `effectMask` tinyint(3) unsigned NOT NULL DEFAULT '0', +CHANGE `recalculate_mask` `recalculateMask` tinyint(3) unsigned NOT NULL DEFAULT '0', +CHANGE `stackcount` `stackCount` tinyint(3) unsigned NOT NULL DEFAULT '1', +CHANGE `maxduration` `maxDuration` int(11) NOT NULL DEFAULT '0', +CHANGE `remaintime` `remainTime` int(11) NOT NULL DEFAULT '0', +CHANGE `remaincharges` `remainCharges` tinyint(3) unsigned NOT NULL DEFAULT '0'; + +-- `character_glyphs` +ALTER TABLE `character_glyphs` +CHANGE `spec` `talentGroup` tinyint(3) unsigned NOT NULL DEFAULT '0'; + +-- `characters` +ALTER TABLE `characters` +CHANGE `speccount` `talentGroupsCount` tinyint(3) unsigned NOT NULL DEFAULT '1', +CHANGE `activespec` `activeTalentGroup` tinyint(3) unsigned NOT NULL DEFAULT '0'; + +-- `gm_subsurveys` -> `gm_subsurvey` +RENAME TABLE `gm_subsurveys` TO `gm_subsurvey`; +ALTER TABLE `gm_subsurvey` +CHANGE `subsurveyId` `questionId` int(10) unsigned NOT NULL DEFAULT '0', +CHANGE `rank` `answer` int(10) unsigned NOT NULL DEFAULT '0', +CHANGE `comment` `answerComment` text NOT NULL; + +-- `gm_surveys` -> `gm_survey` +RENAME TABLE `gm_surveys` TO `gm_survey`; +ALTER TABLE `gm_survey` +CHANGE `overallComment` `comment` longtext NOT NULL; + +-- `groups` +ALTER TABLE `groups` +CHANGE `raiddifficulty` `raidDifficulty` tinyint(3) unsigned NOT NULL DEFAULT '0'; + +-- `pet_aura` +ALTER TABLE `pet_aura` +CHANGE `caster_guid` `casterGuid` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Full Global Unique Identifier', +CHANGE `effect_mask` `effectMask` tinyint(3) unsigned NOT NULL DEFAULT '0', +CHANGE `recalculate_mask` `recalculateMask` tinyint(3) unsigned NOT NULL DEFAULT '0', +CHANGE `stackcount` `stackCount` tinyint(3) unsigned NOT NULL DEFAULT '1', +CHANGE `maxduration` `maxDuration` int(11) NOT NULL DEFAULT '0', +CHANGE `remaintime` `remainTime` int(11) NOT NULL DEFAULT '0', +CHANGE `remaincharges` `remainCharges` tinyint(3) unsigned NOT NULL DEFAULT '0'; diff --git a/issue_template.md b/issue_template.md index 8fcfe1a8fe..b2c451e074 100644 --- a/issue_template.md +++ b/issue_template.md @@ -10,7 +10,7 @@ 2. 3. -**Branch(es)**: 1.x / 2.x (Select the branch(es) affected by this issue) +**Branch(es)**: 0.x / 1.x / master (Specify the branch(es) affected by this issue) **AC hash/commit**: diff --git a/modules/acore/framework/Database/Implementation/CharacterDatabase.cpp b/modules/acore/framework/Database/Implementation/CharacterDatabase.cpp index 0ef8d1fe86..8bf230f19e 100644 --- a/modules/acore/framework/Database/Implementation/CharacterDatabase.cpp +++ b/modules/acore/framework/Database/Implementation/CharacterDatabase.cpp @@ -67,11 +67,11 @@ void CharacterDatabaseConnection::DoPrepareStatements() "position_x, position_y, position_z, map, orientation, taximask, cinematic, totaltime, leveltime, rest_bonus, logout_time, is_logout_resting, resettalents_cost, " "resettalents_time, trans_x, trans_y, trans_z, trans_o, transguid, extra_flags, stable_slots, at_login, zone, online, death_expire_time, taxi_path, instance_mode_mask, " "arenaPoints, totalHonorPoints, todayHonorPoints, yesterdayHonorPoints, totalKills, todayKills, yesterdayKills, chosenTitle, knownCurrencies, watchedFaction, drunk, " - "health, power1, power2, power3, power4, power5, power6, power7, instance_id, speccount, activespec, exploredZones, equipmentCache, ammoId, knownTitles, actionBars, grantableLevels " + "health, power1, power2, power3, power4, power5, power6, power7, instance_id, talentGroupsCount, activeTalentGroup, exploredZones, equipmentCache, ammoId, knownTitles, actionBars, grantableLevels " "FROM characters WHERE guid = ?", CONNECTION_ASYNC); - PrepareStatement(CHAR_SEL_CHARACTER_AURAS, "SELECT caster_guid, spell, effect_mask, recalculate_mask, stackcount, amount0, amount1, amount2, " - "base_amount0, base_amount1, base_amount2, maxduration, remaintime, remaincharges FROM character_aura WHERE guid = ?", CONNECTION_ASYNC); + PrepareStatement(CHAR_SEL_CHARACTER_AURAS, "SELECT casterGuid, spell, effectMask, recalculateMask, stackCount, amount0, amount1, amount2, " + "base_amount0, base_amount1, base_amount2, maxDuration, remainTime, remainCharges FROM character_aura WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_SEL_CHARACTER_SPELL, "SELECT spell, specMask FROM character_spell WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_SEL_CHARACTER_QUESTSTATUS, "SELECT quest, status, explored, timer, mobcount1, mobcount2, mobcount3, mobcount4, " "itemcount1, itemcount2, itemcount3, itemcount4, playercount FROM character_queststatus WHERE guid = ? AND status <> 0", CONNECTION_ASYNC); @@ -86,7 +86,7 @@ void CharacterDatabaseConnection::DoPrepareStatements() PrepareStatement(CHAR_SEL_CHARACTER_REPUTATION, "SELECT faction, standing, flags FROM character_reputation WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_SEL_CHARACTER_INVENTORY, "SELECT creatorGuid, giftCreatorGuid, count, duration, charges, flags, enchantments, randomPropertyId, durability, playedTime, text, bag, slot, " "item, itemEntry FROM character_inventory ci JOIN item_instance ii ON ci.item = ii.guid WHERE ci.guid = ? ORDER BY bag, slot", CONNECTION_ASYNC); - PrepareStatement(CHAR_SEL_CHARACTER_ACTIONS, "SELECT a.button, a.action, a.type FROM character_action as a, characters as c WHERE a.guid = c.guid AND a.spec = c.activespec AND a.guid = ? ORDER BY button", CONNECTION_ASYNC); + PrepareStatement(CHAR_SEL_CHARACTER_ACTIONS, "SELECT a.button, a.action, a.type FROM character_action as a, characters as c WHERE a.guid = c.guid AND a.spec = c.activeTalentGroup AND a.guid = ? ORDER BY button", CONNECTION_ASYNC); PrepareStatement(CHAR_SEL_CHARACTER_MAILCOUNT, "SELECT COUNT(id) FROM mail WHERE receiver = ? AND (checked & 1) = 0 AND deliver_time <= ?", CONNECTION_ASYNC); PrepareStatement(CHAR_SEL_CHARACTER_MAILDATE, "SELECT MIN(deliver_time) FROM mail WHERE receiver = ? AND (checked & 1) = 0", CONNECTION_ASYNC); PrepareStatement(CHAR_SEL_CHARACTER_SOCIALLIST, "SELECT friend, flags, note FROM character_social JOIN characters ON characters.guid = character_social.friend WHERE character_social.guid = ? AND deleteinfos_name IS NULL LIMIT 255", CONNECTION_ASYNC); @@ -98,7 +98,7 @@ void CharacterDatabaseConnection::DoPrepareStatements() PrepareStatement(CHAR_SEL_CHARACTER_EQUIPMENTSETS, "SELECT setguid, setindex, name, iconname, ignore_mask, item0, item1, item2, item3, item4, item5, item6, item7, item8, " "item9, item10, item11, item12, item13, item14, item15, item16, item17, item18 FROM character_equipmentsets WHERE guid = ? ORDER BY setindex", CONNECTION_ASYNC); PrepareStatement(CHAR_SEL_CHARACTER_ENTRY_POINT, "SELECT joinX, joinY, joinZ, joinO, joinMapId, taxiPath, mountSpell FROM character_entry_point WHERE guid = ?", CONNECTION_ASYNC); - PrepareStatement(CHAR_SEL_CHARACTER_GLYPHS, "SELECT spec, glyph1, glyph2, glyph3, glyph4, glyph5, glyph6 FROM character_glyphs WHERE guid = ?", CONNECTION_ASYNC); + PrepareStatement(CHAR_SEL_CHARACTER_GLYPHS, "SELECT talentGroup, glyph1, glyph2, glyph3, glyph4, glyph5, glyph6 FROM character_glyphs WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_SEL_CHARACTER_TALENTS, "SELECT spell, specMask FROM character_talent WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_SEL_CHARACTER_SKILLS, "SELECT skill, value, max FROM character_skills WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_SEL_CHARACTER_RANDOMBG, "SELECT guid FROM character_battleground_random WHERE guid = ?", CONNECTION_ASYNC); @@ -225,7 +225,7 @@ void CharacterDatabaseConnection::DoPrepareStatements() PrepareStatement(CHAR_DEL_EQUIP_SET, "DELETE FROM character_equipmentsets WHERE setguid=?", CONNECTION_ASYNC); // Auras - PrepareStatement(CHAR_INS_AURA, "INSERT INTO character_aura (guid, caster_guid, item_guid, spell, effect_mask, recalculate_mask, stackcount, amount0, amount1, amount2, base_amount0, base_amount1, base_amount2, maxduration, remaintime, remaincharges) " + PrepareStatement(CHAR_INS_AURA, "INSERT INTO character_aura (guid, casterGuid, itemGuid, spell, effectMask, recalculateMask, stackcount, amount0, amount1, amount2, base_amount0, base_amount1, base_amount2, maxDuration, remainTime, remainCharges) " "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC); // Account data @@ -264,7 +264,7 @@ void CharacterDatabaseConnection::DoPrepareStatements() // Arena teams PrepareStatement(CHAR_INS_ARENA_TEAM, "INSERT INTO arena_team (arenaTeamId, name, captainGuid, type, rating, backgroundColor, emblemStyle, emblemColor, borderStyle, borderColor) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC); PrepareStatement(CHAR_INS_ARENA_TEAM_MEMBER, "INSERT INTO arena_team_member (arenaTeamId, guid) VALUES (?, ?)", CONNECTION_ASYNC); - PrepareStatement(CHAR_DEL_ARENA_TEAM, "DELETE FROM arena_team where arenaTeamId = ?", CONNECTION_ASYNC); + PrepareStatement(CHAR_DEL_ARENA_TEAM, "DELETE FROM arena_team WHERE arenaTeamId = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_ARENA_TEAM_MEMBERS, "DELETE FROM arena_team_member WHERE arenaTeamId = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_UPD_ARENA_TEAM_CAPTAIN, "UPDATE arena_team SET captainGuid = ? WHERE arenaTeamId = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_ARENA_TEAM_MEMBER, "DELETE FROM arena_team_member WHERE arenaTeamId = ? AND guid = ?", CONNECTION_ASYNC); @@ -309,8 +309,8 @@ void CharacterDatabaseConnection::DoPrepareStatements() PrepareStatement(CHAR_UPD_PLAYER_GM_TICKETS_ON_CHAR_DELETION, "UPDATE gm_ticket SET type = 2 WHERE playerGuid = ?", CONNECTION_ASYNC); // GM Survey/subsurvey/lag report - PrepareStatement(CHAR_INS_GM_SURVEY, "INSERT INTO gm_surveys (guid, surveyId, mainSurvey, overallComment, createTime) VALUES (?, ?, ?, ?, UNIX_TIMESTAMP(NOW()))", CONNECTION_ASYNC); - PrepareStatement(CHAR_INS_GM_SUBSURVEY, "INSERT INTO gm_subsurveys (surveyId, subsurveyId, rank, comment) VALUES (?, ?, ?, ?)", CONNECTION_ASYNC); + PrepareStatement(CHAR_INS_GM_SURVEY, "INSERT INTO gm_survey (guid, surveyId, mainSurvey, comment, createTime) VALUES (?, ?, ?, ?, UNIX_TIMESTAMP(NOW()))", CONNECTION_ASYNC); + PrepareStatement(CHAR_INS_GM_SUBSURVEY, "INSERT INTO gm_subsurvey (surveyId, questionId, answer, answerComment) VALUES (?, ?, ?, ?)", CONNECTION_ASYNC); PrepareStatement(CHAR_INS_LAG_REPORT, "INSERT INTO lag_reports (guid, lagType, mapId, posX, posY, posZ, latency, createTime) VALUES (?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC); // LFG Data @@ -325,13 +325,13 @@ void CharacterDatabaseConnection::DoPrepareStatements() "extra_flags, stable_slots, at_login, zone, " "death_expire_time, taxi_path, arenaPoints, totalHonorPoints, todayHonorPoints, yesterdayHonorPoints, totalKills, " "todayKills, yesterdayKills, chosenTitle, knownCurrencies, watchedFaction, drunk, health, power1, power2, power3, " - "power4, power5, power6, power7, latency, speccount, activespec, exploredZones, equipmentCache, ammoId, knownTitles, actionBars, grantableLevels) VALUES " + "power4, power5, power6, power7, latency, talentGroupsCount, activeTalentGroup, exploredZones, equipmentCache, ammoId, knownTitles, actionBars, grantableLevels) VALUES " "(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)", CONNECTION_ASYNC); PrepareStatement(CHAR_UPD_CHARACTER, "UPDATE characters SET name=?,race=?,class=?,gender=?,level=?,xp=?,money=?,playerBytes=?,playerBytes2=?,playerFlags=?," "map=?,instance_id=?,instance_mode_mask=?,position_x=?,position_y=?,position_z=?,orientation=?,trans_x=?,trans_y=?,trans_z=?,trans_o=?,transguid=?,taximask=?,cinematic=?,totaltime=?,leveltime=?,rest_bonus=?," "logout_time=?,is_logout_resting=?,resettalents_cost=?,resettalents_time=?,extra_flags=?,stable_slots=?,at_login=?,zone=?,death_expire_time=?,taxi_path=?," "arenaPoints=?,totalHonorPoints=?,todayHonorPoints=?,yesterdayHonorPoints=?,totalKills=?,todayKills=?,yesterdayKills=?,chosenTitle=?,knownCurrencies=?," - "watchedFaction=?,drunk=?,health=?,power1=?,power2=?,power3=?,power4=?,power5=?,power6=?,power7=?,latency=?,speccount=?,activespec=?,exploredZones=?," + "watchedFaction=?,drunk=?,health=?,power1=?,power2=?,power3=?,power4=?,power5=?,power6=?,power7=?,latency=?,talentGroupsCount=?,activeTalentGroup=?,exploredZones=?," "equipmentCache=?,ammoId=?,knownTitles=?,actionBars=?,grantableLevels=?,online=? WHERE guid=?", CONNECTION_ASYNC); PrepareStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG, "UPDATE characters SET at_login = at_login | ? WHERE guid = ?", CONNECTION_ASYNC); @@ -341,7 +341,7 @@ void CharacterDatabaseConnection::DoPrepareStatements() PrepareStatement(CHAR_UPD_PETITION_NAME, "UPDATE petition SET name = ? WHERE petitionguid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_INS_PETITION_SIGNATURE, "INSERT INTO petition_sign (ownerguid, petitionguid, playerguid, player_account) VALUES (?, ?, ?, ?)", CONNECTION_ASYNC); PrepareStatement(CHAR_UPD_ACCOUNT_ONLINE, "UPDATE characters SET online = 0 WHERE account = ?", CONNECTION_ASYNC); - PrepareStatement(CHAR_INS_GROUP, "INSERT INTO groups (guid, leaderGuid, lootMethod, looterGuid, lootThreshold, icon1, icon2, icon3, icon4, icon5, icon6, icon7, icon8, groupType, difficulty, raiddifficulty, masterLooterGuid) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC); + PrepareStatement(CHAR_INS_GROUP, "INSERT INTO groups (guid, leaderGuid, lootMethod, looterGuid, lootThreshold, icon1, icon2, icon3, icon4, icon5, icon6, icon7, icon8, groupType, difficulty, raidDifficulty, masterLooterGuid) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC); PrepareStatement(CHAR_REP_GROUP_MEMBER, "REPLACE INTO group_member (guid, memberGuid, memberFlags, subgroup, roles) VALUES(?, ?, ?, ?, ?)", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_GROUP_MEMBER, "DELETE FROM group_member WHERE memberGuid = ? AND guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_UPD_GROUP_LEADER, "UPDATE groups SET leaderGuid = ? WHERE guid = ?", CONNECTION_ASYNC); @@ -349,7 +349,7 @@ void CharacterDatabaseConnection::DoPrepareStatements() PrepareStatement(CHAR_UPD_GROUP_MEMBER_SUBGROUP, "UPDATE group_member SET subgroup = ? WHERE memberGuid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_UPD_GROUP_MEMBER_FLAG, "UPDATE group_member SET memberFlags = ? WHERE memberGuid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_UPD_GROUP_DIFFICULTY, "UPDATE groups SET difficulty = ? WHERE guid = ?", CONNECTION_ASYNC); - PrepareStatement(CHAR_UPD_GROUP_RAID_DIFFICULTY, "UPDATE groups SET raiddifficulty = ? WHERE guid = ?", CONNECTION_ASYNC); + PrepareStatement(CHAR_UPD_GROUP_RAID_DIFFICULTY, "UPDATE groups SET raidDifficulty = ? WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_ALL_GM_TICKETS, "TRUNCATE TABLE gm_ticket", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_INVALID_SPELL_TALENTS, "DELETE FROM character_talent WHERE spell = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_INVALID_SPELL_SPELLS, "DELETE FROM character_spell WHERE spell = ?", CONNECTION_ASYNC); @@ -447,10 +447,10 @@ void CharacterDatabaseConnection::DoPrepareStatements() PrepareStatement(CHAR_DEL_CHAR_SOCIAL_BY_GUID, "DELETE FROM character_social WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_CHAR_SOCIAL_BY_FRIEND, "DELETE FROM character_social WHERE friend = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_CHAR_ACHIEVEMENT_BY_ACHIEVEMENT, "DELETE FROM character_achievement WHERE achievement = ? AND guid = ?", CONNECTION_ASYNC); - PrepareStatement(CHAR_UPD_CHAR_ACHIEVEMENT, "UPDATE character_achievement SET achievement = ? where achievement = ? AND guid = ?", CONNECTION_ASYNC); + PrepareStatement(CHAR_UPD_CHAR_ACHIEVEMENT, "UPDATE character_achievement SET achievement = ? WHERE achievement = ? AND guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_UPD_CHAR_INVENTORY_FACTION_CHANGE, "UPDATE item_instance ii, character_inventory ci SET ii.itemEntry = ? WHERE ii.itemEntry = ? AND ci.guid = ? AND ci.item = ii.guid", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_CHAR_SPELL_BY_SPELL, "DELETE FROM character_spell WHERE guid = ? AND spell = ?", CONNECTION_ASYNC); - PrepareStatement(CHAR_UPD_CHAR_SPELL_FACTION_CHANGE, "UPDATE character_spell SET spell = ? where spell = ? AND guid = ?", CONNECTION_ASYNC); + PrepareStatement(CHAR_UPD_CHAR_SPELL_FACTION_CHANGE, "UPDATE character_spell SET spell = ? WHERE spell = ? AND guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_SEL_CHAR_REP_BY_FACTION, "SELECT standing FROM character_reputation WHERE faction = ? AND guid = ?", CONNECTION_SYNCH); PrepareStatement(CHAR_DEL_CHAR_REP_BY_FACTION, "DELETE FROM character_reputation WHERE faction = ? AND guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_UPD_CHAR_REP_FACTION_CHANGE, "UPDATE character_reputation SET faction = ?, standing = ? WHERE faction = ? AND guid = ?", CONNECTION_ASYNC); @@ -481,7 +481,7 @@ void CharacterDatabaseConnection::DoPrepareStatements() PrepareStatement(CHAR_UPD_CHAR_REMOVE_GHOST, "UPDATE characters SET playerFlags = (playerFlags & (~16)) WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_INS_CHAR_ACTION, "INSERT INTO character_action (guid, spec, button, action, type) VALUES (?, ?, ?, ?, ?)", CONNECTION_ASYNC); PrepareStatement(CHAR_UPD_CHAR_ACTION, "UPDATE character_action SET action = ?, type = ? WHERE guid = ? AND button = ? AND spec = ?", CONNECTION_ASYNC); - PrepareStatement(CHAR_DEL_CHAR_ACTION_BY_BUTTON_SPEC, "DELETE FROM character_action WHERE guid = ? and button = ? and spec = ?", CONNECTION_ASYNC); + PrepareStatement(CHAR_DEL_CHAR_ACTION_BY_BUTTON_SPEC, "DELETE FROM character_action WHERE guid = ? AND button = ? AND spec = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_CHAR_INVENTORY_BY_ITEM, "DELETE FROM character_inventory WHERE item = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_CHAR_INVENTORY_BY_BAG_SLOT, "DELETE FROM character_inventory WHERE bag = ? AND slot = ? AND guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_UPD_MAIL, "UPDATE mail SET has_items = ?, expire_time = ?, deliver_time = ?, money = ?, cod = ?, checked = ? WHERE id = ?", CONNECTION_ASYNC); @@ -505,7 +505,7 @@ void CharacterDatabaseConnection::DoPrepareStatements() PrepareStatement(CHAR_DEL_PETITION_BY_OWNER_AND_TYPE, "DELETE FROM petition WHERE ownerguid = ? AND type = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_PETITION_SIGNATURE_BY_OWNER_AND_TYPE, "DELETE FROM petition_sign WHERE ownerguid = ? AND type = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_INS_CHAR_GLYPHS, "INSERT INTO character_glyphs VALUES(?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC); - PrepareStatement(CHAR_DEL_CHAR_TALENT_BY_SPELL, "DELETE FROM character_talent WHERE guid = ? and spell = ?", CONNECTION_ASYNC); + PrepareStatement(CHAR_DEL_CHAR_TALENT_BY_SPELL, "DELETE FROM character_talent WHERE guid = ? AND spell = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_INS_CHAR_TALENT, "INSERT INTO character_talent (guid, spell, specMask) VALUES (?, ?, ?)", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_CHAR_ACTION_EXCEPT_SPEC, "DELETE FROM character_action WHERE spec<>? AND guid = ?", CONNECTION_ASYNC); @@ -532,17 +532,17 @@ void CharacterDatabaseConnection::DoPrepareStatements() PrepareStatement(CHAR_DEL_CHAR_PET_DECLINEDNAME_BY_OWNER, "DELETE FROM character_pet_declinedname WHERE owner = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_CHAR_PET_DECLINEDNAME, "DELETE FROM character_pet_declinedname WHERE id = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_ADD_CHAR_PET_DECLINEDNAME, "INSERT INTO character_pet_declinedname (id, owner, genitive, dative, accusative, instrumental, prepositional) VALUES (?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC); - PrepareStatement(CHAR_SEL_PET_AURA, "SELECT caster_guid, spell, effect_mask, recalculate_mask, stackcount, amount0, amount1, amount2, base_amount0, base_amount1, base_amount2, maxduration, remaintime, remaincharges FROM pet_aura WHERE guid = ?", CONNECTION_ASYNC); + PrepareStatement(CHAR_SEL_PET_AURA, "SELECT casterGuid, spell, effectMask, recalculateMask, stackCount, amount0, amount1, amount2, base_amount0, base_amount1, base_amount2, maxDuration, remainTime, remainCharges FROM pet_aura WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_SEL_PET_SPELL, "SELECT spell, active FROM pet_spell WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_SEL_PET_SPELL_COOLDOWN, "SELECT spell, time FROM pet_spell_cooldown WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_PET_AURAS, "DELETE FROM pet_aura WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_PET_SPELLS, "DELETE FROM pet_spell WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_PET_SPELL_COOLDOWNS, "DELETE FROM pet_spell_cooldown WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_INS_PET_SPELL_COOLDOWN, "INSERT INTO pet_spell_cooldown (guid, spell, time) VALUES (?, ?, ?)", CONNECTION_ASYNC); - PrepareStatement(CHAR_DEL_PET_SPELL_BY_SPELL, "DELETE FROM pet_spell WHERE guid = ? and spell = ?", CONNECTION_ASYNC); + PrepareStatement(CHAR_DEL_PET_SPELL_BY_SPELL, "DELETE FROM pet_spell WHERE guid = ? AND spell = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_INS_PET_SPELL, "INSERT INTO pet_spell (guid, spell, active) VALUES (?, ?, ?)", CONNECTION_ASYNC); - PrepareStatement(CHAR_INS_PET_AURA, "INSERT INTO pet_aura (guid, caster_guid, spell, effect_mask, recalculate_mask, stackcount, amount0, amount1, amount2, " - "base_amount0, base_amount1, base_amount2, maxduration, remaintime, remaincharges) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC); + PrepareStatement(CHAR_INS_PET_AURA, "INSERT INTO pet_aura (guid, casterGuid, spell, effectMask, recalculateMask, stackCount, amount0, amount1, amount2, " + "base_amount0, base_amount1, base_amount2, maxDuration, remainTime, remainCharges) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC); PrepareStatement(CHAR_SEL_CHAR_PET_BY_ENTRY, "SELECT id, entry, owner, modelid, level, exp, Reactstate, slot, name, renamed, curhealth, curmana, curhappiness, abdata, savetime, CreatedBySpell, PetType FROM character_pet WHERE owner = ? AND id = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_SEL_CHAR_PET_BY_ENTRY_AND_SLOT_2, "SELECT id, entry, owner, modelid, level, exp, Reactstate, slot, name, renamed, curhealth, curmana, curhappiness, abdata, savetime, CreatedBySpell, PetType FROM character_pet WHERE owner = ? AND entry = ? AND (slot = ? OR slot > ?)", CONNECTION_ASYNC); PrepareStatement(CHAR_SEL_CHAR_PET_BY_SLOT, "SELECT id, entry, owner, modelid, level, exp, Reactstate, slot, name, renamed, curhealth, curmana, curhappiness, abdata, savetime, CreatedBySpell, PetType FROM character_pet WHERE owner = ? AND (slot = ? OR slot > ?) ", CONNECTION_ASYNC); diff --git a/src/cmake/revision.h.in.cmake b/src/cmake/revision.h.in.cmake index 47afec3152..9888ddd90b 100644 --- a/src/cmake/revision.h.in.cmake +++ b/src/cmake/revision.h.in.cmake @@ -3,10 +3,11 @@ #define _REVISION "@rev_id_str@" #define _HASH "@rev_hash@" #define _DATE "@rev_date@" + #define _BRANCH "@rev_branch@" #define VER_COMPANYNAME_STR "AzerothCore" #define VER_LEGALCOPYRIGHT_STR "AzerothCore" #define VER_FILEVERSION 0,0,0 - #define VER_FILEVERSION_STR "@rev_hash@ @rev_date@" + #define VER_FILEVERSION_STR "@rev_hash@ @rev_date@ (@rev_branch@ branch)" #define VER_PRODUCTVERSION VER_FILEVERSION #define VER_PRODUCTVERSION_STR VER_FILEVERSION_STR #endif // __REVISION_H__ diff --git a/src/game/Battlegrounds/BattlegroundMgr.h b/src/game/Battlegrounds/BattlegroundMgr.h index 25a7e92c17..d59129a41d 100644 --- a/src/game/Battlegrounds/BattlegroundMgr.h +++ b/src/game/Battlegrounds/BattlegroundMgr.h @@ -29,8 +29,6 @@ typedef std::map BattlegroundContainer; typedef UNORDERED_MAP BattleMastersMap; -#define WS_ARENA_DISTRIBUTION_TIME 20001 // Custom worldstate - struct CreateBattlegroundData { BattlegroundTypeId bgTypeId; diff --git a/src/game/Entities/Player/Player.cpp b/src/game/Entities/Player/Player.cpp index 0dac632644..933b45520c 100644 --- a/src/game/Entities/Player/Player.cpp +++ b/src/game/Entities/Player/Player.cpp @@ -17336,8 +17336,8 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder) //"resettalents_time, trans_x, trans_y, trans_z, trans_o, transguid, extra_flags, stable_slots, at_login, zone, online, death_expire_time, taxi_path, instance_mode_mask, " // 39 40 41 42 43 44 45 46 47 48 49 //"arenaPoints, totalHonorPoints, todayHonorPoints, yesterdayHonorPoints, totalKills, todayKills, yesterdayKills, chosenTitle, knownCurrencies, watchedFaction, drunk, " - // 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 - //"health, power1, power2, power3, power4, power5, power6, power7, instance_id, speccount, activespec, exploredZones, equipmentCache, ammoId, knownTitles, actionBars, grantableLevels FROM characters WHERE guid = '%u'", guid); + // 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 + //"health, power1, power2, power3, power4, power5, power6, power7, instance_id, talentGroupsCount, activeTalentGroup, exploredZones, equipmentCache, ammoId, knownTitles, actionBars, grantableLevels FROM characters WHERE guid = '%u'", guid); PreparedQueryResult result = holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_FROM); if (!result) @@ -18052,10 +18052,10 @@ void Player::_LoadAuras(PreparedQueryResult result, uint32 timediff) { ;//sLog->outDebug(LOG_FILTER_PLAYER_LOADING, "Loading auras for player %u", GetGUIDLow()); - /* 0 1 2 3 4 5 6 7 8 9 10 - QueryResult* result = CharacterDatabase.PQuery("SELECT caster_guid, spell, effect_mask, recalculate_mask, stackcount, amount0, amount1, amount2, base_amount0, base_amount1, base_amount2, - 11 12 13 - maxduration, remaintime, remaincharges FROM character_aura WHERE guid = '%u'", GetGUIDLow()); + /* 0 1 2 3 4 5 6 7 8 9 10 + QueryResult* result = CharacterDatabase.PQuery("SELECT casterGuid, spell, effectMask, recalculateMask, stackCount, amount0, amount1, amount2, base_amount0, base_amount1, base_amount2, + 11 12 13 + maxDuration, remainTime, remainCharges FROM character_aura WHERE guid = '%u'", GetGUIDLow()); */ if (result) @@ -26016,7 +26016,7 @@ void Player::_SaveCharacter(bool create, SQLTransaction& trans) void Player::_LoadGlyphs(PreparedQueryResult result) { - // SELECT spec, glyph1, glyph2, glyph3, glyph4, glyph5, glyph6 from character_glyphs WHERE guid = '%u' + // SELECT talentGroup, glyph1, glyph2, glyph3, glyph4, glyph5, glyph6 from character_glyphs WHERE guid = '%u' if (!result) return; diff --git a/src/game/Entities/Player/Player.h b/src/game/Entities/Player/Player.h index 97feda9fc9..2c3017f793 100644 --- a/src/game/Entities/Player/Player.h +++ b/src/game/Entities/Player/Player.h @@ -2116,6 +2116,12 @@ class Player : public Unit, public GridObject void SetHonorPoints(uint32 value); void SetArenaPoints(uint32 value); + // duel health and mana reset methods + void SaveHealthBeforeDuel() { healthBeforeDuel = GetHealth(); } + void SaveManaBeforeDuel() { manaBeforeDuel = GetPower(POWER_MANA); } + void RestoreHealthAfterDuel() { SetHealth(healthBeforeDuel); } + void RestoreManaAfterDuel() { SetPower(POWER_MANA, manaBeforeDuel); } + //End of PvP System inline SpellCooldowns GetSpellCooldowns() const { return m_spellCooldowns; } @@ -2940,6 +2946,10 @@ class Player : public Unit, public GridObject InstanceTimeMap _instanceResetTimes; uint32 _pendingBindId; uint32 _pendingBindTimer; + + // duel health and mana reset attributes + uint32 healthBeforeDuel; + uint32 manaBeforeDuel; }; void AddItemsSetItem(Player*player, Item* item); diff --git a/src/game/Groups/GroupMgr.cpp b/src/game/Groups/GroupMgr.cpp index e80e0c83f9..2fdfcbff1d 100644 --- a/src/game/Groups/GroupMgr.cpp +++ b/src/game/Groups/GroupMgr.cpp @@ -108,7 +108,7 @@ void GroupMgr::LoadGroups() // 0 1 2 3 4 5 6 7 8 9 QueryResult result = CharacterDatabase.Query("SELECT g.leaderGuid, g.lootMethod, g.looterGuid, g.lootThreshold, g.icon1, g.icon2, g.icon3, g.icon4, g.icon5, g.icon6" // 10 11 12 13 14 15 16 17 18 - ", g.icon7, g.icon8, g.groupType, g.difficulty, g.raiddifficulty, g.masterLooterGuid, g.guid, lfg.dungeon, lfg.state FROM groups g LEFT JOIN lfg_data lfg ON lfg.guid = g.guid ORDER BY g.guid ASC"); + ", g.icon7, g.icon8, g.groupType, g.difficulty, g.raidDifficulty, g.masterLooterGuid, g.guid, lfg.dungeon, lfg.state FROM groups g LEFT JOIN lfg_data lfg ON lfg.guid = g.guid ORDER BY g.guid ASC"); if (!result) { diff --git a/src/game/Tickets/TicketMgr.cpp b/src/game/Tickets/TicketMgr.cpp index 6ce2ed07a1..9c83b9a9f7 100644 --- a/src/game/Tickets/TicketMgr.cpp +++ b/src/game/Tickets/TicketMgr.cpp @@ -293,7 +293,7 @@ void TicketMgr::LoadTickets() PreparedQueryResult result = CharacterDatabase.Query(stmt); if (!result) { - sLog->outString(">> Loaded 0 GM tickets. DB table `gm_tickets` is empty!"); + sLog->outString(">> Loaded 0 GM tickets. DB table `gm_ticket` is empty!"); return; } @@ -330,7 +330,7 @@ void TicketMgr::LoadSurveys() _lastSurveyId = 0; uint32 oldMSTime = getMSTime(); - if (QueryResult result = CharacterDatabase.Query("SELECT MAX(surveyId) FROM gm_surveys")) + if (QueryResult result = CharacterDatabase.Query("SELECT MAX(surveyId) FROM gm_survey")) _lastSurveyId = (*result)[0].GetUInt32(); sLog->outString(">> Loaded GM Survey count from database in %u ms", GetMSTimeDiffToNow(oldMSTime)); diff --git a/src/game/World/World.h b/src/game/World/World.h index ee631e71fa..d3ca219cd4 100644 --- a/src/game/World/World.h +++ b/src/game/World/World.h @@ -461,10 +461,11 @@ enum RealmZone enum WorldStates { + WS_ARENA_DISTRIBUTION_TIME = 20001, // Next arena distribution time WS_WEEKLY_QUEST_RESET_TIME = 20002, // Next weekly reset time WS_BG_DAILY_RESET_TIME = 20003, // Next daily BG reset time WS_CLEANING_FLAGS = 20004, // Cleaning Flags - WS_DAILY_QUEST_RESET_TIME = 20005, // pussywizard + WS_DAILY_QUEST_RESET_TIME = 20005, // Next daily reset time WS_GUILD_DAILY_RESET_TIME = 20006, // Next guild cap reset time WS_MONTHLY_QUEST_RESET_TIME = 20007, // Next monthly reset time };