diff --git a/sql/characters.sql b/sql/characters.sql index 88885388a..7ab912fc6 100644 --- a/sql/characters.sql +++ b/sql/characters.sql @@ -900,9 +900,11 @@ DROP TABLE IF EXISTS `petition`; CREATE TABLE IF NOT EXISTS `petition` ( `ownerguid` int(10) unsigned NOT NULL, `petitionguid` int(10) unsigned DEFAULT '0', + `charterguid` int(10) unsigned DEFAULT NULL COMMENT 'Charter item GUID', `name` varchar(255) NOT NULL DEFAULT '', PRIMARY KEY (`ownerguid`), - UNIQUE KEY `key_ownerguid_petitionguid` (`ownerguid`,`petitionguid`) + UNIQUE KEY `key_ownerguid_petitionguid` (`ownerguid`,`petitionguid`), + UNIQUE KEY `charterguid` (`charterguid`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Guild System'; -- Data exporting was unselected. diff --git a/sql/logon.sql b/sql/logon.sql index 6aac44310..d074b0961 100644 --- a/sql/logon.sql +++ b/sql/logon.sql @@ -1,21 +1,18 @@ -/* -SQLyog Ultimate -MySQL - 5.7.14-log : Database - nost_logon -********************************************************************* -*/ +-- -------------------------------------------------------- +-- Хост: 127.0.0.1 +-- Server version: 5.5.53 - MySQL Community Server (GPL) +-- Server OS: Win32 +-- HeidiSQL Версия: 9.3.0.4998 +-- -------------------------------------------------------- -/*!40101 SET NAMES utf8 */; - -/*!40101 SET SQL_MODE=''*/; - -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET NAMES utf8mb4 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -/*Table structure for table `account` */ +-- Dumping structure for table realmd.account DROP TABLE IF EXISTS `account`; - -CREATE TABLE `account` ( +CREATE TABLE IF NOT EXISTS `account` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Identifier', `username` varchar(32) NOT NULL, `sha_pass_hash` varchar(40) NOT NULL, @@ -48,35 +45,38 @@ CREATE TABLE `account` ( `mail_verif` tinyint(1) unsigned NOT NULL DEFAULT '0', `remember_token` varchar(100) NOT NULL DEFAULT '', `flags` int(10) unsigned NOT NULL DEFAULT '0', - `security` varchar(255) NULL, - `pass_verif` varchar(255) NULL COMMENT 'Web recover password', + `security` varchar(255) DEFAULT NULL, + `pass_verif` varchar(255) DEFAULT NULL COMMENT 'Web recover password', `email_verif` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Email verification', - `email_check` varchar(255) NULL, - `nostalrius_token` varchar(255) NULL, + `email_check` varchar(255) DEFAULT NULL, + `nostalrius_token` varchar(255) DEFAULT NULL, `nostalrius_token_enabled` tinyint(1) NOT NULL DEFAULT '0', - `nostalrius_email` text NULL, - `nostalrius_reason` text NULL, + `nostalrius_email` text, + `nostalrius_reason` text, + `geolock_pin` int(11) DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `idx_username` (`username`), KEY `idx_gmlevel` (`gmlevel`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Account System'; -/*Table structure for table `account_access` */ +-- Data exporting was unselected. + +-- Dumping structure for table realmd.account_access DROP TABLE IF EXISTS `account_access`; - -CREATE TABLE `account_access` ( +CREATE TABLE IF NOT EXISTS `account_access` ( `id` int(11) unsigned NOT NULL, `gmlevel` tinyint(3) unsigned NOT NULL, `RealmID` int(11) NOT NULL, PRIMARY KEY (`id`,`RealmID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC; -/*Table structure for table `account_banned` */ +-- Data exporting was unselected. + +-- Dumping structure for table realmd.account_banned DROP TABLE IF EXISTS `account_banned`; - -CREATE TABLE `account_banned` ( +CREATE TABLE IF NOT EXISTS `account_banned` ( `id` bigint(20) NOT NULL DEFAULT '0' COMMENT 'Account id', `bandate` bigint(40) NOT NULL DEFAULT '0', `unbandate` bigint(40) NOT NULL DEFAULT '0', @@ -85,24 +85,47 @@ CREATE TABLE `account_banned` ( `active` tinyint(4) NOT NULL DEFAULT '1', `realm` tinyint(4) NOT NULL DEFAULT '1', `gmlevel` tinyint(4) unsigned NOT NULL DEFAULT '0', - PRIMARY KEY (`id`, `bandate`) + PRIMARY KEY (`id`,`bandate`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Ban List'; -/*Table structure for table `ip2nation` */ +-- Data exporting was unselected. + +-- Dumping structure for table realmd.geoip +DROP TABLE IF EXISTS `geoip`; +CREATE TABLE IF NOT EXISTS `geoip` ( + `network_start_integer` int(11) DEFAULT NULL, + `network_last_integer` int(11) DEFAULT NULL, + `geoname_id` text, + `registered_country_geoname_id` text, + `represented_country_geoname_id` text, + `is_anonymous_proxy` int(11) DEFAULT NULL, + `is_satellite_provider` int(11) DEFAULT NULL, + `postal_code` text, + `latitude` double DEFAULT NULL, + `longitude` double DEFAULT NULL, + `accuracy_radius` int(11) DEFAULT NULL, + KEY `ip_start` (`network_start_integer`), + KEY `ip_end` (`network_last_integer`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- Data exporting was unselected. + + +-- Dumping structure for table realmd.ip2nation DROP TABLE IF EXISTS `ip2nation`; - -CREATE TABLE `ip2nation` ( +CREATE TABLE IF NOT EXISTS `ip2nation` ( `ip` int(11) unsigned NOT NULL DEFAULT '0', `country` char(2) NOT NULL DEFAULT '', KEY `ip` (`ip`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*Table structure for table `ip2nationcountries` */ +-- Data exporting was unselected. + +-- Dumping structure for table realmd.ip2nationcountries DROP TABLE IF EXISTS `ip2nationcountries`; - -CREATE TABLE `ip2nationcountries` ( +CREATE TABLE IF NOT EXISTS `ip2nationcountries` ( `code` varchar(4) NOT NULL DEFAULT '', `iso_code_2` varchar(2) NOT NULL DEFAULT '', `iso_code_3` varchar(3) DEFAULT '', @@ -114,11 +137,12 @@ CREATE TABLE `ip2nationcountries` ( KEY `code` (`code`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*Table structure for table `ip_banned` */ +-- Data exporting was unselected. + +-- Dumping structure for table realmd.ip_banned DROP TABLE IF EXISTS `ip_banned`; - -CREATE TABLE `ip_banned` ( +CREATE TABLE IF NOT EXISTS `ip_banned` ( `ip` varchar(32) NOT NULL DEFAULT '0.0.0.0', `bandate` int(11) NOT NULL, `unbandate` int(11) NOT NULL, @@ -127,20 +151,22 @@ CREATE TABLE `ip_banned` ( PRIMARY KEY (`ip`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Banned IPs'; -/*Table structure for table `migrations` */ +-- Data exporting was unselected. + +-- Dumping structure for table realmd.migrations DROP TABLE IF EXISTS `migrations`; - -CREATE TABLE `migrations` ( +CREATE TABLE IF NOT EXISTS `migrations` ( `id` varchar(255) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `realmcharacters` */ +-- Data exporting was unselected. + +-- Dumping structure for table realmd.realmcharacters DROP TABLE IF EXISTS `realmcharacters`; - -CREATE TABLE `realmcharacters` ( +CREATE TABLE IF NOT EXISTS `realmcharacters` ( `realmid` int(11) unsigned NOT NULL DEFAULT '0', `acctid` bigint(20) unsigned NOT NULL, `numchars` tinyint(3) unsigned NOT NULL DEFAULT '0', @@ -148,11 +174,12 @@ CREATE TABLE `realmcharacters` ( KEY `acctid` (`acctid`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Realm Character Tracker'; -/*Table structure for table `realmlist` */ +-- Data exporting was unselected. + +-- Dumping structure for table realmd.realmlist DROP TABLE IF EXISTS `realmlist`; - -CREATE TABLE `realmlist` ( +CREATE TABLE IF NOT EXISTS `realmlist` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(32) NOT NULL DEFAULT '', `address` varchar(32) NOT NULL DEFAULT '127.0.0.1', @@ -172,20 +199,23 @@ CREATE TABLE `realmlist` ( UNIQUE KEY `idx_name` (`name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Realm System'; -/*Table structure for table `uptime` */ +-- Data exporting was unselected. + +-- Dumping structure for table realmd.uptime DROP TABLE IF EXISTS `uptime`; - -CREATE TABLE `uptime` ( +CREATE TABLE IF NOT EXISTS `uptime` ( `realmid` int(11) unsigned NOT NULL, `starttime` bigint(20) unsigned NOT NULL DEFAULT '0', `startstring` varchar(64) NOT NULL DEFAULT '', `uptime` bigint(20) unsigned NOT NULL DEFAULT '0', + `onlineplayers` smallint(5) unsigned NOT NULL DEFAULT '0', `maxplayers` smallint(5) unsigned NOT NULL DEFAULT '0', `revision` varchar(255) NOT NULL DEFAULT 'Trinitycore', PRIMARY KEY (`realmid`,`starttime`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Uptime system'; -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; +-- Data exporting was unselected. +/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */; +/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; diff --git a/sql/migrations/20171026201902_world.sql b/sql/old_migrations/20171026201902_world.sql similarity index 100% rename from sql/migrations/20171026201902_world.sql rename to sql/old_migrations/20171026201902_world.sql diff --git a/sql/migrations/20171029135125_world.sql b/sql/old_migrations/20171029135125_world.sql similarity index 100% rename from sql/migrations/20171029135125_world.sql rename to sql/old_migrations/20171029135125_world.sql diff --git a/sql/migrations/20171029144753_logon.sql b/sql/old_migrations/20171029144753_logon.sql similarity index 100% rename from sql/migrations/20171029144753_logon.sql rename to sql/old_migrations/20171029144753_logon.sql diff --git a/sql/migrations/20171030141951_logon.sql b/sql/old_migrations/20171030141951_logon.sql similarity index 100% rename from sql/migrations/20171030141951_logon.sql rename to sql/old_migrations/20171030141951_logon.sql diff --git a/sql/migrations/20171030171425_world.sql b/sql/old_migrations/20171030171425_world.sql similarity index 100% rename from sql/migrations/20171030171425_world.sql rename to sql/old_migrations/20171030171425_world.sql diff --git a/sql/migrations/20171101091800_world.sql b/sql/old_migrations/20171101091800_world.sql similarity index 100% rename from sql/migrations/20171101091800_world.sql rename to sql/old_migrations/20171101091800_world.sql diff --git a/sql/migrations/20171101200054_world.sql b/sql/old_migrations/20171101200054_world.sql similarity index 100% rename from sql/migrations/20171101200054_world.sql rename to sql/old_migrations/20171101200054_world.sql diff --git a/sql/migrations/20171107204604_world.sql b/sql/old_migrations/20171107204604_world.sql similarity index 100% rename from sql/migrations/20171107204604_world.sql rename to sql/old_migrations/20171107204604_world.sql diff --git a/sql/migrations/20171108011938_world.sql b/sql/old_migrations/20171108011938_world.sql similarity index 100% rename from sql/migrations/20171108011938_world.sql rename to sql/old_migrations/20171108011938_world.sql diff --git a/sql/migrations/20171109214918_world.sql b/sql/old_migrations/20171109214918_world.sql similarity index 100% rename from sql/migrations/20171109214918_world.sql rename to sql/old_migrations/20171109214918_world.sql diff --git a/sql/migrations/20171110002120_world.sql b/sql/old_migrations/20171110002120_world.sql similarity index 100% rename from sql/migrations/20171110002120_world.sql rename to sql/old_migrations/20171110002120_world.sql diff --git a/sql/migrations/20171111061703_world.sql b/sql/old_migrations/20171111061703_world.sql similarity index 100% rename from sql/migrations/20171111061703_world.sql rename to sql/old_migrations/20171111061703_world.sql diff --git a/sql/migrations/20171111071007_world.sql b/sql/old_migrations/20171111071007_world.sql similarity index 100% rename from sql/migrations/20171111071007_world.sql rename to sql/old_migrations/20171111071007_world.sql diff --git a/sql/migrations/20171111094919_world.sql b/sql/old_migrations/20171111094919_world.sql similarity index 100% rename from sql/migrations/20171111094919_world.sql rename to sql/old_migrations/20171111094919_world.sql diff --git a/sql/migrations/20171111165742_world.sql b/sql/old_migrations/20171111165742_world.sql similarity index 100% rename from sql/migrations/20171111165742_world.sql rename to sql/old_migrations/20171111165742_world.sql diff --git a/sql/migrations/20171112152449_world.sql b/sql/old_migrations/20171112152449_world.sql similarity index 100% rename from sql/migrations/20171112152449_world.sql rename to sql/old_migrations/20171112152449_world.sql diff --git a/sql/migrations/20171112185800_world.sql b/sql/old_migrations/20171112185800_world.sql similarity index 100% rename from sql/migrations/20171112185800_world.sql rename to sql/old_migrations/20171112185800_world.sql diff --git a/sql/migrations/20171113010648_world.sql b/sql/old_migrations/20171113010648_world.sql similarity index 100% rename from sql/migrations/20171113010648_world.sql rename to sql/old_migrations/20171113010648_world.sql diff --git a/sql/migrations/20171114011711_world.sql b/sql/old_migrations/20171114011711_world.sql similarity index 100% rename from sql/migrations/20171114011711_world.sql rename to sql/old_migrations/20171114011711_world.sql diff --git a/sql/migrations/20171114071349_world.sql b/sql/old_migrations/20171114071349_world.sql similarity index 100% rename from sql/migrations/20171114071349_world.sql rename to sql/old_migrations/20171114071349_world.sql diff --git a/sql/migrations/20171114183823_world.sql b/sql/old_migrations/20171114183823_world.sql similarity index 100% rename from sql/migrations/20171114183823_world.sql rename to sql/old_migrations/20171114183823_world.sql diff --git a/sql/migrations/20171114231424_world.sql b/sql/old_migrations/20171114231424_world.sql similarity index 100% rename from sql/migrations/20171114231424_world.sql rename to sql/old_migrations/20171114231424_world.sql diff --git a/sql/migrations/20171118020045_world.sql b/sql/old_migrations/20171118020045_world.sql similarity index 100% rename from sql/migrations/20171118020045_world.sql rename to sql/old_migrations/20171118020045_world.sql diff --git a/sql/migrations/20171118154313_world.sql b/sql/old_migrations/20171118154313_world.sql similarity index 100% rename from sql/migrations/20171118154313_world.sql rename to sql/old_migrations/20171118154313_world.sql diff --git a/sql/migrations/20171119204308_world.sql b/sql/old_migrations/20171119204308_world.sql similarity index 100% rename from sql/migrations/20171119204308_world.sql rename to sql/old_migrations/20171119204308_world.sql diff --git a/sql/migrations/20171120021353_world.sql b/sql/old_migrations/20171120021353_world.sql similarity index 98% rename from sql/migrations/20171120021353_world.sql rename to sql/old_migrations/20171120021353_world.sql index 0a25b357e..e2b9b0652 100644 --- a/sql/migrations/20171120021353_world.sql +++ b/sql/old_migrations/20171120021353_world.sql @@ -1,88 +1,88 @@ -DROP PROCEDURE IF EXISTS add_migration; -delimiter ?? -CREATE PROCEDURE `add_migration`() -BEGIN -DECLARE v INT DEFAULT 1; -SET v = (SELECT COUNT(*) FROM `migrations` WHERE `id`='20171120021353'); -IF v=0 THEN -INSERT INTO `migrations` VALUES ('20171120021353'); --- Add your query below. - --- fix Maraudon scepter activate object -DELETE FROM `spell_script_target` WHERE `entry`=21127; -INSERT INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES (21127,0,178386); - --- remove party flag from 7046: The Scepter of Celebras -UPDATE `quest_template` SET `QuestFlags`=0 WHERE `entry`=7046; - --- add missing npc text -DELETE FROM `npc_text` WHERE `ID`=6374; -INSERT INTO `npc_text` (`ID`, `BroadcastTextID0`, `Probability0`) VALUES (6374, 8927, 1); - --- Add gossip and spawn for 13716: Celebras the Redeemed -UPDATE `creature_template` SET `gossip_menu_id`=5349, `npcflag`=3 WHERE `entry`=13716; -DELETE FROM `creature` WHERE `guid`=55105; -INSERT INTO `creature` (`guid`,`id`,`map`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`DeathState`,`MovementType`,`spawnFlags`) VALUES -(55105,13716,349,0,0,726.106,77.9764,-86.5913,6.0,60,0,0,6602,0,0,0,1); - --- set instance script for Maraudon -UPDATE `map_template` SET `ScriptName`='instance_maraudon' WHERE `entry`=349; - --- Gossip for Celebras the Redeemed -DELETE FROM `gossip_menu` WHERE `entry` BETWEEN 5349 AND 5358; -DELETE FROM `gossip_menu_option` WHERE `menu_id` BETWEEN 5349 AND 5358; -DELETE FROM `conditions` WHERE `condition_entry` BETWEEN 53490 AND 53509; -DELETE FROM `gossip_scripts` WHERE id=53500; - --- Default -INSERT INTO `gossip_menu` (`entry`, `text_id`, `condition_id`) VALUES (5349, 6354, 0); - --- 7046 is available -INSERT INTO `conditions` (`condition_entry`, `type`, `value1`, `value2`) VALUES (53490, 19, 7046, 0); -INSERT INTO `gossip_menu` (`entry`, `text_id`, `condition_id`) VALUES (5349, 6375, 53490); - --- 7046 is completed or rewarded -INSERT INTO `conditions` (`condition_entry`, `type`, `value1`, `value2`) VALUES (53491, 9, 7046, 2); -INSERT INTO `conditions` (`condition_entry`, `type`, `value1`, `value2`) VALUES (53492, 8, 7046, 0); -INSERT INTO `conditions` (`condition_entry`, `type`, `value1`, `value2`) VALUES (53493, -2, 53491, 53492); -INSERT INTO `gossip_menu` (`entry`, `text_id`, `condition_id`) VALUES (5349, 6373, 53493); - --- Lost scepter -INSERT INTO `conditions` (`condition_entry`, `type`, `value1`, `value2`) VALUES (53500, 24, 17191, 1); -INSERT INTO `conditions` (`condition_entry`, `type`, `value1`, `value2`) VALUES (53501, -1, 53492, 53500); -INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_script_id`, `condition_id`) VALUES (5349, 0, 0, 'Celebras, I lost my Scepter...', 1, 1, 5350, 53500, 53501); -INSERT INTO `gossip_menu` (`entry`, `text_id`, `condition_id`) VALUES (5350, 6374, 0); -INSERT INTO `gossip_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `comments`) VALUES (53500, 3, 15, 21939, 0, 'Celebras the Redeemed: Create Scepter of Celebras'); - --- 7044 is incomplete -INSERT INTO `conditions` (`condition_entry`, `type`, `value1`, `value2`) VALUES (53502, 9, 7044, 1); -INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `condition_id`) VALUES (5349, 1, 0, 'How can I find the two parts of your scepter?', 1, 1, 5351, 53502); -INSERT INTO `gossip_menu` (`entry`, `text_id`, `condition_id`) VALUES (5351, 6384, 0); -INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`) VALUES (5351, 0, 0, 'Why didn\'t Lord Vyletongue unite both parts of the scepter into one?', 1, 1, 5358); -INSERT INTO `gossip_menu` (`entry`, `text_id`, `condition_id`) VALUES (5358, 6385, 0); - --- 7046 is rewarded -INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `condition_id`) VALUES (5349, 2, 0, 'Please explain how the scepter works.', 1, 1, 5352, 53492); -INSERT INTO `gossip_menu` (`entry`, `text_id`, `condition_id`) VALUES (5352, 6377, 0); -INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`) VALUES (5352, 0, 0, 'I don\'t quite understand...', 1, 1, 5353); -INSERT INTO `gossip_menu` (`entry`, `text_id`, `condition_id`) VALUES (5353, 6378, 0); -INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`) VALUES (5353, 0, 0, 'No, really, I still don\'t understand...', 1, 1, 5354); -INSERT INTO `gossip_menu` (`entry`, `text_id`, `condition_id`) VALUES (5354, 6379, 0); -INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `condition_id`) VALUES (5349, 3, 0, 'Please tell me more about Maraudon.', 1, 1, 5355, 53492); -INSERT INTO `gossip_menu` (`entry`, `text_id`, `condition_id`) VALUES (5355, 6380, 0); -INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`) VALUES (5355, 3, 0, 'Please tell me more about Zaetar.', 1, 1, 5356); -INSERT INTO `gossip_menu` (`entry`, `text_id`, `condition_id`) VALUES (5356, 6381, 0); -INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`) VALUES (5356, 3, 0, 'Tell me more about the history of Remulos and Zaetar.', 1, 1, 5357); -INSERT INTO `gossip_menu` (`entry`, `text_id`, `condition_id`) VALUES (5357, 6393, 0); - --- Move waypoint wait times from script to DB for celebras_spirit script -UPDATE `script_waypoint` SET `waittime`=8000 WHERE `entry`=13716 AND `pointid`=1; -UPDATE `script_waypoint` SET `waittime`=4000 WHERE `entry`=13716 AND `pointid`=5; -UPDATE `script_waypoint` SET `waittime`=3000 WHERE `entry`=13716 AND `pointid`=9; - --- End of migration. -END IF; -END?? -delimiter ; -CALL add_migration(); +DROP PROCEDURE IF EXISTS add_migration; +delimiter ?? +CREATE PROCEDURE `add_migration`() +BEGIN +DECLARE v INT DEFAULT 1; +SET v = (SELECT COUNT(*) FROM `migrations` WHERE `id`='20171120021353'); +IF v=0 THEN +INSERT INTO `migrations` VALUES ('20171120021353'); +-- Add your query below. + +-- fix Maraudon scepter activate object +DELETE FROM `spell_script_target` WHERE `entry`=21127; +INSERT INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES (21127,0,178386); + +-- remove party flag from 7046: The Scepter of Celebras +UPDATE `quest_template` SET `QuestFlags`=0 WHERE `entry`=7046; + +-- add missing npc text +DELETE FROM `npc_text` WHERE `ID`=6374; +INSERT INTO `npc_text` (`ID`, `BroadcastTextID0`, `Probability0`) VALUES (6374, 8927, 1); + +-- Add gossip and spawn for 13716: Celebras the Redeemed +UPDATE `creature_template` SET `gossip_menu_id`=5349, `npcflag`=3 WHERE `entry`=13716; +DELETE FROM `creature` WHERE `guid`=55105; +INSERT INTO `creature` (`guid`,`id`,`map`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`DeathState`,`MovementType`,`spawnFlags`) VALUES +(55105,13716,349,0,0,726.106,77.9764,-86.5913,6.0,60,0,0,6602,0,0,0,1); + +-- set instance script for Maraudon +UPDATE `map_template` SET `ScriptName`='instance_maraudon' WHERE `entry`=349; + +-- Gossip for Celebras the Redeemed +DELETE FROM `gossip_menu` WHERE `entry` BETWEEN 5349 AND 5358; +DELETE FROM `gossip_menu_option` WHERE `menu_id` BETWEEN 5349 AND 5358; +DELETE FROM `conditions` WHERE `condition_entry` BETWEEN 53490 AND 53509; +DELETE FROM `gossip_scripts` WHERE id=53500; + +-- Default +INSERT INTO `gossip_menu` (`entry`, `text_id`, `condition_id`) VALUES (5349, 6354, 0); + +-- 7046 is available +INSERT INTO `conditions` (`condition_entry`, `type`, `value1`, `value2`) VALUES (53490, 19, 7046, 0); +INSERT INTO `gossip_menu` (`entry`, `text_id`, `condition_id`) VALUES (5349, 6375, 53490); + +-- 7046 is completed or rewarded +INSERT INTO `conditions` (`condition_entry`, `type`, `value1`, `value2`) VALUES (53491, 9, 7046, 2); +INSERT INTO `conditions` (`condition_entry`, `type`, `value1`, `value2`) VALUES (53492, 8, 7046, 0); +INSERT INTO `conditions` (`condition_entry`, `type`, `value1`, `value2`) VALUES (53493, -2, 53491, 53492); +INSERT INTO `gossip_menu` (`entry`, `text_id`, `condition_id`) VALUES (5349, 6373, 53493); + +-- Lost scepter +INSERT INTO `conditions` (`condition_entry`, `type`, `value1`, `value2`) VALUES (53500, 24, 17191, 1); +INSERT INTO `conditions` (`condition_entry`, `type`, `value1`, `value2`) VALUES (53501, -1, 53492, 53500); +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_script_id`, `condition_id`) VALUES (5349, 0, 0, 'Celebras, I lost my Scepter...', 1, 1, 5350, 53500, 53501); +INSERT INTO `gossip_menu` (`entry`, `text_id`, `condition_id`) VALUES (5350, 6374, 0); +INSERT INTO `gossip_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `comments`) VALUES (53500, 3, 15, 21939, 0, 'Celebras the Redeemed: Create Scepter of Celebras'); + +-- 7044 is incomplete +INSERT INTO `conditions` (`condition_entry`, `type`, `value1`, `value2`) VALUES (53502, 9, 7044, 1); +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `condition_id`) VALUES (5349, 1, 0, 'How can I find the two parts of your scepter?', 1, 1, 5351, 53502); +INSERT INTO `gossip_menu` (`entry`, `text_id`, `condition_id`) VALUES (5351, 6384, 0); +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`) VALUES (5351, 0, 0, 'Why didn\'t Lord Vyletongue unite both parts of the scepter into one?', 1, 1, 5358); +INSERT INTO `gossip_menu` (`entry`, `text_id`, `condition_id`) VALUES (5358, 6385, 0); + +-- 7046 is rewarded +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `condition_id`) VALUES (5349, 2, 0, 'Please explain how the scepter works.', 1, 1, 5352, 53492); +INSERT INTO `gossip_menu` (`entry`, `text_id`, `condition_id`) VALUES (5352, 6377, 0); +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`) VALUES (5352, 0, 0, 'I don\'t quite understand...', 1, 1, 5353); +INSERT INTO `gossip_menu` (`entry`, `text_id`, `condition_id`) VALUES (5353, 6378, 0); +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`) VALUES (5353, 0, 0, 'No, really, I still don\'t understand...', 1, 1, 5354); +INSERT INTO `gossip_menu` (`entry`, `text_id`, `condition_id`) VALUES (5354, 6379, 0); +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `condition_id`) VALUES (5349, 3, 0, 'Please tell me more about Maraudon.', 1, 1, 5355, 53492); +INSERT INTO `gossip_menu` (`entry`, `text_id`, `condition_id`) VALUES (5355, 6380, 0); +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`) VALUES (5355, 3, 0, 'Please tell me more about Zaetar.', 1, 1, 5356); +INSERT INTO `gossip_menu` (`entry`, `text_id`, `condition_id`) VALUES (5356, 6381, 0); +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`) VALUES (5356, 3, 0, 'Tell me more about the history of Remulos and Zaetar.', 1, 1, 5357); +INSERT INTO `gossip_menu` (`entry`, `text_id`, `condition_id`) VALUES (5357, 6393, 0); + +-- Move waypoint wait times from script to DB for celebras_spirit script +UPDATE `script_waypoint` SET `waittime`=8000 WHERE `entry`=13716 AND `pointid`=1; +UPDATE `script_waypoint` SET `waittime`=4000 WHERE `entry`=13716 AND `pointid`=5; +UPDATE `script_waypoint` SET `waittime`=3000 WHERE `entry`=13716 AND `pointid`=9; + +-- End of migration. +END IF; +END?? +delimiter ; +CALL add_migration(); DROP PROCEDURE IF EXISTS add_migration; diff --git a/sql/migrations/20171121235247_world.sql b/sql/old_migrations/20171121235247_world.sql similarity index 100% rename from sql/migrations/20171121235247_world.sql rename to sql/old_migrations/20171121235247_world.sql diff --git a/sql/migrations/20171122164959_world.sql b/sql/old_migrations/20171122164959_world.sql similarity index 100% rename from sql/migrations/20171122164959_world.sql rename to sql/old_migrations/20171122164959_world.sql diff --git a/sql/migrations/20171123200757_world.sql b/sql/old_migrations/20171123200757_world.sql similarity index 100% rename from sql/migrations/20171123200757_world.sql rename to sql/old_migrations/20171123200757_world.sql diff --git a/sql/migrations/20171123214903_world.sql b/sql/old_migrations/20171123214903_world.sql similarity index 100% rename from sql/migrations/20171123214903_world.sql rename to sql/old_migrations/20171123214903_world.sql diff --git a/sql/migrations/20171124181306_world.sql b/sql/old_migrations/20171124181306_world.sql similarity index 98% rename from sql/migrations/20171124181306_world.sql rename to sql/old_migrations/20171124181306_world.sql index 49dc473cd..73292acf2 100644 --- a/sql/migrations/20171124181306_world.sql +++ b/sql/old_migrations/20171124181306_world.sql @@ -1,87 +1,87 @@ -DROP PROCEDURE IF EXISTS add_migration; -delimiter ?? -CREATE PROCEDURE `add_migration`() -BEGIN -DECLARE v INT DEFAULT 1; -SET v = (SELECT COUNT(*) FROM `migrations` WHERE `id`='20171124181306'); -IF v=0 THEN -INSERT INTO `migrations` VALUES ('20171124181306'); --- Add your query below. - - --- Remove static Vaelan spawn. Scarshield Infiltrator turns into Vaelan. -DELETE FROM `creature` WHERE `guid`=42797; --- Remove npc flags from Vaelan. They are added via his script. -UPDATE `creature_template` SET `npcflag`=0 WHERE `entry`=10296; - --- Move infiltrator from y=-413.32 to y=-399.5 and kneel -UPDATE `creature` SET `position_x`=56.85, `position_y`=-399.5, `position_z`=64.35, `orientation`=3.14, `MovementType`=0 WHERE `guid`=42798; -REPLACE INTO `creature_addon` (`guid`,`patch`,`bytes1`) VALUES (42798, 0, 8); - --- Clean up old stuff -DELETE from `creature_ai_scripts` WHERE `creature_id`=10299; -DELETE FROM `creature_ai_texts` WHERE `entry` IN (-9, -10); -DELETE FROM `event_scripts` WHERE `id`=16037; - --- Trigger event script on LOS -REPLACE INTO `creature_ai_scripts` (`id`,`creature_id`,`event_type`,`event_inverse_phase_mask`,`event_chance`, - `event_param1`,`event_param2`,`action1_type`,`action1_param1`,`action2_type`,`action2_param1`,`action2_param2`,`action3_type`,`action3_param1`,`comment`) VALUES -(1029901, 10299, 10, 0, 100, 1, 15, 50, 16037, 11, 16037, 6, 22, 1, 'Scarshield Infiltrator - Trigger Vaelan event on LOS'), -(1029902, 10299, 1, 1, 100, 2000, 2000, 36, 10296, 0, 0, 0, 0, 0, 'Scarshield Infiltrator - Morph into Vaelan (Phase 1)'); - --- Event script -REPLACE INTO `event_scripts` (`id`,`delay`,`command`,`datalong`,`datalong2`,`dataint`,`comments`) VALUES -(16037, 0, 28, 0, 0, 0, 'Scarshield Infiltrator - Stand'), -(16037, 0, 15, 16037, 0, 0, 'Scarshield Infiltrator - Cast Mind Probe'), -(16037, 2, 35, 0, 0, 0, 'Scarshield Infiltrator - Face player'), -(16037, 4, 0, 0, 0, 5555, 'Scarshield Infiltrator - Say text 1'), -(16037, 4, 1, 1, 0, 0, 'Scarshield Infiltrator - Say emote 1'), -(16037, 10, 0, 0, 0, 5556, 'Scarshield Infiltrator - Say text 2'), -(16037, 10, 1, 1, 0, 0, 'Scarshield Infiltrator - Say emote 2'), -(16037, 10, 29, 1, 1, 0, 'Scarshield Infiltrator - Set gossip flags'); - --- Add gossip menu and script for Vaelan. --- He should only offer quests if the player has a Unadorned Seal of Ascension. --- http://db.vanillagaming.org/?quest=4742 --- http://db.vanillagaming.org/?quest=4743 --- https://web.archive.org/web/20071113030159/http://wow.allakhazam.com:80/db/mob.html?wmob=10296 --- https://www.youtube.com/watch?v=75ZluW4Ae-g -UPDATE `creature_template` SET `gossip_menu_id`=12039 WHERE `entry`=10296; -INSERT INTO `conditions` VALUES (63, 2, 12219, 1); -INSERT INTO `conditions` VALUES (64, -3, 63, 0); -INSERT INTO `gossip_menu` VALUES (12039, 3301, 0); -INSERT INTO `gossip_menu` VALUES (12039, 3311, 63); -INSERT INTO `gossip_menu` VALUES (12040, 3302, 0); -INSERT INTO `gossip_menu` VALUES (12041, 3303, 0); -INSERT INTO `gossip_menu` VALUES (12042, 3304, 0); -INSERT INTO `gossip_menu` VALUES (12043, 3305, 0); -INSERT INTO `gossip_menu` VALUES (12044, 3306, 0); -INSERT INTO `gossip_menu` VALUES (12045, 3307, 0); -INSERT INTO `gossip_menu` VALUES (12046, 3308, 0); -INSERT INTO `gossip_menu` VALUES (12047, 3309, 0); -INSERT INTO `gossip_menu` VALUES (12048, 3310, 0); -INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `action_script_id`, `box_coded`, `box_money`, `box_text`, `condition_id`) VALUES (12039, 0, 0, 'Your kind?', 1, 1, 12040, 0, 0, 0, 0, NULL, 64); -INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `action_script_id`, `box_coded`, `box_money`, `box_text`, `condition_id`) VALUES (12039, 1, 0, 'As you wish, Vaelan.', 1, 1, -1, 0, 10296, 0, 0, '', 63); -INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `action_script_id`, `box_coded`, `box_money`, `box_text`, `condition_id`) VALUES (12040, 0, 0, 'Please.', 1, 1, 12041, 0, 0, 0, 0, NULL, 0); -INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `action_script_id`, `box_coded`, `box_money`, `box_text`, `condition_id`) VALUES (12041, 0, 0, 'No, Vaelan, I do not.', 1, 1, 12042, 0, 0, 0, 0, NULL, 0); -INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `action_script_id`, `box_coded`, `box_money`, `box_text`, `condition_id`) VALUES (12042, 0, 0, 'Demon Soul?', 1, 1, 12043, 0, 0, 0, 0, NULL, 0); -INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `action_script_id`, `box_coded`, `box_money`, `box_text`, `condition_id`) VALUES (12043, 0, 0, 'Where he left off?', 1, 1, 12044, 0, 0, 0, 0, NULL, 0); -INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `action_script_id`, `box_coded`, `box_money`, `box_text`, `condition_id`) VALUES (12044, 0, 0, 'Why not destroy them with the combined might of the Aspects?', 1, 1, 12045, 0, 0, 0, 0, NULL, 0); -INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `action_script_id`, `box_coded`, `box_money`, `box_text`, `condition_id`) VALUES (12045, 0, 0, 'Unless?', 1, 1, 12046, 0, 0, 0, 0, NULL, 0); -INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `action_script_id`, `box_coded`, `box_money`, `box_text`, `condition_id`) VALUES (12046, 0, 0, 'I am willing to try but I will require instruction.', 1, 1, 12047, 0, 0, 0, 0, NULL, 0); -INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `action_script_id`, `box_coded`, `box_money`, `box_text`, `condition_id`) VALUES (12047, 0, 0, 'I will do my best, Vaelan.', 1, 1, 12048, 0, 0, 0, 0, NULL, 0); -INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `action_script_id`, `box_coded`, `box_money`, `box_text`, `condition_id`) VALUES (12048, 0, 0, 'It will be done.', 1, 1, -1, 0, 0, 0, 0, NULL, 0); -INSERT INTO `gossip_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `comments`) VALUES (10296, 0, 29, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Vaelan - Remove Gossip Flag'); -INSERT INTO `gossip_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `comments`) VALUES (10296, 2, 15, 16051, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Vaelan - Cast Barrier of Light'); -INSERT INTO `gossip_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `comments`) VALUES (10296, 2, 0, 0, 0, 0, 0, 0, 5590, 0, 0, 0, 0, 0, 0, 0, 'Vaelan - Say Text 1 (emoted)'); -INSERT INTO `gossip_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `comments`) VALUES (10296, 6, 0, 0, 0, 0, 0, 0, 5591, 0, 0, 0, 0, 0, 0, 0, 'Vaelan - Say Text 2'); -INSERT INTO `gossip_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `comments`) VALUES (10296, 6, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Vaelan - Emote Talk'); -INSERT INTO `gossip_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `comments`) VALUES (10296, 10, 29, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Vaelan - Add Questgiver Flag'); - - --- End of migration. -END IF; -END?? -delimiter ; -CALL add_migration(); -DROP PROCEDURE IF EXISTS add_migration; +DROP PROCEDURE IF EXISTS add_migration; +delimiter ?? +CREATE PROCEDURE `add_migration`() +BEGIN +DECLARE v INT DEFAULT 1; +SET v = (SELECT COUNT(*) FROM `migrations` WHERE `id`='20171124181306'); +IF v=0 THEN +INSERT INTO `migrations` VALUES ('20171124181306'); +-- Add your query below. + + +-- Remove static Vaelan spawn. Scarshield Infiltrator turns into Vaelan. +DELETE FROM `creature` WHERE `guid`=42797; +-- Remove npc flags from Vaelan. They are added via his script. +UPDATE `creature_template` SET `npcflag`=0 WHERE `entry`=10296; + +-- Move infiltrator from y=-413.32 to y=-399.5 and kneel +UPDATE `creature` SET `position_x`=56.85, `position_y`=-399.5, `position_z`=64.35, `orientation`=3.14, `MovementType`=0 WHERE `guid`=42798; +REPLACE INTO `creature_addon` (`guid`,`patch`,`bytes1`) VALUES (42798, 0, 8); + +-- Clean up old stuff +DELETE from `creature_ai_scripts` WHERE `creature_id`=10299; +DELETE FROM `creature_ai_texts` WHERE `entry` IN (-9, -10); +DELETE FROM `event_scripts` WHERE `id`=16037; + +-- Trigger event script on LOS +REPLACE INTO `creature_ai_scripts` (`id`,`creature_id`,`event_type`,`event_inverse_phase_mask`,`event_chance`, + `event_param1`,`event_param2`,`action1_type`,`action1_param1`,`action2_type`,`action2_param1`,`action2_param2`,`action3_type`,`action3_param1`,`comment`) VALUES +(1029901, 10299, 10, 0, 100, 1, 15, 50, 16037, 11, 16037, 6, 22, 1, 'Scarshield Infiltrator - Trigger Vaelan event on LOS'), +(1029902, 10299, 1, 1, 100, 2000, 2000, 36, 10296, 0, 0, 0, 0, 0, 'Scarshield Infiltrator - Morph into Vaelan (Phase 1)'); + +-- Event script +REPLACE INTO `event_scripts` (`id`,`delay`,`command`,`datalong`,`datalong2`,`dataint`,`comments`) VALUES +(16037, 0, 28, 0, 0, 0, 'Scarshield Infiltrator - Stand'), +(16037, 0, 15, 16037, 0, 0, 'Scarshield Infiltrator - Cast Mind Probe'), +(16037, 2, 35, 0, 0, 0, 'Scarshield Infiltrator - Face player'), +(16037, 4, 0, 0, 0, 5555, 'Scarshield Infiltrator - Say text 1'), +(16037, 4, 1, 1, 0, 0, 'Scarshield Infiltrator - Say emote 1'), +(16037, 10, 0, 0, 0, 5556, 'Scarshield Infiltrator - Say text 2'), +(16037, 10, 1, 1, 0, 0, 'Scarshield Infiltrator - Say emote 2'), +(16037, 10, 29, 1, 1, 0, 'Scarshield Infiltrator - Set gossip flags'); + +-- Add gossip menu and script for Vaelan. +-- He should only offer quests if the player has a Unadorned Seal of Ascension. +-- http://db.vanillagaming.org/?quest=4742 +-- http://db.vanillagaming.org/?quest=4743 +-- https://web.archive.org/web/20071113030159/http://wow.allakhazam.com:80/db/mob.html?wmob=10296 +-- https://www.youtube.com/watch?v=75ZluW4Ae-g +UPDATE `creature_template` SET `gossip_menu_id`=12039 WHERE `entry`=10296; +INSERT INTO `conditions` VALUES (63, 2, 12219, 1); +INSERT INTO `conditions` VALUES (64, -3, 63, 0); +INSERT INTO `gossip_menu` VALUES (12039, 3301, 0); +INSERT INTO `gossip_menu` VALUES (12039, 3311, 63); +INSERT INTO `gossip_menu` VALUES (12040, 3302, 0); +INSERT INTO `gossip_menu` VALUES (12041, 3303, 0); +INSERT INTO `gossip_menu` VALUES (12042, 3304, 0); +INSERT INTO `gossip_menu` VALUES (12043, 3305, 0); +INSERT INTO `gossip_menu` VALUES (12044, 3306, 0); +INSERT INTO `gossip_menu` VALUES (12045, 3307, 0); +INSERT INTO `gossip_menu` VALUES (12046, 3308, 0); +INSERT INTO `gossip_menu` VALUES (12047, 3309, 0); +INSERT INTO `gossip_menu` VALUES (12048, 3310, 0); +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `action_script_id`, `box_coded`, `box_money`, `box_text`, `condition_id`) VALUES (12039, 0, 0, 'Your kind?', 1, 1, 12040, 0, 0, 0, 0, NULL, 64); +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `action_script_id`, `box_coded`, `box_money`, `box_text`, `condition_id`) VALUES (12039, 1, 0, 'As you wish, Vaelan.', 1, 1, -1, 0, 10296, 0, 0, '', 63); +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `action_script_id`, `box_coded`, `box_money`, `box_text`, `condition_id`) VALUES (12040, 0, 0, 'Please.', 1, 1, 12041, 0, 0, 0, 0, NULL, 0); +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `action_script_id`, `box_coded`, `box_money`, `box_text`, `condition_id`) VALUES (12041, 0, 0, 'No, Vaelan, I do not.', 1, 1, 12042, 0, 0, 0, 0, NULL, 0); +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `action_script_id`, `box_coded`, `box_money`, `box_text`, `condition_id`) VALUES (12042, 0, 0, 'Demon Soul?', 1, 1, 12043, 0, 0, 0, 0, NULL, 0); +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `action_script_id`, `box_coded`, `box_money`, `box_text`, `condition_id`) VALUES (12043, 0, 0, 'Where he left off?', 1, 1, 12044, 0, 0, 0, 0, NULL, 0); +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `action_script_id`, `box_coded`, `box_money`, `box_text`, `condition_id`) VALUES (12044, 0, 0, 'Why not destroy them with the combined might of the Aspects?', 1, 1, 12045, 0, 0, 0, 0, NULL, 0); +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `action_script_id`, `box_coded`, `box_money`, `box_text`, `condition_id`) VALUES (12045, 0, 0, 'Unless?', 1, 1, 12046, 0, 0, 0, 0, NULL, 0); +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `action_script_id`, `box_coded`, `box_money`, `box_text`, `condition_id`) VALUES (12046, 0, 0, 'I am willing to try but I will require instruction.', 1, 1, 12047, 0, 0, 0, 0, NULL, 0); +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `action_script_id`, `box_coded`, `box_money`, `box_text`, `condition_id`) VALUES (12047, 0, 0, 'I will do my best, Vaelan.', 1, 1, 12048, 0, 0, 0, 0, NULL, 0); +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `action_script_id`, `box_coded`, `box_money`, `box_text`, `condition_id`) VALUES (12048, 0, 0, 'It will be done.', 1, 1, -1, 0, 0, 0, 0, NULL, 0); +INSERT INTO `gossip_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `comments`) VALUES (10296, 0, 29, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Vaelan - Remove Gossip Flag'); +INSERT INTO `gossip_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `comments`) VALUES (10296, 2, 15, 16051, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Vaelan - Cast Barrier of Light'); +INSERT INTO `gossip_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `comments`) VALUES (10296, 2, 0, 0, 0, 0, 0, 0, 5590, 0, 0, 0, 0, 0, 0, 0, 'Vaelan - Say Text 1 (emoted)'); +INSERT INTO `gossip_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `comments`) VALUES (10296, 6, 0, 0, 0, 0, 0, 0, 5591, 0, 0, 0, 0, 0, 0, 0, 'Vaelan - Say Text 2'); +INSERT INTO `gossip_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `comments`) VALUES (10296, 6, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Vaelan - Emote Talk'); +INSERT INTO `gossip_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `datalong3`, `datalong4`, `data_flags`, `dataint`, `dataint2`, `dataint3`, `dataint4`, `x`, `y`, `z`, `o`, `comments`) VALUES (10296, 10, 29, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Vaelan - Add Questgiver Flag'); + + +-- End of migration. +END IF; +END?? +delimiter ; +CALL add_migration(); +DROP PROCEDURE IF EXISTS add_migration; diff --git a/sql/migrations/20171125011235_world.sql b/sql/old_migrations/20171125011235_world.sql similarity index 100% rename from sql/migrations/20171125011235_world.sql rename to sql/old_migrations/20171125011235_world.sql diff --git a/sql/migrations/20171125024209_world.sql b/sql/old_migrations/20171125024209_world.sql similarity index 100% rename from sql/migrations/20171125024209_world.sql rename to sql/old_migrations/20171125024209_world.sql diff --git a/sql/migrations/20171125173205_world.sql b/sql/old_migrations/20171125173205_world.sql similarity index 100% rename from sql/migrations/20171125173205_world.sql rename to sql/old_migrations/20171125173205_world.sql diff --git a/sql/migrations/20171125230506_world.sql b/sql/old_migrations/20171125230506_world.sql similarity index 100% rename from sql/migrations/20171125230506_world.sql rename to sql/old_migrations/20171125230506_world.sql diff --git a/sql/migrations/20171126194222_world.sql b/sql/old_migrations/20171126194222_world.sql similarity index 100% rename from sql/migrations/20171126194222_world.sql rename to sql/old_migrations/20171126194222_world.sql diff --git a/sql/migrations/20171127001449_world.sql b/sql/old_migrations/20171127001449_world.sql similarity index 100% rename from sql/migrations/20171127001449_world.sql rename to sql/old_migrations/20171127001449_world.sql diff --git a/sql/migrations/20171127194205_world.sql b/sql/old_migrations/20171127194205_world.sql similarity index 100% rename from sql/migrations/20171127194205_world.sql rename to sql/old_migrations/20171127194205_world.sql diff --git a/sql/migrations/20171127233015_world.sql b/sql/old_migrations/20171127233015_world.sql similarity index 100% rename from sql/migrations/20171127233015_world.sql rename to sql/old_migrations/20171127233015_world.sql diff --git a/sql/migrations/20171127234131_logon.sql b/sql/old_migrations/20171127234131_logon.sql similarity index 100% rename from sql/migrations/20171127234131_logon.sql rename to sql/old_migrations/20171127234131_logon.sql diff --git a/sql/migrations/20171128192146_world.sql b/sql/old_migrations/20171128192146_world.sql similarity index 100% rename from sql/migrations/20171128192146_world.sql rename to sql/old_migrations/20171128192146_world.sql diff --git a/sql/migrations/20171128233629_world.sql b/sql/old_migrations/20171128233629_world.sql similarity index 100% rename from sql/migrations/20171128233629_world.sql rename to sql/old_migrations/20171128233629_world.sql diff --git a/sql/migrations/20171129015531_world.sql b/sql/old_migrations/20171129015531_world.sql similarity index 100% rename from sql/migrations/20171129015531_world.sql rename to sql/old_migrations/20171129015531_world.sql diff --git a/sql/migrations/20171129173932_world.sql b/sql/old_migrations/20171129173932_world.sql similarity index 100% rename from sql/migrations/20171129173932_world.sql rename to sql/old_migrations/20171129173932_world.sql diff --git a/sql/migrations/20171201042714_world.sql b/sql/old_migrations/20171201042714_world.sql similarity index 100% rename from sql/migrations/20171201042714_world.sql rename to sql/old_migrations/20171201042714_world.sql diff --git a/sql/migrations/20171201203827_world.sql b/sql/old_migrations/20171201203827_world.sql similarity index 100% rename from sql/migrations/20171201203827_world.sql rename to sql/old_migrations/20171201203827_world.sql diff --git a/sql/migrations/20171202085405_world.sql b/sql/old_migrations/20171202085405_world.sql similarity index 100% rename from sql/migrations/20171202085405_world.sql rename to sql/old_migrations/20171202085405_world.sql diff --git a/sql/migrations/20171202134716_world.sql b/sql/old_migrations/20171202134716_world.sql similarity index 100% rename from sql/migrations/20171202134716_world.sql rename to sql/old_migrations/20171202134716_world.sql diff --git a/sql/migrations/20171202225258_world.sql b/sql/old_migrations/20171202225258_world.sql similarity index 100% rename from sql/migrations/20171202225258_world.sql rename to sql/old_migrations/20171202225258_world.sql diff --git a/sql/migrations/20171203224718_world.sql b/sql/old_migrations/20171203224718_world.sql similarity index 100% rename from sql/migrations/20171203224718_world.sql rename to sql/old_migrations/20171203224718_world.sql diff --git a/sql/migrations/20171206145835_world.sql b/sql/old_migrations/20171206145835_world.sql similarity index 100% rename from sql/migrations/20171206145835_world.sql rename to sql/old_migrations/20171206145835_world.sql diff --git a/sql/migrations/20171207103729_world.sql b/sql/old_migrations/20171207103729_world.sql similarity index 100% rename from sql/migrations/20171207103729_world.sql rename to sql/old_migrations/20171207103729_world.sql diff --git a/sql/migrations/20171209080645_world.sql b/sql/old_migrations/20171209080645_world.sql similarity index 100% rename from sql/migrations/20171209080645_world.sql rename to sql/old_migrations/20171209080645_world.sql diff --git a/sql/migrations/20171210115930_world.sql b/sql/old_migrations/20171210115930_world.sql similarity index 100% rename from sql/migrations/20171210115930_world.sql rename to sql/old_migrations/20171210115930_world.sql diff --git a/sql/migrations/20171212192732_world.sql b/sql/old_migrations/20171212192732_world.sql similarity index 100% rename from sql/migrations/20171212192732_world.sql rename to sql/old_migrations/20171212192732_world.sql diff --git a/sql/migrations/20171212194237_world.sql b/sql/old_migrations/20171212194237_world.sql similarity index 100% rename from sql/migrations/20171212194237_world.sql rename to sql/old_migrations/20171212194237_world.sql diff --git a/sql/migrations/20171212201856_world.sql b/sql/old_migrations/20171212201856_world.sql similarity index 100% rename from sql/migrations/20171212201856_world.sql rename to sql/old_migrations/20171212201856_world.sql diff --git a/sql/migrations/20171213185327_world.sql b/sql/old_migrations/20171213185327_world.sql similarity index 100% rename from sql/migrations/20171213185327_world.sql rename to sql/old_migrations/20171213185327_world.sql diff --git a/sql/migrations/20171213193329_world.sql b/sql/old_migrations/20171213193329_world.sql similarity index 100% rename from sql/migrations/20171213193329_world.sql rename to sql/old_migrations/20171213193329_world.sql diff --git a/sql/migrations/20171214204502_world.sql b/sql/old_migrations/20171214204502_world.sql similarity index 100% rename from sql/migrations/20171214204502_world.sql rename to sql/old_migrations/20171214204502_world.sql diff --git a/sql/migrations/20171216013820_world.sql b/sql/old_migrations/20171216013820_world.sql similarity index 100% rename from sql/migrations/20171216013820_world.sql rename to sql/old_migrations/20171216013820_world.sql diff --git a/sql/migrations/20171216152525_world.sql b/sql/old_migrations/20171216152525_world.sql similarity index 100% rename from sql/migrations/20171216152525_world.sql rename to sql/old_migrations/20171216152525_world.sql diff --git a/sql/migrations/20171217024603_world.sql b/sql/old_migrations/20171217024603_world.sql similarity index 100% rename from sql/migrations/20171217024603_world.sql rename to sql/old_migrations/20171217024603_world.sql diff --git a/sql/migrations/20171219071309_characters.sql b/sql/old_migrations/20171219071309_characters.sql similarity index 100% rename from sql/migrations/20171219071309_characters.sql rename to sql/old_migrations/20171219071309_characters.sql diff --git a/sql/migrations/20171221162442_world.sql b/sql/old_migrations/20171221162442_world.sql similarity index 100% rename from sql/migrations/20171221162442_world.sql rename to sql/old_migrations/20171221162442_world.sql diff --git a/sql/migrations/20171222185720_world.sql b/sql/old_migrations/20171222185720_world.sql similarity index 100% rename from sql/migrations/20171222185720_world.sql rename to sql/old_migrations/20171222185720_world.sql diff --git a/sql/migrations/20171228001655_world.sql b/sql/old_migrations/20171228001655_world.sql similarity index 100% rename from sql/migrations/20171228001655_world.sql rename to sql/old_migrations/20171228001655_world.sql diff --git a/sql/migrations/20171228194322_world.sql b/sql/old_migrations/20171228194322_world.sql similarity index 100% rename from sql/migrations/20171228194322_world.sql rename to sql/old_migrations/20171228194322_world.sql diff --git a/sql/migrations/20171229022458_world.sql b/sql/old_migrations/20171229022458_world.sql similarity index 100% rename from sql/migrations/20171229022458_world.sql rename to sql/old_migrations/20171229022458_world.sql diff --git a/sql/migrations/20171229182303_world.sql b/sql/old_migrations/20171229182303_world.sql similarity index 100% rename from sql/migrations/20171229182303_world.sql rename to sql/old_migrations/20171229182303_world.sql diff --git a/sql/migrations/20171229202929_world.sql b/sql/old_migrations/20171229202929_world.sql similarity index 100% rename from sql/migrations/20171229202929_world.sql rename to sql/old_migrations/20171229202929_world.sql diff --git a/sql/migrations/20180102015424_world.sql b/sql/old_migrations/20180102015424_world.sql similarity index 100% rename from sql/migrations/20180102015424_world.sql rename to sql/old_migrations/20180102015424_world.sql diff --git a/sql/migrations/20180102185135_world.sql b/sql/old_migrations/20180102185135_world.sql similarity index 100% rename from sql/migrations/20180102185135_world.sql rename to sql/old_migrations/20180102185135_world.sql diff --git a/sql/migrations/20180102192714_world.sql b/sql/old_migrations/20180102192714_world.sql similarity index 100% rename from sql/migrations/20180102192714_world.sql rename to sql/old_migrations/20180102192714_world.sql diff --git a/sql/migrations/20180102212045_world.sql b/sql/old_migrations/20180102212045_world.sql similarity index 100% rename from sql/migrations/20180102212045_world.sql rename to sql/old_migrations/20180102212045_world.sql diff --git a/sql/migrations/20180105034907_world.sql b/sql/old_migrations/20180105034907_world.sql similarity index 100% rename from sql/migrations/20180105034907_world.sql rename to sql/old_migrations/20180105034907_world.sql diff --git a/sql/migrations/20180106024716_world.sql b/sql/old_migrations/20180106024716_world.sql similarity index 100% rename from sql/migrations/20180106024716_world.sql rename to sql/old_migrations/20180106024716_world.sql diff --git a/sql/migrations/20180107060206_world.sql b/sql/old_migrations/20180107060206_world.sql similarity index 100% rename from sql/migrations/20180107060206_world.sql rename to sql/old_migrations/20180107060206_world.sql diff --git a/sql/migrations/20180107160104_world.sql b/sql/old_migrations/20180107160104_world.sql similarity index 100% rename from sql/migrations/20180107160104_world.sql rename to sql/old_migrations/20180107160104_world.sql diff --git a/sql/migrations/20180107192058_world.sql b/sql/old_migrations/20180107192058_world.sql similarity index 100% rename from sql/migrations/20180107192058_world.sql rename to sql/old_migrations/20180107192058_world.sql diff --git a/sql/migrations/20180107195755_world.sql b/sql/old_migrations/20180107195755_world.sql similarity index 100% rename from sql/migrations/20180107195755_world.sql rename to sql/old_migrations/20180107195755_world.sql diff --git a/sql/migrations/20180107202228_world.sql b/sql/old_migrations/20180107202228_world.sql similarity index 100% rename from sql/migrations/20180107202228_world.sql rename to sql/old_migrations/20180107202228_world.sql diff --git a/sql/migrations/20180115132158_world.sql b/sql/old_migrations/20180115132158_world.sql similarity index 100% rename from sql/migrations/20180115132158_world.sql rename to sql/old_migrations/20180115132158_world.sql diff --git a/sql/world.sql b/sql/world.sql index 37724132b..f0f5d6bcb 100644 --- a/sql/world.sql +++ b/sql/world.sql @@ -1,38 +1,18 @@ -/* -SQLyog Ultimate -MySQL - 5.7.14-log : Database - world -********************************************************************* -*/ +-- -------------------------------------------------------- +-- Хост: 127.0.0.1 +-- Server version: 5.5.53 - MySQL Community Server (GPL) +-- Server OS: Win32 +-- HeidiSQL Версия: 9.3.0.4998 +-- -------------------------------------------------------- -/*!40101 SET NAMES utf8 */; - -/*!40101 SET SQL_MODE=''*/; - -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET NAMES utf8mb4 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -/*Table structure for table `area_template` */ - -DROP TABLE IF EXISTS `area_template`; - -CREATE TABLE `area_template` ( - `Entry` mediumint(8) NOT NULL DEFAULT '0', - `MapId` mediumint(8) NOT NULL DEFAULT '0', - `ZoneId` mediumint(8) NOT NULL DEFAULT '0', - `ExploreFlag` mediumint(8) NOT NULL DEFAULT '0', - `Flags` mediumint(8) NOT NULL DEFAULT '0', - `AreaLevel` mediumint(8) NOT NULL DEFAULT '0', - `Name` varchar(100) NOT NULL DEFAULT '', - `Team` tinyint(3) NOT NULL DEFAULT '0', - `LiquidTypeId` tinyint(3) NOT NULL DEFAULT '0', - PRIMARY KEY (`Entry`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - -/*Table structure for table `areatrigger_bg_entrance` */ +-- Dumping structure for table mangos.areatrigger_bg_entrance DROP TABLE IF EXISTS `areatrigger_bg_entrance`; - -CREATE TABLE `areatrigger_bg_entrance` ( +CREATE TABLE IF NOT EXISTS `areatrigger_bg_entrance` ( `id` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Identifier', `name` text, `team` mediumint(8) unsigned NOT NULL DEFAULT '0', @@ -45,72 +25,100 @@ CREATE TABLE `areatrigger_bg_entrance` ( PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `areatrigger_involvedrelation` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.areatrigger_involvedrelation DROP TABLE IF EXISTS `areatrigger_involvedrelation`; - -CREATE TABLE `areatrigger_involvedrelation` ( +CREATE TABLE IF NOT EXISTS `areatrigger_involvedrelation` ( `id` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Identifier', `quest` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Quest Identifier', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Trigger System'; -/*Table structure for table `areatrigger_tavern` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.areatrigger_tavern DROP TABLE IF EXISTS `areatrigger_tavern`; - -CREATE TABLE `areatrigger_tavern` ( +CREATE TABLE IF NOT EXISTS `areatrigger_tavern` ( `id` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Identifier', `name` text, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Trigger System'; -/*Table structure for table `areatrigger_teleport` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.areatrigger_teleport DROP TABLE IF EXISTS `areatrigger_teleport`; - -CREATE TABLE `areatrigger_teleport` ( +CREATE TABLE IF NOT EXISTS `areatrigger_teleport` ( `id` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Identifier', + `patch` tinyint(3) unsigned NOT NULL DEFAULT '0', `name` text, `required_level` tinyint(3) unsigned NOT NULL DEFAULT '0', `required_item` mediumint(8) unsigned NOT NULL DEFAULT '0', `required_item2` mediumint(8) unsigned NOT NULL DEFAULT '0', `required_quest_done` int(11) unsigned NOT NULL DEFAULT '0', + `required_event` int(11) DEFAULT '0', + `required_pvp_rank` mediumint(8) unsigned DEFAULT '0', + `required_team` mediumint(8) unsigned DEFAULT '0', `required_failed_text` text, `target_map` smallint(5) unsigned NOT NULL DEFAULT '0', `target_position_x` float NOT NULL DEFAULT '0', `target_position_y` float NOT NULL DEFAULT '0', `target_position_z` float NOT NULL DEFAULT '0', `target_orientation` float NOT NULL DEFAULT '0', - PRIMARY KEY (`id`) + PRIMARY KEY (`id`,`patch`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Trigger System'; -/*Table structure for table `auctionhousebot` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.area_template +DROP TABLE IF EXISTS `area_template`; +CREATE TABLE IF NOT EXISTS `area_template` ( + `Entry` mediumint(8) NOT NULL DEFAULT '0', + `MapId` mediumint(8) NOT NULL DEFAULT '0', + `ZoneId` mediumint(8) NOT NULL DEFAULT '0', + `ExploreFlag` mediumint(8) NOT NULL DEFAULT '0', + `Flags` mediumint(8) NOT NULL DEFAULT '0', + `AreaLevel` mediumint(8) NOT NULL DEFAULT '0', + `Name` varchar(100) NOT NULL DEFAULT '', + `Team` tinyint(3) NOT NULL DEFAULT '0', + `LiquidTypeId` tinyint(3) NOT NULL DEFAULT '0', + PRIMARY KEY (`Entry`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- Data exporting was unselected. + + +-- Dumping structure for table mangos.auctionhousebot DROP TABLE IF EXISTS `auctionhousebot`; - -CREATE TABLE `auctionhousebot` ( +CREATE TABLE IF NOT EXISTS `auctionhousebot` ( `item` int(11) DEFAULT NULL COMMENT 'ID de l''item', `stack` int(11) DEFAULT NULL COMMENT 'Empillement', `bid` int(11) DEFAULT NULL COMMENT 'Prix a encherir', `buyout` int(11) DEFAULT NULL COMMENT 'Achat immediat' ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -/*Table structure for table `autobroadcast` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.autobroadcast DROP TABLE IF EXISTS `autobroadcast`; - -CREATE TABLE `autobroadcast` ( +CREATE TABLE IF NOT EXISTS `autobroadcast` ( `delay` int(11) DEFAULT NULL, `commentaire` varchar(255) DEFAULT NULL, `stringId` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -/*Table structure for table `battleground_events` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.battleground_events DROP TABLE IF EXISTS `battleground_events`; - -CREATE TABLE `battleground_events` ( +CREATE TABLE IF NOT EXISTS `battleground_events` ( `map` smallint(5) NOT NULL, `event1` tinyint(3) unsigned NOT NULL, `event2` tinyint(3) unsigned NOT NULL, @@ -118,38 +126,67 @@ CREATE TABLE `battleground_events` ( PRIMARY KEY (`map`,`event1`,`event2`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `battleground_template` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.battleground_template DROP TABLE IF EXISTS `battleground_template`; - -CREATE TABLE `battleground_template` ( +CREATE TABLE IF NOT EXISTS `battleground_template` ( `id` mediumint(8) unsigned NOT NULL, + `patch` tinyint(3) unsigned NOT NULL DEFAULT '0', `MinPlayersPerTeam` smallint(5) unsigned NOT NULL DEFAULT '0', `MaxPlayersPerTeam` smallint(5) unsigned NOT NULL DEFAULT '0', `MinLvl` tinyint(3) unsigned NOT NULL DEFAULT '0', `MaxLvl` tinyint(3) unsigned NOT NULL DEFAULT '0', + `AllianceWinSpell` smallint(5) unsigned NOT NULL DEFAULT '0', + `AllianceLoseSpell` smallint(5) unsigned NOT NULL DEFAULT '0', + `HordeWinSpell` smallint(5) unsigned NOT NULL DEFAULT '0', + `HordeLoseSpell` smallint(5) unsigned NOT NULL DEFAULT '0', `AllianceStartLoc` mediumint(8) unsigned NOT NULL, `AllianceStartO` float NOT NULL, `HordeStartLoc` mediumint(8) unsigned NOT NULL, `HordeStartO` float NOT NULL, - PRIMARY KEY (`id`) + PRIMARY KEY (`id`,`patch`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `battlemaster_entry` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.battlemaster_entry DROP TABLE IF EXISTS `battlemaster_entry`; - -CREATE TABLE `battlemaster_entry` ( +CREATE TABLE IF NOT EXISTS `battlemaster_entry` ( `entry` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Entry of a creature', `bg_template` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Battleground template id', PRIMARY KEY (`entry`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `cinematic_waypoints` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.broadcast_text +DROP TABLE IF EXISTS `broadcast_text`; +CREATE TABLE IF NOT EXISTS `broadcast_text` ( + `ID` mediumint(8) unsigned NOT NULL DEFAULT '0', + `MaleText` longtext, + `FemaleText` longtext, + `Sound` mediumint(8) unsigned NOT NULL DEFAULT '0', + `Type` mediumint(8) unsigned NOT NULL DEFAULT '0', + `Language` mediumint(8) unsigned NOT NULL DEFAULT '0', + `EmoteId0` mediumint(8) unsigned NOT NULL DEFAULT '0', + `EmoteId1` mediumint(8) unsigned NOT NULL DEFAULT '0', + `EmoteId2` mediumint(8) unsigned NOT NULL DEFAULT '0', + `EmoteDelay0` mediumint(8) unsigned NOT NULL DEFAULT '0', + `EmoteDelay1` mediumint(8) unsigned NOT NULL DEFAULT '0', + `EmoteDelay2` mediumint(8) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- Data exporting was unselected. + + +-- Dumping structure for table mangos.cinematic_waypoints DROP TABLE IF EXISTS `cinematic_waypoints`; - -CREATE TABLE `cinematic_waypoints` ( +CREATE TABLE IF NOT EXISTS `cinematic_waypoints` ( `cinematic` int(11) DEFAULT '0', `timer` int(11) DEFAULT '0', `posx` float DEFAULT NULL, @@ -158,11 +195,12 @@ CREATE TABLE `cinematic_waypoints` ( `comment` varchar(255) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -/*Table structure for table `command` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.command DROP TABLE IF EXISTS `command`; - -CREATE TABLE `command` ( +CREATE TABLE IF NOT EXISTS `command` ( `name` varchar(50) NOT NULL DEFAULT '', `security` tinyint(3) unsigned NOT NULL DEFAULT '0', `help` longtext, @@ -170,11 +208,12 @@ CREATE TABLE `command` ( PRIMARY KEY (`name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Chat System'; -/*Table structure for table `conditions` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.conditions DROP TABLE IF EXISTS `conditions`; - -CREATE TABLE `conditions` ( +CREATE TABLE IF NOT EXISTS `conditions` ( `condition_entry` mediumint(8) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Identifier', `type` tinyint(3) NOT NULL DEFAULT '0' COMMENT 'Type of the condition', `value1` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'data field one for the condition', @@ -183,11 +222,12 @@ CREATE TABLE `conditions` ( UNIQUE KEY `unique_conditions` (`type`,`value1`,`value2`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Condition System'; -/*Table structure for table `creature` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.creature DROP TABLE IF EXISTS `creature`; - -CREATE TABLE `creature` ( +CREATE TABLE IF NOT EXISTS `creature` ( `guid` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Global Unique Identifier', `id` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Creature Identifier', `map` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Map Identifier', @@ -197,7 +237,8 @@ CREATE TABLE `creature` ( `position_y` float NOT NULL DEFAULT '0', `position_z` float NOT NULL DEFAULT '0', `orientation` float NOT NULL DEFAULT '0', - `spawntimesecs` int(10) unsigned NOT NULL DEFAULT '120', + `spawntimesecsmin` int(10) unsigned NOT NULL DEFAULT '120', + `spawntimesecsmax` int(10) unsigned NOT NULL DEFAULT '120', `spawndist` float NOT NULL DEFAULT '5', `currentwaypoint` mediumint(8) unsigned NOT NULL DEFAULT '0', `curhealth` int(10) unsigned NOT NULL DEFAULT '1', @@ -205,17 +246,22 @@ CREATE TABLE `creature` ( `DeathState` tinyint(3) unsigned NOT NULL DEFAULT '0', `MovementType` tinyint(3) unsigned NOT NULL DEFAULT '0', `spawnFlags` int(10) unsigned NOT NULL DEFAULT '0', + `visibilitymod` float DEFAULT '0', + `patch_min` tinyint(3) unsigned NOT NULL DEFAULT '0', + `patch_max` tinyint(3) unsigned NOT NULL DEFAULT '10', PRIMARY KEY (`guid`), KEY `idx_map` (`map`), KEY `idx_id` (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Creature System'; -/*Table structure for table `creature_addon` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.creature_addon DROP TABLE IF EXISTS `creature_addon`; - -CREATE TABLE `creature_addon` ( +CREATE TABLE IF NOT EXISTS `creature_addon` ( `guid` int(10) unsigned NOT NULL DEFAULT '0', + `patch` tinyint(3) unsigned NOT NULL DEFAULT '0', `mount` mediumint(8) unsigned NOT NULL DEFAULT '0', `bytes1` int(10) unsigned NOT NULL DEFAULT '0', `b2_0_sheath` tinyint(3) unsigned NOT NULL DEFAULT '0', @@ -223,14 +269,15 @@ CREATE TABLE `creature_addon` ( `emote` int(10) unsigned NOT NULL DEFAULT '0', `moveflags` int(10) unsigned NOT NULL DEFAULT '0', `auras` text, - PRIMARY KEY (`guid`) + PRIMARY KEY (`guid`,`patch`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -/*Table structure for table `creature_ai_scripts` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.creature_ai_scripts DROP TABLE IF EXISTS `creature_ai_scripts`; - -CREATE TABLE `creature_ai_scripts` ( +CREATE TABLE IF NOT EXISTS `creature_ai_scripts` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Identifier', `creature_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Creature Template Identifier', `event_type` tinyint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Event Type', @@ -257,11 +304,12 @@ CREATE TABLE `creature_ai_scripts` ( PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='EventAI Scripts'; -/*Table structure for table `creature_ai_summons` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.creature_ai_summons DROP TABLE IF EXISTS `creature_ai_summons`; - -CREATE TABLE `creature_ai_summons` ( +CREATE TABLE IF NOT EXISTS `creature_ai_summons` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Location Identifier', `position_x` float NOT NULL DEFAULT '0', `position_y` float NOT NULL DEFAULT '0', @@ -272,11 +320,12 @@ CREATE TABLE `creature_ai_summons` ( PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='EventAI Summoning Locations'; -/*Table structure for table `creature_ai_texts` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.creature_ai_texts DROP TABLE IF EXISTS `creature_ai_texts`; - -CREATE TABLE `creature_ai_texts` ( +CREATE TABLE IF NOT EXISTS `creature_ai_texts` ( `entry` mediumint(8) NOT NULL, `content_default` text NOT NULL, `content_loc1` text, @@ -295,35 +344,40 @@ CREATE TABLE `creature_ai_texts` ( PRIMARY KEY (`entry`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Script Texts'; -/*Table structure for table `creature_battleground` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.creature_battleground DROP TABLE IF EXISTS `creature_battleground`; - -CREATE TABLE `creature_battleground` ( +CREATE TABLE IF NOT EXISTS `creature_battleground` ( `guid` int(10) unsigned NOT NULL COMMENT 'Creature''s GUID', `event1` tinyint(3) unsigned NOT NULL COMMENT 'main event', `event2` tinyint(3) unsigned NOT NULL COMMENT 'sub event', PRIMARY KEY (`guid`,`event1`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Creature battleground indexing system'; -/*Table structure for table `creature_equip_template` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.creature_equip_template DROP TABLE IF EXISTS `creature_equip_template`; - -CREATE TABLE `creature_equip_template` ( +CREATE TABLE IF NOT EXISTS `creature_equip_template` ( `entry` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Unique entry', + `patch` tinyint(3) unsigned NOT NULL DEFAULT '0', `equipentry1` mediumint(8) unsigned NOT NULL DEFAULT '0', `equipentry2` mediumint(8) unsigned NOT NULL DEFAULT '0', `equipentry3` mediumint(8) unsigned NOT NULL DEFAULT '0', - PRIMARY KEY (`entry`) + PRIMARY KEY (`entry`,`patch`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Creature System (Equipment)'; -/*Table structure for table `creature_equip_template_raw` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.creature_equip_template_raw DROP TABLE IF EXISTS `creature_equip_template_raw`; - -CREATE TABLE `creature_equip_template_raw` ( +CREATE TABLE IF NOT EXISTS `creature_equip_template_raw` ( `entry` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Unique entry', + `patch` tinyint(3) unsigned NOT NULL DEFAULT '0', `equipmodel1` mediumint(8) unsigned NOT NULL DEFAULT '0', `equipmodel2` mediumint(8) unsigned NOT NULL DEFAULT '0', `equipmodel3` mediumint(8) unsigned NOT NULL DEFAULT '0', @@ -333,14 +387,15 @@ CREATE TABLE `creature_equip_template_raw` ( `equipslot1` int(11) NOT NULL DEFAULT '0', `equipslot2` int(11) NOT NULL DEFAULT '0', `equipslot3` int(11) NOT NULL DEFAULT '0', - PRIMARY KEY (`entry`) + PRIMARY KEY (`entry`,`patch`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Creature System (Equipment)'; -/*Table structure for table `creature_groups` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.creature_groups DROP TABLE IF EXISTS `creature_groups`; - -CREATE TABLE `creature_groups` ( +CREATE TABLE IF NOT EXISTS `creature_groups` ( `leaderGUID` int(11) unsigned NOT NULL, `memberGUID` int(11) unsigned NOT NULL, `dist` float unsigned NOT NULL, @@ -349,66 +404,50 @@ CREATE TABLE `creature_groups` ( PRIMARY KEY (`memberGUID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Table structure for table `creature_linking` --- - -DROP TABLE IF EXISTS `creature_linking`; -CREATE TABLE `creature_linking` ( - `guid` int(10) unsigned NOT NULL COMMENT 'creature.guid of the slave mob that is linked', - `master_guid` int(10) unsigned NOT NULL COMMENT 'master to trigger events', - `flag` mediumint(8) unsigned NOT NULL COMMENT 'flag - describing what should happen when', - PRIMARY KEY (`guid`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Creature Linking System'; - --- --- Dumping data for table `creature_linking` --- - -LOCK TABLES `creature_linking` WRITE; -/*!40000 ALTER TABLE `creature_linking` DISABLE KEYS */; -/*!40000 ALTER TABLE `creature_linking` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `creature_linking_template` --- - -DROP TABLE IF EXISTS `creature_linking_template`; -CREATE TABLE `creature_linking_template` ( - `entry` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'creature_template.entry of the slave mob that is linked', - `map` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Id of map of the mobs', - `master_entry` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'master to trigger events', - `flag` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'flag - describing what should happen when', - `search_range` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'search_range - describing in which range (spawn-coords) master and slave are linked together', - PRIMARY KEY (`entry`,`map`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Creature Linking System'; - --- --- Dumping data for table `creature_linking_template` --- - -LOCK TABLES `creature_linking_template` WRITE; -/*!40000 ALTER TABLE `creature_linking_template` DISABLE KEYS */; -/*!40000 ALTER TABLE `creature_linking_template` ENABLE KEYS */; -UNLOCK TABLES; +-- Data exporting was unselected. -/*Table structure for table `creature_involvedrelation` */ +-- Dumping structure for table mangos.creature_involvedrelation DROP TABLE IF EXISTS `creature_involvedrelation`; - -CREATE TABLE `creature_involvedrelation` ( +CREATE TABLE IF NOT EXISTS `creature_involvedrelation` ( `id` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Identifier', `quest` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Quest Identifier', - PRIMARY KEY (`id`,`quest`) + `patch` tinyint(3) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`id`,`quest`,`patch`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Creature System'; -/*Table structure for table `creature_loot_template` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.creature_linking +DROP TABLE IF EXISTS `creature_linking`; +CREATE TABLE IF NOT EXISTS `creature_linking` ( + `guid` int(10) unsigned NOT NULL COMMENT 'creature.guid of the slave mob that is linked', + `master_guid` int(10) unsigned NOT NULL COMMENT 'master to trigger events', + `flag` mediumint(8) unsigned NOT NULL COMMENT 'flag - describing what should happen when', + PRIMARY KEY (`guid`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Creature Linking System'; + +-- Data exporting was unselected. + + +-- Dumping structure for table mangos.creature_linking_template +DROP TABLE IF EXISTS `creature_linking_template`; +CREATE TABLE IF NOT EXISTS `creature_linking_template` ( + `entry` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'creature_template.entry of the slave mob that is linked', + `map` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Id of map of the mobs', + `master_entry` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'master to trigger events', + `flag` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'flag - describing what should happen when', + `search_range` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'search_range - describing in which range (spawn-coords) master and slave are linked together', + PRIMARY KEY (`entry`,`map`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Creature Linking System'; + +-- Data exporting was unselected. + + +-- Dumping structure for table mangos.creature_loot_template DROP TABLE IF EXISTS `creature_loot_template`; - -CREATE TABLE `creature_loot_template` ( +CREATE TABLE IF NOT EXISTS `creature_loot_template` ( `entry` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'entry 0 used for player insignia loot', `item` mediumint(8) unsigned NOT NULL DEFAULT '0', `ChanceOrQuestChance` float NOT NULL DEFAULT '100', @@ -416,14 +455,15 @@ CREATE TABLE `creature_loot_template` ( `mincountOrRef` mediumint(9) NOT NULL DEFAULT '1', `maxcount` tinyint(3) unsigned NOT NULL DEFAULT '1', `condition_id` mediumint(8) unsigned NOT NULL DEFAULT '0', - PRIMARY KEY (`entry`,`item`) + PRIMARY KEY (`entry`,`item`,`groupid`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Loot System'; -/*Table structure for table `creature_model_info` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.creature_model_info DROP TABLE IF EXISTS `creature_model_info`; - -CREATE TABLE `creature_model_info` ( +CREATE TABLE IF NOT EXISTS `creature_model_info` ( `modelid` mediumint(8) unsigned NOT NULL DEFAULT '0', `bounding_radius` float NOT NULL DEFAULT '0', `combat_reach` float NOT NULL DEFAULT '0', @@ -433,11 +473,12 @@ CREATE TABLE `creature_model_info` ( PRIMARY KEY (`modelid`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Creature System (Model related info)'; -/*Table structure for table `creature_movement` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.creature_movement DROP TABLE IF EXISTS `creature_movement`; - -CREATE TABLE `creature_movement` ( +CREATE TABLE IF NOT EXISTS `creature_movement` ( `id` int(10) unsigned NOT NULL COMMENT 'Creature GUID', `point` mediumint(8) unsigned NOT NULL DEFAULT '0', `position_x` float NOT NULL DEFAULT '0', @@ -459,11 +500,12 @@ CREATE TABLE `creature_movement` ( PRIMARY KEY (`id`,`point`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Creature System'; -/*Table structure for table `creature_movement_scripts` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.creature_movement_scripts DROP TABLE IF EXISTS `creature_movement_scripts`; - -CREATE TABLE `creature_movement_scripts` ( +CREATE TABLE IF NOT EXISTS `creature_movement_scripts` ( `id` mediumint(8) unsigned NOT NULL DEFAULT '0', `delay` int(10) unsigned NOT NULL DEFAULT '0', `command` mediumint(8) unsigned NOT NULL DEFAULT '0', @@ -471,6 +513,9 @@ CREATE TABLE `creature_movement_scripts` ( `datalong2` int(10) unsigned NOT NULL DEFAULT '0', `datalong3` int(10) unsigned NOT NULL DEFAULT '0', `datalong4` int(10) unsigned NOT NULL DEFAULT '0', + `buddy_id` int(10) unsigned NOT NULL DEFAULT '0', + `buddy_radius` int(10) unsigned NOT NULL DEFAULT '0', + `buddy_type` tinyint(3) unsigned NOT NULL DEFAULT '0', `data_flags` tinyint(3) unsigned NOT NULL DEFAULT '0', `dataint` int(11) NOT NULL DEFAULT '0', `dataint2` int(11) NOT NULL DEFAULT '0', @@ -483,11 +528,12 @@ CREATE TABLE `creature_movement_scripts` ( `comments` varchar(255) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `creature_movement_template` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.creature_movement_template DROP TABLE IF EXISTS `creature_movement_template`; - -CREATE TABLE `creature_movement_template` ( +CREATE TABLE IF NOT EXISTS `creature_movement_template` ( `entry` mediumint(8) unsigned NOT NULL COMMENT 'Creature entry', `point` mediumint(8) unsigned NOT NULL DEFAULT '0', `position_x` float NOT NULL DEFAULT '0', @@ -509,11 +555,12 @@ CREATE TABLE `creature_movement_template` ( PRIMARY KEY (`entry`,`point`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Creature waypoint system'; -/*Table structure for table `creature_onkill_reputation` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.creature_onkill_reputation DROP TABLE IF EXISTS `creature_onkill_reputation`; - -CREATE TABLE `creature_onkill_reputation` ( +CREATE TABLE IF NOT EXISTS `creature_onkill_reputation` ( `creature_id` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Creature Identifier', `RewOnKillRepFaction1` smallint(6) NOT NULL DEFAULT '0', `RewOnKillRepFaction2` smallint(6) NOT NULL DEFAULT '0', @@ -527,35 +574,137 @@ CREATE TABLE `creature_onkill_reputation` ( PRIMARY KEY (`creature_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Creature OnKill Reputation gain'; -/*Table structure for table `creature_questrelation` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.creature_questrelation DROP TABLE IF EXISTS `creature_questrelation`; - -CREATE TABLE `creature_questrelation` ( +CREATE TABLE IF NOT EXISTS `creature_questrelation` ( `id` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Identifier', `quest` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Quest Identifier', - PRIMARY KEY (`id`,`quest`) + `patch` tinyint(3) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`id`,`quest`,`patch`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Creature System'; -/*Table structure for table `creature_spells` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.creature_spells DROP TABLE IF EXISTS `creature_spells`; - -CREATE TABLE `creature_spells` ( - `entry` int(11) NOT NULL DEFAULT '0', - `spell` int(11) NOT NULL DEFAULT '0', - `minCD` int(11) NOT NULL DEFAULT '0', - `maxCD` int(11) NOT NULL DEFAULT '0', - `target` int(11) NOT NULL DEFAULT '0', - `comment` varchar(255) NOT NULL DEFAULT '' +CREATE TABLE IF NOT EXISTS `creature_spells` ( + `entry` int(11) unsigned NOT NULL DEFAULT '0', + `name` varchar(255) NOT NULL DEFAULT '', + `spellId_1` smallint(5) unsigned NOT NULL DEFAULT '0', + `probability_1` tinyint(3) unsigned NOT NULL DEFAULT '100', + `castTarget_1` tinyint(2) unsigned NOT NULL DEFAULT '1', + `castFlags_1` tinyint(2) unsigned NOT NULL DEFAULT '0', + `delayInitialMin_1` smallint(5) unsigned NOT NULL DEFAULT '0', + `delayInitialMax_1` smallint(5) unsigned NOT NULL DEFAULT '0', + `delayRepeatMin_1` smallint(5) unsigned NOT NULL DEFAULT '0', + `delayRepeatMax_1` smallint(5) unsigned NOT NULL DEFAULT '0', + `scriptId_1` mediumint(8) unsigned NOT NULL DEFAULT '0', + `spellId_2` smallint(5) unsigned NOT NULL DEFAULT '0', + `probability_2` tinyint(3) unsigned NOT NULL DEFAULT '100', + `castTarget_2` tinyint(2) unsigned NOT NULL DEFAULT '1', + `castFlags_2` tinyint(2) unsigned NOT NULL DEFAULT '0', + `delayInitialMin_2` smallint(5) unsigned NOT NULL DEFAULT '0', + `delayInitialMax_2` smallint(5) unsigned NOT NULL DEFAULT '0', + `delayRepeatMin_2` smallint(5) unsigned NOT NULL DEFAULT '0', + `delayRepeatMax_2` smallint(5) unsigned NOT NULL DEFAULT '0', + `scriptId_2` mediumint(8) unsigned NOT NULL DEFAULT '0', + `spellId_3` smallint(5) unsigned NOT NULL DEFAULT '0', + `probability_3` tinyint(3) unsigned NOT NULL DEFAULT '100', + `castTarget_3` tinyint(2) unsigned NOT NULL DEFAULT '1', + `castFlags_3` tinyint(2) unsigned NOT NULL DEFAULT '0', + `delayInitialMin_3` smallint(5) unsigned NOT NULL DEFAULT '0', + `delayInitialMax_3` smallint(5) unsigned NOT NULL DEFAULT '0', + `delayRepeatMin_3` smallint(5) unsigned NOT NULL DEFAULT '0', + `delayRepeatMax_3` smallint(5) unsigned NOT NULL DEFAULT '0', + `scriptId_3` mediumint(8) unsigned NOT NULL DEFAULT '0', + `spellId_4` smallint(5) unsigned NOT NULL DEFAULT '0', + `probability_4` tinyint(3) unsigned NOT NULL DEFAULT '100', + `castTarget_4` tinyint(2) unsigned NOT NULL DEFAULT '1', + `castFlags_4` tinyint(2) unsigned NOT NULL DEFAULT '0', + `delayInitialMin_4` smallint(5) unsigned NOT NULL DEFAULT '0', + `delayInitialMax_4` smallint(5) unsigned NOT NULL DEFAULT '0', + `delayRepeatMin_4` smallint(5) unsigned NOT NULL DEFAULT '0', + `delayRepeatMax_4` smallint(5) unsigned NOT NULL DEFAULT '0', + `scriptId_4` mediumint(8) unsigned NOT NULL DEFAULT '0', + `spellId_5` smallint(5) unsigned NOT NULL DEFAULT '0', + `probability_5` tinyint(3) unsigned NOT NULL DEFAULT '100', + `castTarget_5` tinyint(2) unsigned NOT NULL DEFAULT '1', + `castFlags_5` tinyint(2) unsigned NOT NULL DEFAULT '0', + `delayInitialMin_5` smallint(5) unsigned NOT NULL DEFAULT '0', + `delayInitialMax_5` smallint(5) unsigned NOT NULL DEFAULT '0', + `delayRepeatMin_5` smallint(5) unsigned NOT NULL DEFAULT '0', + `delayRepeatMax_5` smallint(5) unsigned NOT NULL DEFAULT '0', + `scriptId_5` mediumint(8) unsigned NOT NULL DEFAULT '0', + `spellId_6` smallint(5) unsigned NOT NULL DEFAULT '0', + `probability_6` tinyint(3) unsigned NOT NULL DEFAULT '100', + `castTarget_6` tinyint(2) unsigned NOT NULL DEFAULT '1', + `castFlags_6` tinyint(2) unsigned NOT NULL DEFAULT '0', + `delayInitialMin_6` smallint(5) unsigned NOT NULL DEFAULT '0', + `delayInitialMax_6` smallint(5) unsigned NOT NULL DEFAULT '0', + `delayRepeatMin_6` smallint(5) unsigned NOT NULL DEFAULT '0', + `delayRepeatMax_6` smallint(5) unsigned NOT NULL DEFAULT '0', + `scriptId_6` mediumint(8) unsigned NOT NULL DEFAULT '0', + `spellId_7` smallint(5) unsigned NOT NULL DEFAULT '0', + `probability_7` tinyint(3) unsigned NOT NULL DEFAULT '100', + `castTarget_7` tinyint(2) unsigned NOT NULL DEFAULT '1', + `castFlags_7` tinyint(2) unsigned NOT NULL DEFAULT '0', + `delayInitialMin_7` smallint(5) unsigned NOT NULL DEFAULT '0', + `delayInitialMax_7` smallint(5) unsigned NOT NULL DEFAULT '0', + `delayRepeatMin_7` smallint(5) unsigned NOT NULL DEFAULT '0', + `delayRepeatMax_7` smallint(5) unsigned NOT NULL DEFAULT '0', + `scriptId_7` mediumint(8) unsigned NOT NULL DEFAULT '0', + `spellId_8` smallint(5) unsigned NOT NULL DEFAULT '0', + `probability_8` tinyint(3) unsigned NOT NULL DEFAULT '100', + `castTarget_8` tinyint(2) unsigned NOT NULL DEFAULT '1', + `castFlags_8` tinyint(2) unsigned NOT NULL DEFAULT '0', + `delayInitialMin_8` smallint(5) unsigned NOT NULL DEFAULT '0', + `delayInitialMax_8` smallint(5) unsigned NOT NULL DEFAULT '0', + `delayRepeatMin_8` smallint(5) unsigned NOT NULL DEFAULT '0', + `delayRepeatMax_8` smallint(5) unsigned NOT NULL DEFAULT '0', + `scriptId_8` mediumint(8) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`entry`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -/*Table structure for table `creature_template` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.creature_spells_scripts +DROP TABLE IF EXISTS `creature_spells_scripts`; +CREATE TABLE IF NOT EXISTS `creature_spells_scripts` ( + `id` mediumint(8) unsigned NOT NULL DEFAULT '0', + `delay` int(10) unsigned NOT NULL DEFAULT '0', + `command` mediumint(8) unsigned NOT NULL DEFAULT '0', + `datalong` mediumint(8) unsigned NOT NULL DEFAULT '0', + `datalong2` int(10) unsigned NOT NULL DEFAULT '0', + `datalong3` int(10) unsigned NOT NULL DEFAULT '0', + `datalong4` int(10) unsigned NOT NULL DEFAULT '0', + `buddy_id` int(10) unsigned NOT NULL DEFAULT '0', + `buddy_radius` int(10) unsigned NOT NULL DEFAULT '0', + `buddy_type` tinyint(3) unsigned NOT NULL DEFAULT '0', + `data_flags` tinyint(3) unsigned NOT NULL DEFAULT '0', + `dataint` int(11) NOT NULL DEFAULT '0', + `dataint2` int(11) NOT NULL DEFAULT '0', + `dataint3` int(11) NOT NULL DEFAULT '0', + `dataint4` int(11) NOT NULL DEFAULT '0', + `x` float NOT NULL DEFAULT '0', + `y` float NOT NULL DEFAULT '0', + `z` float NOT NULL DEFAULT '0', + `o` float NOT NULL DEFAULT '0', + `comments` varchar(255) NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- Data exporting was unselected. + + +-- Dumping structure for table mangos.creature_template DROP TABLE IF EXISTS `creature_template`; - -CREATE TABLE `creature_template` ( +CREATE TABLE IF NOT EXISTS `creature_template` ( `entry` mediumint(8) unsigned NOT NULL DEFAULT '0', + `patch` tinyint(3) unsigned NOT NULL DEFAULT '0', `KillCredit1` int(11) unsigned NOT NULL DEFAULT '0', `KillCredit2` int(11) unsigned NOT NULL DEFAULT '0', `modelid_1` mediumint(8) unsigned NOT NULL DEFAULT '0', @@ -612,6 +761,7 @@ CREATE TABLE `creature_template` ( `spell2` mediumint(8) unsigned NOT NULL DEFAULT '0', `spell3` mediumint(8) unsigned NOT NULL DEFAULT '0', `spell4` mediumint(8) unsigned NOT NULL DEFAULT '0', + `spells_template` int(11) unsigned NOT NULL DEFAULT '0', `PetSpellDataId` mediumint(8) unsigned NOT NULL DEFAULT '0', `mingold` mediumint(8) unsigned NOT NULL DEFAULT '0', `maxgold` mediumint(8) unsigned NOT NULL DEFAULT '0', @@ -628,15 +778,17 @@ CREATE TABLE `creature_template` ( `SchoolImmuneMask` int(10) unsigned NOT NULL DEFAULT '0', `flags_extra` int(10) unsigned NOT NULL DEFAULT '0', `ScriptName` char(64) NOT NULL DEFAULT '', - PRIMARY KEY (`entry`) + PRIMARY KEY (`entry`,`patch`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Creature System'; -/*Table structure for table `creature_template_addon` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.creature_template_addon DROP TABLE IF EXISTS `creature_template_addon`; - -CREATE TABLE `creature_template_addon` ( +CREATE TABLE IF NOT EXISTS `creature_template_addon` ( `entry` mediumint(8) unsigned NOT NULL DEFAULT '0', + `patch` tinyint(3) unsigned NOT NULL DEFAULT '0', `mount` mediumint(8) unsigned NOT NULL DEFAULT '0', `bytes1` int(10) unsigned NOT NULL DEFAULT '0', `b2_0_sheath` tinyint(3) unsigned NOT NULL DEFAULT '0', @@ -644,14 +796,15 @@ CREATE TABLE `creature_template_addon` ( `emote` mediumint(8) unsigned NOT NULL DEFAULT '0', `moveflags` int(10) unsigned NOT NULL DEFAULT '0', `auras` text, - PRIMARY KEY (`entry`) + PRIMARY KEY (`entry`,`patch`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `custom_texts` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.custom_texts DROP TABLE IF EXISTS `custom_texts`; - -CREATE TABLE `custom_texts` ( +CREATE TABLE IF NOT EXISTS `custom_texts` ( `entry` mediumint(8) NOT NULL, `content_default` text NOT NULL, `content_loc1` text, @@ -670,29 +823,12 @@ CREATE TABLE `custom_texts` ( PRIMARY KEY (`entry`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Custom Texts'; -/*Table structure for table `db_script_string` */ +-- Data exporting was unselected. -DROP TABLE IF EXISTS `db_script_string`; - -CREATE TABLE `db_script_string` ( - `entry` int(11) unsigned NOT NULL DEFAULT '0', - `content_default` text NOT NULL, - `content_loc1` text, - `content_loc2` text, - `content_loc3` text, - `content_loc4` text, - `content_loc5` text, - `content_loc6` text, - `content_loc7` text, - `content_loc8` text, - PRIMARY KEY (`entry`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - -/*Table structure for table `disenchant_loot_template` */ +-- Dumping structure for table mangos.disenchant_loot_template DROP TABLE IF EXISTS `disenchant_loot_template`; - -CREATE TABLE `disenchant_loot_template` ( +CREATE TABLE IF NOT EXISTS `disenchant_loot_template` ( `entry` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Recommended id selection: item_level*100 + item_quality', `item` mediumint(8) unsigned NOT NULL DEFAULT '0', `ChanceOrQuestChance` float NOT NULL DEFAULT '100', @@ -703,11 +839,12 @@ CREATE TABLE `disenchant_loot_template` ( PRIMARY KEY (`entry`,`item`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Loot System'; -/*Table structure for table `event_scripts` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.event_scripts DROP TABLE IF EXISTS `event_scripts`; - -CREATE TABLE `event_scripts` ( +CREATE TABLE IF NOT EXISTS `event_scripts` ( `id` mediumint(8) unsigned NOT NULL DEFAULT '0', `delay` int(10) unsigned NOT NULL DEFAULT '0', `command` mediumint(8) unsigned NOT NULL DEFAULT '0', @@ -715,6 +852,9 @@ CREATE TABLE `event_scripts` ( `datalong2` int(10) unsigned NOT NULL DEFAULT '0', `datalong3` int(10) unsigned NOT NULL DEFAULT '0', `datalong4` int(10) unsigned NOT NULL DEFAULT '0', + `buddy_id` int(10) unsigned NOT NULL DEFAULT '0', + `buddy_radius` int(10) unsigned NOT NULL DEFAULT '0', + `buddy_type` tinyint(3) unsigned NOT NULL DEFAULT '0', `data_flags` tinyint(3) unsigned NOT NULL DEFAULT '0', `dataint` int(11) NOT NULL DEFAULT '0', `dataint2` int(11) NOT NULL DEFAULT '0', @@ -727,21 +867,23 @@ CREATE TABLE `event_scripts` ( `comments` varchar(255) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `exploration_basexp` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.exploration_basexp DROP TABLE IF EXISTS `exploration_basexp`; - -CREATE TABLE `exploration_basexp` ( +CREATE TABLE IF NOT EXISTS `exploration_basexp` ( `level` tinyint(4) NOT NULL DEFAULT '0', `basexp` mediumint(9) NOT NULL DEFAULT '0', PRIMARY KEY (`level`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Exploration System'; -/*Table structure for table `fishing_loot_template` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.fishing_loot_template DROP TABLE IF EXISTS `fishing_loot_template`; - -CREATE TABLE `fishing_loot_template` ( +CREATE TABLE IF NOT EXISTS `fishing_loot_template` ( `entry` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'entry 0 used for junk loot at fishing fail (if allowed by config option)', `item` mediumint(8) unsigned NOT NULL DEFAULT '0', `ChanceOrQuestChance` float NOT NULL DEFAULT '100', @@ -752,133 +894,24 @@ CREATE TABLE `fishing_loot_template` ( PRIMARY KEY (`entry`,`item`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Loot System'; -/*Table structure for table `game_event` */ +-- Data exporting was unselected. -DROP TABLE IF EXISTS `game_event`; -CREATE TABLE `game_event` ( - `entry` mediumint(8) unsigned NOT NULL COMMENT 'Entry of the game event', - `start_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Absolute start date, the event will never start before', - `end_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Absolute end date, the event will never start afler', - `occurence` bigint(20) unsigned NOT NULL DEFAULT '5184000' COMMENT 'Delay in minutes between occurences of the event', - `length` bigint(20) unsigned NOT NULL DEFAULT '2592000' COMMENT 'Length in minutes of the event', - `holiday` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Client side holiday id', - `description` varchar(255) DEFAULT NULL COMMENT 'Description of the event displayed in console', - `hardcoded` tinyint(3) NOT NULL DEFAULT '0', - `disabled` tinyint(3) NOT NULL DEFAULT '0', - PRIMARY KEY (`entry`) +-- Dumping structure for table mangos.forbidden_items +DROP TABLE IF EXISTS `forbidden_items`; +CREATE TABLE IF NOT EXISTS `forbidden_items` ( + `entry` mediumint(8) unsigned NOT NULL DEFAULT '0', + `patch` tinyint(3) unsigned NOT NULL DEFAULT '0', + `AfterOrBefore` tinyint(3) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`entry`,`AfterOrBefore`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `game_event_creature` */ +-- Data exporting was unselected. -DROP TABLE IF EXISTS `game_event_creature`; - -CREATE TABLE `game_event_creature` ( - `guid` int(10) unsigned NOT NULL, - `event` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Put negatives values to remove during event', - PRIMARY KEY (`guid`,`event`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - -/*Table structure for table `game_event_creature_data` */ - -DROP TABLE IF EXISTS `game_event_creature_data`; - -CREATE TABLE `game_event_creature_data` ( - `guid` int(10) unsigned NOT NULL DEFAULT '0', - `entry_id` mediumint(8) unsigned NOT NULL DEFAULT '0', - `modelid` mediumint(8) unsigned NOT NULL DEFAULT '0', - `equipment_id` mediumint(8) unsigned NOT NULL DEFAULT '0', - `spell_start` mediumint(8) unsigned NOT NULL DEFAULT '0', - `spell_end` mediumint(8) unsigned NOT NULL DEFAULT '0', - `event` smallint(5) unsigned NOT NULL DEFAULT '0', - PRIMARY KEY (`guid`,`event`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - -/*Table structure for table `game_event_gameobject` */ - -DROP TABLE IF EXISTS `game_event_gameobject`; - -CREATE TABLE `game_event_gameobject` ( - `guid` int(10) unsigned NOT NULL, - `event` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Put negatives values to remove during event', - PRIMARY KEY (`guid`,`event`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - -/*Table structure for table `game_event_mail` */ - -DROP TABLE IF EXISTS `game_event_mail`; - -CREATE TABLE `game_event_mail` ( - `event` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Negatives value to send at event stop, positive value for send at event start.', - `raceMask` mediumint(8) unsigned NOT NULL DEFAULT '0', - `quest` mediumint(8) unsigned NOT NULL DEFAULT '0', - `mailTemplateId` mediumint(8) unsigned NOT NULL DEFAULT '0', - `senderEntry` mediumint(8) unsigned NOT NULL DEFAULT '0', - PRIMARY KEY (`event`,`raceMask`,`quest`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Game event system'; - -/*Table structure for table `game_event_quest` */ - -DROP TABLE IF EXISTS `game_event_quest`; - -CREATE TABLE `game_event_quest` ( - `quest` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'entry from quest_template', - `event` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'entry from game_event', - PRIMARY KEY (`quest`,`event`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Game event system'; - -/*Table structure for table `game_graveyard_zone` */ - -DROP TABLE IF EXISTS `game_graveyard_zone`; - -CREATE TABLE `game_graveyard_zone` ( - `id` mediumint(8) unsigned NOT NULL DEFAULT '0', - `ghost_zone` mediumint(8) unsigned NOT NULL DEFAULT '0', - `faction` smallint(5) unsigned NOT NULL DEFAULT '0', - PRIMARY KEY (`id`,`ghost_zone`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Trigger System'; - -/*Table structure for table `game_tele` */ - -DROP TABLE IF EXISTS `game_tele`; - -CREATE TABLE `game_tele` ( - `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, - `position_x` float NOT NULL DEFAULT '0', - `position_y` float NOT NULL DEFAULT '0', - `position_z` float NOT NULL DEFAULT '0', - `orientation` float NOT NULL DEFAULT '0', - `map` smallint(5) unsigned NOT NULL DEFAULT '0', - `name` varchar(100) NOT NULL DEFAULT '', - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Tele Command'; - -/*Table structure for table `game_weather` */ - -DROP TABLE IF EXISTS `game_weather`; - -CREATE TABLE `game_weather` ( - `zone` mediumint(8) unsigned NOT NULL DEFAULT '0', - `spring_rain_chance` tinyint(3) unsigned NOT NULL DEFAULT '25', - `spring_snow_chance` tinyint(3) unsigned NOT NULL DEFAULT '25', - `spring_storm_chance` tinyint(3) unsigned NOT NULL DEFAULT '25', - `summer_rain_chance` tinyint(3) unsigned NOT NULL DEFAULT '25', - `summer_snow_chance` tinyint(3) unsigned NOT NULL DEFAULT '25', - `summer_storm_chance` tinyint(3) unsigned NOT NULL DEFAULT '25', - `fall_rain_chance` tinyint(3) unsigned NOT NULL DEFAULT '25', - `fall_snow_chance` tinyint(3) unsigned NOT NULL DEFAULT '25', - `fall_storm_chance` tinyint(3) unsigned NOT NULL DEFAULT '25', - `winter_rain_chance` tinyint(3) unsigned NOT NULL DEFAULT '25', - `winter_snow_chance` tinyint(3) unsigned NOT NULL DEFAULT '25', - `winter_storm_chance` tinyint(3) unsigned NOT NULL DEFAULT '25', - PRIMARY KEY (`zone`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Weather System'; - -/*Table structure for table `gameobject` */ +-- Dumping structure for table mangos.gameobject DROP TABLE IF EXISTS `gameobject`; - -CREATE TABLE `gameobject` ( +CREATE TABLE IF NOT EXISTS `gameobject` ( `guid` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Global Unique Identifier', `id` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Gameobject Identifier', `map` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Map Identifier', @@ -890,41 +923,49 @@ CREATE TABLE `gameobject` ( `rotation1` float NOT NULL DEFAULT '0', `rotation2` float NOT NULL DEFAULT '0', `rotation3` float NOT NULL DEFAULT '0', - `spawntimesecs` int(11) NOT NULL DEFAULT '0', + `spawntimesecsmin` int(11) NOT NULL DEFAULT '0', + `spawntimesecsmax` int(11) NOT NULL DEFAULT '0', `animprogress` tinyint(3) unsigned NOT NULL DEFAULT '0', `state` tinyint(3) unsigned NOT NULL DEFAULT '0', `spawnFlags` int(10) unsigned NOT NULL DEFAULT '0', + `visibilitymod` float DEFAULT '0', + `patch_min` tinyint(3) unsigned NOT NULL DEFAULT '0', + `patch_max` tinyint(3) unsigned NOT NULL DEFAULT '10', PRIMARY KEY (`guid`), KEY `idx_map` (`map`), KEY `idx_id` (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Gameobject System'; -/*Table structure for table `gameobject_battleground` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.gameobject_battleground DROP TABLE IF EXISTS `gameobject_battleground`; - -CREATE TABLE `gameobject_battleground` ( +CREATE TABLE IF NOT EXISTS `gameobject_battleground` ( `guid` int(10) unsigned NOT NULL COMMENT 'GameObject''s GUID', `event1` tinyint(3) unsigned NOT NULL COMMENT 'main event', `event2` tinyint(3) unsigned NOT NULL COMMENT 'sub event', - PRIMARY KEY (`guid`) + PRIMARY KEY (`guid`,`event1`,`event2`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='GameObject battleground indexing system'; -/*Table structure for table `gameobject_involvedrelation` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.gameobject_involvedrelation DROP TABLE IF EXISTS `gameobject_involvedrelation`; - -CREATE TABLE `gameobject_involvedrelation` ( +CREATE TABLE IF NOT EXISTS `gameobject_involvedrelation` ( `id` mediumint(8) unsigned NOT NULL DEFAULT '0', `quest` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Quest Identifier', - PRIMARY KEY (`id`,`quest`) + `patch` tinyint(3) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`id`,`quest`,`patch`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `gameobject_loot_template` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.gameobject_loot_template DROP TABLE IF EXISTS `gameobject_loot_template`; - -CREATE TABLE `gameobject_loot_template` ( +CREATE TABLE IF NOT EXISTS `gameobject_loot_template` ( `entry` mediumint(8) unsigned NOT NULL DEFAULT '0', `item` mediumint(8) unsigned NOT NULL DEFAULT '0', `ChanceOrQuestChance` float NOT NULL DEFAULT '100', @@ -935,32 +976,36 @@ CREATE TABLE `gameobject_loot_template` ( PRIMARY KEY (`entry`,`item`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Loot System'; -/*Table structure for table `gameobject_questrelation` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.gameobject_questrelation DROP TABLE IF EXISTS `gameobject_questrelation`; - -CREATE TABLE `gameobject_questrelation` ( +CREATE TABLE IF NOT EXISTS `gameobject_questrelation` ( `id` mediumint(8) unsigned NOT NULL DEFAULT '0', `quest` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Quest Identifier', - PRIMARY KEY (`id`,`quest`) + `patch` tinyint(3) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`id`,`quest`,`patch`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `gameobject_requirement` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.gameobject_requirement DROP TABLE IF EXISTS `gameobject_requirement`; - -CREATE TABLE `gameobject_requirement` ( +CREATE TABLE IF NOT EXISTS `gameobject_requirement` ( `guid` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Global Unique Identifier', `reqType` int(3) unsigned NOT NULL DEFAULT '0' COMMENT 'Gameobject Identifier', `reqGuid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Gameobject Identifier', PRIMARY KEY (`guid`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Gameobject System'; -/*Table structure for table `gameobject_scripts` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.gameobject_scripts DROP TABLE IF EXISTS `gameobject_scripts`; - -CREATE TABLE `gameobject_scripts` ( +CREATE TABLE IF NOT EXISTS `gameobject_scripts` ( `id` mediumint(8) unsigned NOT NULL DEFAULT '0', `delay` int(10) unsigned NOT NULL DEFAULT '0', `command` mediumint(8) unsigned NOT NULL DEFAULT '0', @@ -968,6 +1013,9 @@ CREATE TABLE `gameobject_scripts` ( `datalong2` int(10) unsigned NOT NULL DEFAULT '0', `datalong3` int(10) unsigned NOT NULL DEFAULT '0', `datalong4` int(10) unsigned NOT NULL DEFAULT '0', + `buddy_id` int(10) unsigned NOT NULL DEFAULT '0', + `buddy_radius` int(10) unsigned NOT NULL DEFAULT '0', + `buddy_type` tinyint(3) unsigned NOT NULL DEFAULT '0', `data_flags` tinyint(3) unsigned NOT NULL DEFAULT '0', `dataint` int(11) NOT NULL DEFAULT '0', `dataint2` int(11) NOT NULL DEFAULT '0', @@ -980,11 +1028,12 @@ CREATE TABLE `gameobject_scripts` ( `comments` varchar(255) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `gameobject_template` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.gameobject_template DROP TABLE IF EXISTS `gameobject_template`; - -CREATE TABLE `gameobject_template` ( +CREATE TABLE IF NOT EXISTS `gameobject_template` ( `entry` mediumint(8) unsigned NOT NULL DEFAULT '0', `type` tinyint(3) unsigned NOT NULL DEFAULT '0', `displayId` mediumint(8) unsigned NOT NULL DEFAULT '0', @@ -1022,11 +1071,146 @@ CREATE TABLE `gameobject_template` ( PRIMARY KEY (`entry`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Gameobject System'; -/*Table structure for table `gm_subsurveys` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.game_event +DROP TABLE IF EXISTS `game_event`; +CREATE TABLE IF NOT EXISTS `game_event` ( + `entry` mediumint(8) unsigned NOT NULL COMMENT 'Entry of the game event', + `start_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Absolute start date, the event will never start before', + `end_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Absolute end date, the event will never start afler', + `occurence` bigint(20) unsigned NOT NULL DEFAULT '5184000' COMMENT 'Delay in minutes between occurences of the event', + `length` bigint(20) unsigned NOT NULL DEFAULT '2592000' COMMENT 'Length in minutes of the event', + `holiday` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Client side holiday id', + `description` varchar(255) DEFAULT NULL COMMENT 'Description of the event displayed in console', + `hardcoded` tinyint(3) NOT NULL DEFAULT '0', + `disabled` tinyint(3) NOT NULL DEFAULT '0', + `patch_min` tinyint(3) unsigned NOT NULL DEFAULT '0', + `patch_max` tinyint(3) unsigned NOT NULL DEFAULT '10', + PRIMARY KEY (`entry`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- Data exporting was unselected. + + +-- Dumping structure for table mangos.game_event_creature +DROP TABLE IF EXISTS `game_event_creature`; +CREATE TABLE IF NOT EXISTS `game_event_creature` ( + `guid` int(10) unsigned NOT NULL, + `event` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Put negatives values to remove during event', + PRIMARY KEY (`guid`,`event`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- Data exporting was unselected. + + +-- Dumping structure for table mangos.game_event_creature_data +DROP TABLE IF EXISTS `game_event_creature_data`; +CREATE TABLE IF NOT EXISTS `game_event_creature_data` ( + `guid` int(10) unsigned NOT NULL DEFAULT '0', + `entry_id` mediumint(8) unsigned NOT NULL DEFAULT '0', + `modelid` mediumint(8) unsigned NOT NULL DEFAULT '0', + `equipment_id` mediumint(8) unsigned NOT NULL DEFAULT '0', + `spell_start` mediumint(8) unsigned NOT NULL DEFAULT '0', + `spell_end` mediumint(8) unsigned NOT NULL DEFAULT '0', + `event` smallint(5) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`guid`,`event`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- Data exporting was unselected. + + +-- Dumping structure for table mangos.game_event_gameobject +DROP TABLE IF EXISTS `game_event_gameobject`; +CREATE TABLE IF NOT EXISTS `game_event_gameobject` ( + `guid` int(10) unsigned NOT NULL, + `event` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Put negatives values to remove during event', + PRIMARY KEY (`guid`,`event`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- Data exporting was unselected. + + +-- Dumping structure for table mangos.game_event_mail +DROP TABLE IF EXISTS `game_event_mail`; +CREATE TABLE IF NOT EXISTS `game_event_mail` ( + `event` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Negatives value to send at event stop, positive value for send at event start.', + `raceMask` mediumint(8) unsigned NOT NULL DEFAULT '0', + `quest` mediumint(8) unsigned NOT NULL DEFAULT '0', + `mailTemplateId` mediumint(8) unsigned NOT NULL DEFAULT '0', + `senderEntry` mediumint(8) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`event`,`raceMask`,`quest`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Game event system'; + +-- Data exporting was unselected. + + +-- Dumping structure for table mangos.game_event_quest +DROP TABLE IF EXISTS `game_event_quest`; +CREATE TABLE IF NOT EXISTS `game_event_quest` ( + `quest` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'entry from quest_template', + `event` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'entry from game_event', + `patch` tinyint(3) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`quest`,`event`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Game event system'; + +-- Data exporting was unselected. + + +-- Dumping structure for table mangos.game_graveyard_zone +DROP TABLE IF EXISTS `game_graveyard_zone`; +CREATE TABLE IF NOT EXISTS `game_graveyard_zone` ( + `id` mediumint(8) unsigned NOT NULL DEFAULT '0', + `ghost_zone` mediumint(8) unsigned NOT NULL DEFAULT '0', + `faction` smallint(5) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`id`,`ghost_zone`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Trigger System'; + +-- Data exporting was unselected. + + +-- Dumping structure for table mangos.game_tele +DROP TABLE IF EXISTS `game_tele`; +CREATE TABLE IF NOT EXISTS `game_tele` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `position_x` float NOT NULL DEFAULT '0', + `position_y` float NOT NULL DEFAULT '0', + `position_z` float NOT NULL DEFAULT '0', + `orientation` float NOT NULL DEFAULT '0', + `map` smallint(5) unsigned NOT NULL DEFAULT '0', + `name` varchar(100) NOT NULL DEFAULT '', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Tele Command'; + +-- Data exporting was unselected. + + +-- Dumping structure for table mangos.game_weather +DROP TABLE IF EXISTS `game_weather`; +CREATE TABLE IF NOT EXISTS `game_weather` ( + `zone` mediumint(8) unsigned NOT NULL DEFAULT '0', + `spring_rain_chance` tinyint(3) unsigned NOT NULL DEFAULT '25', + `spring_snow_chance` tinyint(3) unsigned NOT NULL DEFAULT '25', + `spring_storm_chance` tinyint(3) unsigned NOT NULL DEFAULT '25', + `summer_rain_chance` tinyint(3) unsigned NOT NULL DEFAULT '25', + `summer_snow_chance` tinyint(3) unsigned NOT NULL DEFAULT '25', + `summer_storm_chance` tinyint(3) unsigned NOT NULL DEFAULT '25', + `fall_rain_chance` tinyint(3) unsigned NOT NULL DEFAULT '25', + `fall_snow_chance` tinyint(3) unsigned NOT NULL DEFAULT '25', + `fall_storm_chance` tinyint(3) unsigned NOT NULL DEFAULT '25', + `winter_rain_chance` tinyint(3) unsigned NOT NULL DEFAULT '25', + `winter_snow_chance` tinyint(3) unsigned NOT NULL DEFAULT '25', + `winter_storm_chance` tinyint(3) unsigned NOT NULL DEFAULT '25', + PRIMARY KEY (`zone`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Weather System'; + +-- Data exporting was unselected. + + +-- Dumping structure for table mangos.gm_subsurveys DROP TABLE IF EXISTS `gm_subsurveys`; - -CREATE TABLE `gm_subsurveys` ( +CREATE TABLE IF NOT EXISTS `gm_subsurveys` ( `surveyId` int(10) unsigned NOT NULL AUTO_INCREMENT, `subsurveyId` int(10) unsigned NOT NULL DEFAULT '0', `rank` int(10) unsigned NOT NULL DEFAULT '0', @@ -1034,11 +1218,12 @@ CREATE TABLE `gm_subsurveys` ( PRIMARY KEY (`surveyId`,`subsurveyId`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Player System'; -/*Table structure for table `gm_surveys` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.gm_surveys DROP TABLE IF EXISTS `gm_surveys`; - -CREATE TABLE `gm_surveys` ( +CREATE TABLE IF NOT EXISTS `gm_surveys` ( `surveyId` int(10) unsigned NOT NULL AUTO_INCREMENT, `guid` int(10) unsigned NOT NULL DEFAULT '0', `mainSurvey` int(10) unsigned NOT NULL DEFAULT '0', @@ -1047,11 +1232,12 @@ CREATE TABLE `gm_surveys` ( PRIMARY KEY (`surveyId`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Player System'; -/*Table structure for table `gm_tickets` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.gm_tickets DROP TABLE IF EXISTS `gm_tickets`; - -CREATE TABLE `gm_tickets` ( +CREATE TABLE IF NOT EXISTS `gm_tickets` ( `ticketId` int(10) unsigned NOT NULL AUTO_INCREMENT, `guid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier of ticket creator', `name` varchar(12) NOT NULL COMMENT 'Name of ticket creator', @@ -1075,26 +1261,29 @@ CREATE TABLE `gm_tickets` ( PRIMARY KEY (`ticketId`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Player System'; -/*Table structure for table `gossip_menu` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.gossip_menu DROP TABLE IF EXISTS `gossip_menu`; - -CREATE TABLE `gossip_menu` ( +CREATE TABLE IF NOT EXISTS `gossip_menu` ( `entry` smallint(6) unsigned NOT NULL DEFAULT '0', `text_id` mediumint(8) unsigned NOT NULL DEFAULT '0', `condition_id` mediumint(8) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`entry`,`text_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `gossip_menu_option` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.gossip_menu_option DROP TABLE IF EXISTS `gossip_menu_option`; - -CREATE TABLE `gossip_menu_option` ( +CREATE TABLE IF NOT EXISTS `gossip_menu_option` ( `menu_id` smallint(6) unsigned NOT NULL DEFAULT '0', `id` smallint(6) unsigned NOT NULL DEFAULT '0', `option_icon` mediumint(8) unsigned NOT NULL DEFAULT '0', `option_text` text CHARACTER SET utf8, + `OptionBroadcastTextID` mediumint(6) unsigned NOT NULL DEFAULT '0', `option_id` tinyint(3) unsigned NOT NULL DEFAULT '0', `npc_option_npcflag` int(10) unsigned NOT NULL DEFAULT '0', `action_menu_id` mediumint(8) NOT NULL DEFAULT '0', @@ -1103,15 +1292,17 @@ CREATE TABLE `gossip_menu_option` ( `box_coded` tinyint(3) unsigned NOT NULL DEFAULT '0', `box_money` int(11) unsigned NOT NULL DEFAULT '0', `box_text` text CHARACTER SET utf8, + `BoxBroadcastTextID` mediumint(6) unsigned NOT NULL DEFAULT '0', `condition_id` mediumint(8) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`menu_id`,`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -/*Table structure for table `gossip_scripts` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.gossip_scripts DROP TABLE IF EXISTS `gossip_scripts`; - -CREATE TABLE `gossip_scripts` ( +CREATE TABLE IF NOT EXISTS `gossip_scripts` ( `id` mediumint(8) unsigned NOT NULL DEFAULT '0', `delay` int(10) unsigned NOT NULL DEFAULT '0', `command` mediumint(8) unsigned NOT NULL DEFAULT '0', @@ -1119,6 +1310,9 @@ CREATE TABLE `gossip_scripts` ( `datalong2` int(10) unsigned NOT NULL DEFAULT '0', `datalong3` int(10) unsigned NOT NULL DEFAULT '0', `datalong4` int(10) unsigned NOT NULL DEFAULT '0', + `buddy_id` int(10) unsigned NOT NULL DEFAULT '0', + `buddy_radius` int(10) unsigned NOT NULL DEFAULT '0', + `buddy_type` tinyint(3) unsigned NOT NULL DEFAULT '0', `data_flags` tinyint(3) unsigned NOT NULL DEFAULT '0', `dataint` int(11) NOT NULL DEFAULT '0', `dataint2` int(11) NOT NULL DEFAULT '0', @@ -1131,11 +1325,12 @@ CREATE TABLE `gossip_scripts` ( `comments` varchar(255) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `gossip_texts` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.gossip_texts DROP TABLE IF EXISTS `gossip_texts`; - -CREATE TABLE `gossip_texts` ( +CREATE TABLE IF NOT EXISTS `gossip_texts` ( `entry` mediumint(8) NOT NULL, `content_default` text NOT NULL, `content_loc1` text, @@ -1150,31 +1345,84 @@ CREATE TABLE `gossip_texts` ( PRIMARY KEY (`entry`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Gossip Texts'; -/*Table structure for table `item_display_info` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.instance_buff_removal +DROP TABLE IF EXISTS `instance_buff_removal`; +CREATE TABLE IF NOT EXISTS `instance_buff_removal` ( + `mapId` int(10) unsigned NOT NULL COMMENT 'MapId to remove aura from', + `auraId` int(10) unsigned NOT NULL COMMENT 'aura id to remove on entering MapId', + `enabled` tinyint(1) NOT NULL COMMENT 'aura removal enabled or not', + `flags` int(10) NOT NULL COMMENT 'flags, see AuraRemovalMgr.h', + `comment` varchar(256) NOT NULL COMMENT 'description, what is removed', + PRIMARY KEY (`mapId`,`auraId`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Aura removal on map entry'; + +-- Data exporting was unselected. + + +-- Dumping structure for table mangos.instance_creature_kills +DROP TABLE IF EXISTS `instance_creature_kills`; +CREATE TABLE IF NOT EXISTS `instance_creature_kills` ( + `mapId` int(10) unsigned NOT NULL COMMENT 'MapId to where creature exist', + `creatureEntry` int(10) unsigned NOT NULL COMMENT 'entry of the creature who performed the kill', + `spellEntry` int(10) NOT NULL COMMENT 'entry of spell which did the kill. 0 for melee or unknown', + `count` int(10) unsigned NOT NULL COMMENT 'number of kills', + PRIMARY KEY (`mapId`,`creatureEntry`,`spellEntry`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='creatures killing players statistics'; + +-- Data exporting was unselected. + + +-- Dumping structure for table mangos.instance_custom_counters +DROP TABLE IF EXISTS `instance_custom_counters`; +CREATE TABLE IF NOT EXISTS `instance_custom_counters` ( + `index` int(10) unsigned NOT NULL COMMENT 'index as defined in InstanceStatistics.h', + `count` int(10) unsigned NOT NULL COMMENT 'counter', + PRIMARY KEY (`index`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='custom counters for instance statistics'; + +-- Data exporting was unselected. + + +-- Dumping structure for table mangos.instance_wipes +DROP TABLE IF EXISTS `instance_wipes`; +CREATE TABLE IF NOT EXISTS `instance_wipes` ( + `mapId` int(10) unsigned NOT NULL COMMENT 'MapId to where creature exist', + `creatureEntry` int(10) unsigned NOT NULL COMMENT 'creature which the wipe occured against', + `count` int(10) unsigned NOT NULL COMMENT 'number of wipes', + PRIMARY KEY (`mapId`,`creatureEntry`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='players wiping against creatures statistics'; + +-- Data exporting was unselected. + + +-- Dumping structure for table mangos.item_display_info DROP TABLE IF EXISTS `item_display_info`; - -CREATE TABLE `item_display_info` ( +CREATE TABLE IF NOT EXISTS `item_display_info` ( `field0` int(11) NOT NULL, `field5` varchar(255) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -/*Table structure for table `item_enchantment_template` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.item_enchantment_template DROP TABLE IF EXISTS `item_enchantment_template`; - -CREATE TABLE `item_enchantment_template` ( +CREATE TABLE IF NOT EXISTS `item_enchantment_template` ( `entry` mediumint(8) unsigned NOT NULL DEFAULT '0', `ench` mediumint(8) unsigned NOT NULL DEFAULT '0', `chance` float unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`entry`,`ench`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Item Random Enchantment System'; -/*Table structure for table `item_loot_template` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.item_loot_template DROP TABLE IF EXISTS `item_loot_template`; - -CREATE TABLE `item_loot_template` ( +CREATE TABLE IF NOT EXISTS `item_loot_template` ( `entry` mediumint(8) unsigned NOT NULL DEFAULT '0', `item` mediumint(8) unsigned NOT NULL DEFAULT '0', `ChanceOrQuestChance` float NOT NULL DEFAULT '100', @@ -1185,23 +1433,26 @@ CREATE TABLE `item_loot_template` ( PRIMARY KEY (`entry`,`item`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Loot System'; -/*Table structure for table `item_required_target` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.item_required_target DROP TABLE IF EXISTS `item_required_target`; - -CREATE TABLE `item_required_target` ( +CREATE TABLE IF NOT EXISTS `item_required_target` ( `entry` mediumint(8) unsigned NOT NULL, `type` tinyint(3) unsigned NOT NULL DEFAULT '0', `targetEntry` mediumint(8) unsigned NOT NULL DEFAULT '0', UNIQUE KEY `entry_type_target` (`entry`,`type`,`targetEntry`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED; -/*Table structure for table `item_template` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.item_template DROP TABLE IF EXISTS `item_template`; - -CREATE TABLE `item_template` ( +CREATE TABLE IF NOT EXISTS `item_template` ( `entry` mediumint(8) unsigned NOT NULL DEFAULT '0', + `patch` tinyint(3) unsigned NOT NULL DEFAULT '0', `class` tinyint(3) unsigned NOT NULL DEFAULT '0', `subclass` tinyint(3) unsigned NOT NULL DEFAULT '0', `name` varchar(255) NOT NULL DEFAULT '', @@ -1330,15 +1581,16 @@ CREATE TABLE `item_template` ( `Duration` int(11) unsigned NOT NULL DEFAULT '0', `ExtraFlags` tinyint(1) unsigned NOT NULL DEFAULT '0', `OtherTeamEntry` int(11) unsigned DEFAULT '1', - PRIMARY KEY (`entry`), + PRIMARY KEY (`entry`,`patch`), KEY `items_index` (`class`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Item System'; -/*Table structure for table `locales_area` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.locales_area DROP TABLE IF EXISTS `locales_area`; - -CREATE TABLE `locales_area` ( +CREATE TABLE IF NOT EXISTS `locales_area` ( `Entry` mediumint(8) NOT NULL DEFAULT '0', `NameLoc1` varchar(100) NOT NULL DEFAULT '', `NameLoc2` varchar(100) NOT NULL DEFAULT '', @@ -1351,11 +1603,39 @@ CREATE TABLE `locales_area` ( PRIMARY KEY (`Entry`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `locales_creature` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.locales_broadcast_text +DROP TABLE IF EXISTS `locales_broadcast_text`; +CREATE TABLE IF NOT EXISTS `locales_broadcast_text` ( + `ID` mediumint(8) unsigned NOT NULL DEFAULT '0', + `MaleText_loc1` longtext, + `MaleText_loc2` longtext, + `MaleText_loc3` longtext, + `MaleText_loc4` longtext, + `MaleText_loc5` longtext, + `MaleText_loc6` longtext, + `MaleText_loc7` longtext, + `MaleText_loc8` longtext, + `FemaleText_loc1` longtext, + `FemaleText_loc2` longtext, + `FemaleText_loc3` longtext, + `FemaleText_loc4` longtext, + `FemaleText_loc5` longtext, + `FemaleText_loc6` longtext, + `FemaleText_loc7` longtext, + `FemaleText_loc8` longtext, + `VerifiedBuild` smallint(5) DEFAULT '0', + PRIMARY KEY (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- Data exporting was unselected. + + +-- Dumping structure for table mangos.locales_creature DROP TABLE IF EXISTS `locales_creature`; - -CREATE TABLE `locales_creature` ( +CREATE TABLE IF NOT EXISTS `locales_creature` ( `entry` mediumint(8) unsigned NOT NULL DEFAULT '0', `name_loc1` varchar(100) NOT NULL DEFAULT '', `name_loc2` varchar(100) NOT NULL DEFAULT '', @@ -1376,11 +1656,12 @@ CREATE TABLE `locales_creature` ( PRIMARY KEY (`entry`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `locales_gameobject` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.locales_gameobject DROP TABLE IF EXISTS `locales_gameobject`; - -CREATE TABLE `locales_gameobject` ( +CREATE TABLE IF NOT EXISTS `locales_gameobject` ( `entry` mediumint(8) unsigned NOT NULL DEFAULT '0', `name_loc1` varchar(100) NOT NULL DEFAULT '', `name_loc2` varchar(100) NOT NULL DEFAULT '', @@ -1393,11 +1674,12 @@ CREATE TABLE `locales_gameobject` ( PRIMARY KEY (`entry`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `locales_gossip_menu_option` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.locales_gossip_menu_option DROP TABLE IF EXISTS `locales_gossip_menu_option`; - -CREATE TABLE `locales_gossip_menu_option` ( +CREATE TABLE IF NOT EXISTS `locales_gossip_menu_option` ( `menu_id` smallint(6) unsigned NOT NULL DEFAULT '0', `id` smallint(6) unsigned NOT NULL DEFAULT '0', `option_text_loc1` text, @@ -1419,11 +1701,12 @@ CREATE TABLE `locales_gossip_menu_option` ( PRIMARY KEY (`menu_id`,`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `locales_item` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.locales_item DROP TABLE IF EXISTS `locales_item`; - -CREATE TABLE `locales_item` ( +CREATE TABLE IF NOT EXISTS `locales_item` ( `entry` mediumint(8) unsigned NOT NULL DEFAULT '0', `name_loc1` varchar(100) NOT NULL DEFAULT '', `name_loc2` varchar(100) NOT NULL DEFAULT '', @@ -1444,148 +1727,12 @@ CREATE TABLE `locales_item` ( PRIMARY KEY (`entry`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `locales_npc_text` */ +-- Data exporting was unselected. -DROP TABLE IF EXISTS `locales_npc_text`; - -CREATE TABLE `locales_npc_text` ( - `entry` mediumint(8) unsigned NOT NULL DEFAULT '0', - `Text0_0_loc1` longtext, - `Text0_0_loc2` longtext, - `Text0_0_loc3` longtext, - `Text0_0_loc4` longtext, - `Text0_0_loc5` longtext, - `Text0_0_loc6` longtext, - `Text0_0_loc7` longtext, - `Text0_0_loc8` longtext, - `Text0_1_loc1` longtext, - `Text0_1_loc2` longtext, - `Text0_1_loc3` longtext, - `Text0_1_loc4` longtext, - `Text0_1_loc5` longtext, - `Text0_1_loc6` longtext, - `Text0_1_loc7` longtext, - `Text0_1_loc8` longtext, - `Text1_0_loc1` longtext, - `Text1_0_loc2` longtext, - `Text1_0_loc3` longtext, - `Text1_0_loc4` longtext, - `Text1_0_loc5` longtext, - `Text1_0_loc6` longtext, - `Text1_0_loc7` longtext, - `Text1_0_loc8` longtext, - `Text1_1_loc1` longtext, - `Text1_1_loc2` longtext, - `Text1_1_loc3` longtext, - `Text1_1_loc4` longtext, - `Text1_1_loc5` longtext, - `Text1_1_loc6` longtext, - `Text1_1_loc7` longtext, - `Text1_1_loc8` longtext, - `Text2_0_loc1` longtext, - `Text2_0_loc2` longtext, - `Text2_0_loc3` longtext, - `Text2_0_loc4` longtext, - `Text2_0_loc5` longtext, - `Text2_0_loc6` longtext, - `Text2_0_loc7` longtext, - `Text2_0_loc8` longtext, - `Text2_1_loc1` longtext, - `Text2_1_loc2` longtext, - `Text2_1_loc3` longtext, - `Text2_1_loc4` longtext, - `Text2_1_loc5` longtext, - `Text2_1_loc6` longtext, - `Text2_1_loc7` longtext, - `Text2_1_loc8` longtext, - `Text3_0_loc1` longtext, - `Text3_0_loc2` longtext, - `Text3_0_loc3` longtext, - `Text3_0_loc4` longtext, - `Text3_0_loc5` longtext, - `Text3_0_loc6` longtext, - `Text3_0_loc7` longtext, - `Text3_0_loc8` longtext, - `Text3_1_loc1` longtext, - `Text3_1_loc2` longtext, - `Text3_1_loc3` longtext, - `Text3_1_loc4` longtext, - `Text3_1_loc5` longtext, - `Text3_1_loc6` longtext, - `Text3_1_loc7` longtext, - `Text3_1_loc8` longtext, - `Text4_0_loc1` longtext, - `Text4_0_loc2` longtext, - `Text4_0_loc3` longtext, - `Text4_0_loc4` longtext, - `Text4_0_loc5` longtext, - `Text4_0_loc6` longtext, - `Text4_0_loc7` longtext, - `Text4_0_loc8` longtext, - `Text4_1_loc1` longtext, - `Text4_1_loc2` longtext, - `Text4_1_loc3` longtext, - `Text4_1_loc4` longtext, - `Text4_1_loc5` longtext, - `Text4_1_loc6` longtext, - `Text4_1_loc7` longtext, - `Text4_1_loc8` longtext, - `Text5_0_loc1` longtext, - `Text5_0_loc2` longtext, - `Text5_0_loc3` longtext, - `Text5_0_loc4` longtext, - `Text5_0_loc5` longtext, - `Text5_0_loc6` longtext, - `Text5_0_loc7` longtext, - `Text5_0_loc8` longtext, - `Text5_1_loc1` longtext, - `Text5_1_loc2` longtext, - `Text5_1_loc3` longtext, - `Text5_1_loc4` longtext, - `Text5_1_loc5` longtext, - `Text5_1_loc6` longtext, - `Text5_1_loc7` longtext, - `Text5_1_loc8` longtext, - `Text6_0_loc1` longtext, - `Text6_0_loc2` longtext, - `Text6_0_loc3` longtext, - `Text6_0_loc4` longtext, - `Text6_0_loc5` longtext, - `Text6_0_loc6` longtext, - `Text6_0_loc7` longtext, - `Text6_0_loc8` longtext, - `Text6_1_loc1` longtext, - `Text6_1_loc2` longtext, - `Text6_1_loc3` longtext, - `Text6_1_loc4` longtext, - `Text6_1_loc5` longtext, - `Text6_1_loc6` longtext, - `Text6_1_loc7` longtext, - `Text6_1_loc8` longtext, - `Text7_0_loc1` longtext, - `Text7_0_loc2` longtext, - `Text7_0_loc3` longtext, - `Text7_0_loc4` longtext, - `Text7_0_loc5` longtext, - `Text7_0_loc6` longtext, - `Text7_0_loc7` longtext, - `Text7_0_loc8` longtext, - `Text7_1_loc1` longtext, - `Text7_1_loc2` longtext, - `Text7_1_loc3` longtext, - `Text7_1_loc4` longtext, - `Text7_1_loc5` longtext, - `Text7_1_loc6` longtext, - `Text7_1_loc7` longtext, - `Text7_1_loc8` longtext, - PRIMARY KEY (`entry`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - -/*Table structure for table `locales_page_text` */ +-- Dumping structure for table mangos.locales_page_text DROP TABLE IF EXISTS `locales_page_text`; - -CREATE TABLE `locales_page_text` ( +CREATE TABLE IF NOT EXISTS `locales_page_text` ( `entry` mediumint(8) unsigned NOT NULL DEFAULT '0', `Text_loc1` longtext, `Text_loc2` longtext, @@ -1598,11 +1745,12 @@ CREATE TABLE `locales_page_text` ( PRIMARY KEY (`entry`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `locales_points_of_interest` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.locales_points_of_interest DROP TABLE IF EXISTS `locales_points_of_interest`; - -CREATE TABLE `locales_points_of_interest` ( +CREATE TABLE IF NOT EXISTS `locales_points_of_interest` ( `entry` mediumint(8) unsigned NOT NULL DEFAULT '0', `icon_name_loc1` text, `icon_name_loc2` text, @@ -1615,11 +1763,12 @@ CREATE TABLE `locales_points_of_interest` ( PRIMARY KEY (`entry`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `locales_quest` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.locales_quest DROP TABLE IF EXISTS `locales_quest`; - -CREATE TABLE `locales_quest` ( +CREATE TABLE IF NOT EXISTS `locales_quest` ( `entry` mediumint(8) unsigned NOT NULL DEFAULT '0', `Title_loc1` text, `Title_loc2` text, @@ -1704,11 +1853,12 @@ CREATE TABLE `locales_quest` ( PRIMARY KEY (`entry`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `mail_loot_template` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.mail_loot_template DROP TABLE IF EXISTS `mail_loot_template`; - -CREATE TABLE `mail_loot_template` ( +CREATE TABLE IF NOT EXISTS `mail_loot_template` ( `entry` mediumint(8) unsigned NOT NULL DEFAULT '0', `item` mediumint(8) unsigned NOT NULL DEFAULT '0', `ChanceOrQuestChance` float NOT NULL DEFAULT '100', @@ -1719,11 +1869,12 @@ CREATE TABLE `mail_loot_template` ( PRIMARY KEY (`entry`,`item`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Loot System'; -/*Table structure for table `mangos_string` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.mangos_string DROP TABLE IF EXISTS `mangos_string`; - -CREATE TABLE `mangos_string` ( +CREATE TABLE IF NOT EXISTS `mangos_string` ( `entry` mediumint(8) unsigned NOT NULL DEFAULT '0', `content_default` text NOT NULL, `content_loc1` text, @@ -1737,22 +1888,25 @@ CREATE TABLE `mangos_string` ( PRIMARY KEY (`entry`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `map_loot_disabled` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.map_loot_disabled DROP TABLE IF EXISTS `map_loot_disabled`; - -CREATE TABLE `map_loot_disabled` ( +CREATE TABLE IF NOT EXISTS `map_loot_disabled` ( `mapid` int(11) NOT NULL DEFAULT '0', `comment` varchar(255) DEFAULT NULL, PRIMARY KEY (`mapid`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -/*Table structure for table `map_template` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.map_template DROP TABLE IF EXISTS `map_template`; - -CREATE TABLE `map_template` ( +CREATE TABLE IF NOT EXISTS `map_template` ( `Entry` smallint(5) unsigned NOT NULL, + `patch` tinyint(3) unsigned NOT NULL DEFAULT '0', `Parent` int(10) unsigned NOT NULL DEFAULT '0', `MapType` tinyint(3) unsigned NOT NULL DEFAULT '0', `LinkedZone` int(10) unsigned NOT NULL DEFAULT '0', @@ -1765,23 +1919,25 @@ CREATE TABLE `map_template` ( `GhostEntranceY` float NOT NULL DEFAULT '0', `MapName` varchar(128) NOT NULL DEFAULT '', `ScriptName` varchar(128) NOT NULL DEFAULT '', - PRIMARY KEY (`Entry`) + PRIMARY KEY (`Entry`,`patch`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `migrations` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.migrations DROP TABLE IF EXISTS `migrations`; - -CREATE TABLE `migrations` ( +CREATE TABLE IF NOT EXISTS `migrations` ( `id` varchar(255) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `nostalrius_string` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.nostalrius_string DROP TABLE IF EXISTS `nostalrius_string`; - -CREATE TABLE `nostalrius_string` ( +CREATE TABLE IF NOT EXISTS `nostalrius_string` ( `entry` mediumint(8) unsigned NOT NULL DEFAULT '0', `content_default` text NOT NULL, `content_loc1` text, @@ -1795,110 +1951,49 @@ CREATE TABLE `nostalrius_string` ( PRIMARY KEY (`entry`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `npc_gossip` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.npc_gossip DROP TABLE IF EXISTS `npc_gossip`; - -CREATE TABLE `npc_gossip` ( +CREATE TABLE IF NOT EXISTS `npc_gossip` ( `npc_guid` int(10) unsigned NOT NULL DEFAULT '0', `textid` mediumint(8) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`npc_guid`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `npc_text` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.npc_text DROP TABLE IF EXISTS `npc_text`; - -CREATE TABLE `npc_text` ( +CREATE TABLE IF NOT EXISTS `npc_text` ( `ID` mediumint(8) unsigned NOT NULL DEFAULT '0', - `text0_0` longtext, - `text0_1` longtext, - `lang0` tinyint(3) unsigned NOT NULL DEFAULT '0', - `prob0` float NOT NULL DEFAULT '0', - `em0_0` smallint(5) unsigned NOT NULL DEFAULT '0', - `em0_1` smallint(5) unsigned NOT NULL DEFAULT '0', - `em0_2` smallint(5) unsigned NOT NULL DEFAULT '0', - `em0_3` smallint(5) unsigned NOT NULL DEFAULT '0', - `em0_4` smallint(5) unsigned NOT NULL DEFAULT '0', - `em0_5` smallint(5) unsigned NOT NULL DEFAULT '0', - `text1_0` longtext, - `text1_1` longtext, - `lang1` tinyint(3) unsigned NOT NULL DEFAULT '0', - `prob1` float NOT NULL DEFAULT '0', - `em1_0` smallint(5) unsigned NOT NULL DEFAULT '0', - `em1_1` smallint(5) unsigned NOT NULL DEFAULT '0', - `em1_2` smallint(5) unsigned NOT NULL DEFAULT '0', - `em1_3` smallint(5) unsigned NOT NULL DEFAULT '0', - `em1_4` smallint(5) unsigned NOT NULL DEFAULT '0', - `em1_5` smallint(5) unsigned NOT NULL DEFAULT '0', - `text2_0` longtext, - `text2_1` longtext, - `lang2` tinyint(3) unsigned NOT NULL DEFAULT '0', - `prob2` float NOT NULL DEFAULT '0', - `em2_0` smallint(5) unsigned NOT NULL DEFAULT '0', - `em2_1` smallint(5) unsigned NOT NULL DEFAULT '0', - `em2_2` smallint(5) unsigned NOT NULL DEFAULT '0', - `em2_3` smallint(5) unsigned NOT NULL DEFAULT '0', - `em2_4` smallint(5) unsigned NOT NULL DEFAULT '0', - `em2_5` smallint(5) unsigned NOT NULL DEFAULT '0', - `text3_0` longtext, - `text3_1` longtext, - `lang3` tinyint(3) unsigned NOT NULL DEFAULT '0', - `prob3` float NOT NULL DEFAULT '0', - `em3_0` smallint(5) unsigned NOT NULL DEFAULT '0', - `em3_1` smallint(5) unsigned NOT NULL DEFAULT '0', - `em3_2` smallint(5) unsigned NOT NULL DEFAULT '0', - `em3_3` smallint(5) unsigned NOT NULL DEFAULT '0', - `em3_4` smallint(5) unsigned NOT NULL DEFAULT '0', - `em3_5` smallint(5) unsigned NOT NULL DEFAULT '0', - `text4_0` longtext, - `text4_1` longtext, - `lang4` tinyint(3) unsigned NOT NULL DEFAULT '0', - `prob4` float NOT NULL DEFAULT '0', - `em4_0` smallint(5) unsigned NOT NULL DEFAULT '0', - `em4_1` smallint(5) unsigned NOT NULL DEFAULT '0', - `em4_2` smallint(5) unsigned NOT NULL DEFAULT '0', - `em4_3` smallint(5) unsigned NOT NULL DEFAULT '0', - `em4_4` smallint(5) unsigned NOT NULL DEFAULT '0', - `em4_5` smallint(5) unsigned NOT NULL DEFAULT '0', - `text5_0` longtext, - `text5_1` longtext, - `lang5` tinyint(3) unsigned NOT NULL DEFAULT '0', - `prob5` float NOT NULL DEFAULT '0', - `em5_0` smallint(5) unsigned NOT NULL DEFAULT '0', - `em5_1` smallint(5) unsigned NOT NULL DEFAULT '0', - `em5_2` smallint(5) unsigned NOT NULL DEFAULT '0', - `em5_3` smallint(5) unsigned NOT NULL DEFAULT '0', - `em5_4` smallint(5) unsigned NOT NULL DEFAULT '0', - `em5_5` smallint(5) unsigned NOT NULL DEFAULT '0', - `text6_0` longtext, - `text6_1` longtext, - `lang6` tinyint(3) unsigned NOT NULL DEFAULT '0', - `prob6` float NOT NULL DEFAULT '0', - `em6_0` smallint(5) unsigned NOT NULL DEFAULT '0', - `em6_1` smallint(5) unsigned NOT NULL DEFAULT '0', - `em6_2` smallint(5) unsigned NOT NULL DEFAULT '0', - `em6_3` smallint(5) unsigned NOT NULL DEFAULT '0', - `em6_4` smallint(5) unsigned NOT NULL DEFAULT '0', - `em6_5` smallint(5) unsigned NOT NULL DEFAULT '0', - `text7_0` longtext, - `text7_1` longtext, - `lang7` tinyint(3) unsigned NOT NULL DEFAULT '0', - `prob7` float NOT NULL DEFAULT '0', - `em7_0` smallint(5) unsigned NOT NULL DEFAULT '0', - `em7_1` smallint(5) unsigned NOT NULL DEFAULT '0', - `em7_2` smallint(5) unsigned NOT NULL DEFAULT '0', - `em7_3` smallint(5) unsigned NOT NULL DEFAULT '0', - `em7_4` smallint(5) unsigned NOT NULL DEFAULT '0', - `em7_5` smallint(5) unsigned NOT NULL DEFAULT '0', + `BroadcastTextID0` mediumint(6) unsigned NOT NULL DEFAULT '0', + `Probability0` float NOT NULL DEFAULT '0', + `BroadcastTextID1` mediumint(6) unsigned NOT NULL DEFAULT '0', + `Probability1` float NOT NULL DEFAULT '0', + `BroadcastTextID2` mediumint(6) unsigned NOT NULL DEFAULT '0', + `Probability2` float NOT NULL DEFAULT '0', + `BroadcastTextID3` mediumint(6) unsigned NOT NULL DEFAULT '0', + `Probability3` float NOT NULL DEFAULT '0', + `BroadcastTextID4` mediumint(6) unsigned NOT NULL DEFAULT '0', + `Probability4` float NOT NULL DEFAULT '0', + `BroadcastTextID5` mediumint(6) unsigned NOT NULL DEFAULT '0', + `Probability5` float NOT NULL DEFAULT '0', + `BroadcastTextID6` mediumint(6) unsigned NOT NULL DEFAULT '0', + `Probability6` float NOT NULL DEFAULT '0', + `BroadcastTextID7` mediumint(6) unsigned NOT NULL DEFAULT '0', + `Probability7` float NOT NULL DEFAULT '0', PRIMARY KEY (`ID`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `npc_trainer` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.npc_trainer DROP TABLE IF EXISTS `npc_trainer`; - -CREATE TABLE `npc_trainer` ( +CREATE TABLE IF NOT EXISTS `npc_trainer` ( `entry` mediumint(8) unsigned NOT NULL DEFAULT '0', `spell` mediumint(8) unsigned NOT NULL DEFAULT '0', `spellcost` int(10) unsigned NOT NULL DEFAULT '0', @@ -1908,11 +2003,12 @@ CREATE TABLE `npc_trainer` ( UNIQUE KEY `entry_spell` (`entry`,`spell`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `npc_trainer_template` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.npc_trainer_template DROP TABLE IF EXISTS `npc_trainer_template`; - -CREATE TABLE `npc_trainer_template` ( +CREATE TABLE IF NOT EXISTS `npc_trainer_template` ( `entry` mediumint(8) unsigned NOT NULL DEFAULT '0', `spell` mediumint(8) unsigned NOT NULL DEFAULT '0', `spellcost` int(10) unsigned NOT NULL DEFAULT '0', @@ -1922,11 +2018,12 @@ CREATE TABLE `npc_trainer_template` ( UNIQUE KEY `entry_spell` (`entry`,`spell`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `npc_vendor` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.npc_vendor DROP TABLE IF EXISTS `npc_vendor`; - -CREATE TABLE `npc_vendor` ( +CREATE TABLE IF NOT EXISTS `npc_vendor` ( `entry` mediumint(8) unsigned NOT NULL DEFAULT '0', `item` mediumint(8) unsigned NOT NULL DEFAULT '0', `maxcount` tinyint(3) unsigned NOT NULL DEFAULT '0', @@ -1934,11 +2031,12 @@ CREATE TABLE `npc_vendor` ( PRIMARY KEY (`entry`,`item`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Npc System'; -/*Table structure for table `npc_vendor_template` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.npc_vendor_template DROP TABLE IF EXISTS `npc_vendor_template`; - -CREATE TABLE `npc_vendor_template` ( +CREATE TABLE IF NOT EXISTS `npc_vendor_template` ( `entry` mediumint(8) unsigned NOT NULL DEFAULT '0', `item` mediumint(8) unsigned NOT NULL DEFAULT '0', `maxcount` tinyint(3) unsigned NOT NULL DEFAULT '0', @@ -1946,22 +2044,38 @@ CREATE TABLE `npc_vendor_template` ( PRIMARY KEY (`entry`,`item`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Npc System'; -/*Table structure for table `page_text` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.page_text DROP TABLE IF EXISTS `page_text`; - -CREATE TABLE `page_text` ( +CREATE TABLE IF NOT EXISTS `page_text` ( `entry` mediumint(8) unsigned NOT NULL DEFAULT '0', `text` longtext NOT NULL, `next_page` mediumint(8) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`entry`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Item System'; -/*Table structure for table `pet_levelstats` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.petcreateinfo_spell +DROP TABLE IF EXISTS `petcreateinfo_spell`; +CREATE TABLE IF NOT EXISTS `petcreateinfo_spell` ( + `entry` mediumint(8) unsigned NOT NULL DEFAULT '0', + `Spell1` mediumint(8) unsigned NOT NULL DEFAULT '0', + `Spell2` mediumint(8) unsigned NOT NULL DEFAULT '0', + `Spell3` mediumint(8) unsigned NOT NULL DEFAULT '0', + `Spell4` mediumint(8) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`entry`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Pet Create Spells'; + +-- Data exporting was unselected. + + +-- Dumping structure for table mangos.pet_levelstats DROP TABLE IF EXISTS `pet_levelstats`; - -CREATE TABLE `pet_levelstats` ( +CREATE TABLE IF NOT EXISTS `pet_levelstats` ( `creature_entry` mediumint(8) unsigned NOT NULL, `level` tinyint(3) unsigned NOT NULL, `hp` smallint(5) unsigned NOT NULL, @@ -1975,11 +2089,12 @@ CREATE TABLE `pet_levelstats` ( PRIMARY KEY (`creature_entry`,`level`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 PACK_KEYS=0 COMMENT='Stores pet levels stats.'; -/*Table structure for table `pet_name_generation` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.pet_name_generation DROP TABLE IF EXISTS `pet_name_generation`; - -CREATE TABLE `pet_name_generation` ( +CREATE TABLE IF NOT EXISTS `pet_name_generation` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, `word` tinytext NOT NULL, `entry` mediumint(8) unsigned NOT NULL DEFAULT '0', @@ -1987,24 +2102,12 @@ CREATE TABLE `pet_name_generation` ( PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `petcreateinfo_spell` */ +-- Data exporting was unselected. -DROP TABLE IF EXISTS `petcreateinfo_spell`; - -CREATE TABLE `petcreateinfo_spell` ( - `entry` mediumint(8) unsigned NOT NULL DEFAULT '0', - `Spell1` mediumint(8) unsigned NOT NULL DEFAULT '0', - `Spell2` mediumint(8) unsigned NOT NULL DEFAULT '0', - `Spell3` mediumint(8) unsigned NOT NULL DEFAULT '0', - `Spell4` mediumint(8) unsigned NOT NULL DEFAULT '0', - PRIMARY KEY (`entry`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Pet Create Spells'; - -/*Table structure for table `pickpocketing_loot_template` */ +-- Dumping structure for table mangos.pickpocketing_loot_template DROP TABLE IF EXISTS `pickpocketing_loot_template`; - -CREATE TABLE `pickpocketing_loot_template` ( +CREATE TABLE IF NOT EXISTS `pickpocketing_loot_template` ( `entry` mediumint(8) unsigned NOT NULL DEFAULT '0', `item` mediumint(8) unsigned NOT NULL DEFAULT '0', `ChanceOrQuestChance` float NOT NULL DEFAULT '100', @@ -2015,115 +2118,24 @@ CREATE TABLE `pickpocketing_loot_template` ( PRIMARY KEY (`entry`,`item`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Loot System'; -/*Table structure for table `player_classlevelstats` */ +-- Data exporting was unselected. -DROP TABLE IF EXISTS `player_classlevelstats`; - -CREATE TABLE `player_classlevelstats` ( - `class` tinyint(3) unsigned NOT NULL, - `level` tinyint(3) unsigned NOT NULL, - `basehp` smallint(5) unsigned NOT NULL, - `basemana` smallint(5) unsigned NOT NULL, - PRIMARY KEY (`class`,`level`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 PACK_KEYS=0 COMMENT='Stores levels stats.'; - -/*Table structure for table `player_factionchange_items` */ - -DROP TABLE IF EXISTS `player_factionchange_items`; - -CREATE TABLE `player_factionchange_items` ( - `alliance_id` int(8) NOT NULL, - `horde_id` int(8) NOT NULL, - `comment` varchar(255) NOT NULL DEFAULT '', - PRIMARY KEY (`alliance_id`,`horde_id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - -/*Table structure for table `player_factionchange_mounts` */ - -DROP TABLE IF EXISTS `player_factionchange_mounts`; - -CREATE TABLE `player_factionchange_mounts` ( - `RaceId` int(8) NOT NULL, - `MountNum` int(8) NOT NULL, - `ItemEntry` int(8) NOT NULL, - `Comment` varchar(255) NOT NULL DEFAULT '', - PRIMARY KEY (`RaceId`,`MountNum`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - -/*Table structure for table `player_factionchange_quests` */ - -DROP TABLE IF EXISTS `player_factionchange_quests`; - -CREATE TABLE `player_factionchange_quests` ( - `alliance_id` int(8) NOT NULL, - `horde_id` int(8) NOT NULL, - `comment` varchar(255) NOT NULL DEFAULT '', - PRIMARY KEY (`alliance_id`,`horde_id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - -/*Table structure for table `player_factionchange_reputations` */ - -DROP TABLE IF EXISTS `player_factionchange_reputations`; - -CREATE TABLE `player_factionchange_reputations` ( - `alliance_id` int(8) NOT NULL, - `horde_id` int(8) NOT NULL, - PRIMARY KEY (`alliance_id`,`horde_id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - -/*Table structure for table `player_factionchange_spells` */ - -DROP TABLE IF EXISTS `player_factionchange_spells`; - -CREATE TABLE `player_factionchange_spells` ( - `alliance_id` int(8) NOT NULL, - `horde_id` int(8) NOT NULL, - `comment` varchar(255) NOT NULL DEFAULT '', - PRIMARY KEY (`alliance_id`,`horde_id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - -/*Table structure for table `player_levelstats` */ - -DROP TABLE IF EXISTS `player_levelstats`; - -CREATE TABLE `player_levelstats` ( - `race` tinyint(3) unsigned NOT NULL, - `class` tinyint(3) unsigned NOT NULL, - `level` tinyint(3) unsigned NOT NULL, - `str` tinyint(3) unsigned NOT NULL, - `agi` tinyint(3) unsigned NOT NULL, - `sta` tinyint(3) unsigned NOT NULL, - `inte` tinyint(3) unsigned NOT NULL, - `spi` tinyint(3) unsigned NOT NULL, - PRIMARY KEY (`race`,`class`,`level`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 PACK_KEYS=0 COMMENT='Stores levels stats.'; - -/*Table structure for table `player_xp_for_level` */ - -DROP TABLE IF EXISTS `player_xp_for_level`; - -CREATE TABLE `player_xp_for_level` ( - `lvl` int(3) unsigned NOT NULL, - `xp_for_next_level` int(10) unsigned NOT NULL, - PRIMARY KEY (`lvl`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - -/*Table structure for table `playerbot` */ +-- Dumping structure for table mangos.playerbot DROP TABLE IF EXISTS `playerbot`; - -CREATE TABLE `playerbot` ( +CREATE TABLE IF NOT EXISTS `playerbot` ( `char_guid` bigint(20) unsigned NOT NULL, `chance` int(10) unsigned NOT NULL DEFAULT '10', `comment` varchar(255) DEFAULT NULL, PRIMARY KEY (`char_guid`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -/*Table structure for table `playercreateinfo` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.playercreateinfo DROP TABLE IF EXISTS `playercreateinfo`; - -CREATE TABLE `playercreateinfo` ( +CREATE TABLE IF NOT EXISTS `playercreateinfo` ( `race` tinyint(3) unsigned NOT NULL DEFAULT '0', `class` tinyint(3) unsigned NOT NULL DEFAULT '0', `map` smallint(5) unsigned NOT NULL DEFAULT '0', @@ -2135,11 +2147,12 @@ CREATE TABLE `playercreateinfo` ( PRIMARY KEY (`race`,`class`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `playercreateinfo_action` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.playercreateinfo_action DROP TABLE IF EXISTS `playercreateinfo_action`; - -CREATE TABLE `playercreateinfo_action` ( +CREATE TABLE IF NOT EXISTS `playercreateinfo_action` ( `race` tinyint(3) unsigned NOT NULL DEFAULT '0', `class` tinyint(3) unsigned NOT NULL DEFAULT '0', `button` smallint(5) unsigned NOT NULL DEFAULT '0', @@ -2149,11 +2162,12 @@ CREATE TABLE `playercreateinfo_action` ( KEY `playercreateinfo_race_class_index` (`race`,`class`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `playercreateinfo_item` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.playercreateinfo_item DROP TABLE IF EXISTS `playercreateinfo_item`; - -CREATE TABLE `playercreateinfo_item` ( +CREATE TABLE IF NOT EXISTS `playercreateinfo_item` ( `race` tinyint(3) unsigned NOT NULL DEFAULT '0', `class` tinyint(3) unsigned NOT NULL DEFAULT '0', `itemid` mediumint(8) unsigned NOT NULL DEFAULT '0', @@ -2161,11 +2175,12 @@ CREATE TABLE `playercreateinfo_item` ( KEY `playercreateinfo_race_class_index` (`race`,`class`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `playercreateinfo_spell` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.playercreateinfo_spell DROP TABLE IF EXISTS `playercreateinfo_spell`; - -CREATE TABLE `playercreateinfo_spell` ( +CREATE TABLE IF NOT EXISTS `playercreateinfo_spell` ( `race` tinyint(3) unsigned NOT NULL DEFAULT '0', `class` tinyint(3) unsigned NOT NULL DEFAULT '0', `Spell` mediumint(8) unsigned NOT NULL DEFAULT '0', @@ -2173,11 +2188,113 @@ CREATE TABLE `playercreateinfo_spell` ( PRIMARY KEY (`race`,`class`,`Spell`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `points_of_interest` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.player_classlevelstats +DROP TABLE IF EXISTS `player_classlevelstats`; +CREATE TABLE IF NOT EXISTS `player_classlevelstats` ( + `class` tinyint(3) unsigned NOT NULL, + `level` tinyint(3) unsigned NOT NULL, + `basehp` smallint(5) unsigned NOT NULL, + `basemana` smallint(5) unsigned NOT NULL, + PRIMARY KEY (`class`,`level`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 PACK_KEYS=0 COMMENT='Stores levels stats.'; + +-- Data exporting was unselected. + + +-- Dumping structure for table mangos.player_factionchange_items +DROP TABLE IF EXISTS `player_factionchange_items`; +CREATE TABLE IF NOT EXISTS `player_factionchange_items` ( + `alliance_id` int(8) NOT NULL, + `horde_id` int(8) NOT NULL, + `comment` varchar(255) NOT NULL DEFAULT '', + PRIMARY KEY (`alliance_id`,`horde_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- Data exporting was unselected. + + +-- Dumping structure for table mangos.player_factionchange_mounts +DROP TABLE IF EXISTS `player_factionchange_mounts`; +CREATE TABLE IF NOT EXISTS `player_factionchange_mounts` ( + `RaceId` int(8) NOT NULL, + `MountNum` int(8) NOT NULL, + `ItemEntry` int(8) NOT NULL, + `Comment` varchar(255) NOT NULL DEFAULT '', + PRIMARY KEY (`RaceId`,`MountNum`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- Data exporting was unselected. + + +-- Dumping structure for table mangos.player_factionchange_quests +DROP TABLE IF EXISTS `player_factionchange_quests`; +CREATE TABLE IF NOT EXISTS `player_factionchange_quests` ( + `alliance_id` int(8) NOT NULL, + `horde_id` int(8) NOT NULL, + `comment` varchar(255) NOT NULL DEFAULT '', + PRIMARY KEY (`alliance_id`,`horde_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- Data exporting was unselected. + + +-- Dumping structure for table mangos.player_factionchange_reputations +DROP TABLE IF EXISTS `player_factionchange_reputations`; +CREATE TABLE IF NOT EXISTS `player_factionchange_reputations` ( + `alliance_id` int(8) NOT NULL, + `horde_id` int(8) NOT NULL, + PRIMARY KEY (`alliance_id`,`horde_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- Data exporting was unselected. + + +-- Dumping structure for table mangos.player_factionchange_spells +DROP TABLE IF EXISTS `player_factionchange_spells`; +CREATE TABLE IF NOT EXISTS `player_factionchange_spells` ( + `alliance_id` int(8) NOT NULL, + `horde_id` int(8) NOT NULL, + `comment` varchar(255) NOT NULL DEFAULT '', + PRIMARY KEY (`alliance_id`,`horde_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- Data exporting was unselected. + + +-- Dumping structure for table mangos.player_levelstats +DROP TABLE IF EXISTS `player_levelstats`; +CREATE TABLE IF NOT EXISTS `player_levelstats` ( + `race` tinyint(3) unsigned NOT NULL, + `class` tinyint(3) unsigned NOT NULL, + `level` tinyint(3) unsigned NOT NULL, + `str` tinyint(3) unsigned NOT NULL, + `agi` tinyint(3) unsigned NOT NULL, + `sta` tinyint(3) unsigned NOT NULL, + `inte` tinyint(3) unsigned NOT NULL, + `spi` tinyint(3) unsigned NOT NULL, + PRIMARY KEY (`race`,`class`,`level`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 PACK_KEYS=0 COMMENT='Stores levels stats.'; + +-- Data exporting was unselected. + + +-- Dumping structure for table mangos.player_xp_for_level +DROP TABLE IF EXISTS `player_xp_for_level`; +CREATE TABLE IF NOT EXISTS `player_xp_for_level` ( + `lvl` int(3) unsigned NOT NULL, + `xp_for_next_level` int(10) unsigned NOT NULL, + PRIMARY KEY (`lvl`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- Data exporting was unselected. + + +-- Dumping structure for table mangos.points_of_interest DROP TABLE IF EXISTS `points_of_interest`; - -CREATE TABLE `points_of_interest` ( +CREATE TABLE IF NOT EXISTS `points_of_interest` ( `entry` mediumint(8) unsigned NOT NULL DEFAULT '0', `x` float NOT NULL DEFAULT '0', `y` float NOT NULL DEFAULT '0', @@ -2188,11 +2305,12 @@ CREATE TABLE `points_of_interest` ( PRIMARY KEY (`entry`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `pool_creature` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.pool_creature DROP TABLE IF EXISTS `pool_creature`; - -CREATE TABLE `pool_creature` ( +CREATE TABLE IF NOT EXISTS `pool_creature` ( `guid` int(10) unsigned NOT NULL DEFAULT '0', `pool_entry` mediumint(8) unsigned NOT NULL DEFAULT '0', `chance` float unsigned NOT NULL DEFAULT '0', @@ -2202,11 +2320,12 @@ CREATE TABLE `pool_creature` ( KEY `pool_idx` (`pool_entry`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -/*Table structure for table `pool_creature_template` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.pool_creature_template DROP TABLE IF EXISTS `pool_creature_template`; - -CREATE TABLE `pool_creature_template` ( +CREATE TABLE IF NOT EXISTS `pool_creature_template` ( `id` int(10) unsigned NOT NULL DEFAULT '0', `pool_entry` mediumint(8) unsigned NOT NULL DEFAULT '0', `chance` float unsigned NOT NULL DEFAULT '0', @@ -2216,11 +2335,12 @@ CREATE TABLE `pool_creature_template` ( KEY `pool_idx` (`pool_entry`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `pool_gameobject` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.pool_gameobject DROP TABLE IF EXISTS `pool_gameobject`; - -CREATE TABLE `pool_gameobject` ( +CREATE TABLE IF NOT EXISTS `pool_gameobject` ( `guid` int(10) unsigned NOT NULL DEFAULT '0', `pool_entry` mediumint(8) unsigned NOT NULL DEFAULT '0', `chance` float unsigned NOT NULL DEFAULT '0', @@ -2230,11 +2350,12 @@ CREATE TABLE `pool_gameobject` ( KEY `pool_idx` (`pool_entry`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -/*Table structure for table `pool_gameobject_template` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.pool_gameobject_template DROP TABLE IF EXISTS `pool_gameobject_template`; - -CREATE TABLE `pool_gameobject_template` ( +CREATE TABLE IF NOT EXISTS `pool_gameobject_template` ( `id` int(10) unsigned NOT NULL DEFAULT '0', `pool_entry` mediumint(8) unsigned NOT NULL DEFAULT '0', `chance` float unsigned NOT NULL DEFAULT '0', @@ -2244,11 +2365,12 @@ CREATE TABLE `pool_gameobject_template` ( KEY `pool_idx` (`pool_entry`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `pool_pool` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.pool_pool DROP TABLE IF EXISTS `pool_pool`; - -CREATE TABLE `pool_pool` ( +CREATE TABLE IF NOT EXISTS `pool_pool` ( `pool_id` mediumint(8) unsigned NOT NULL DEFAULT '0', `mother_pool` mediumint(8) unsigned NOT NULL DEFAULT '0', `chance` float NOT NULL DEFAULT '0', @@ -2258,11 +2380,12 @@ CREATE TABLE `pool_pool` ( KEY `pool_idx` (`mother_pool`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -/*Table structure for table `pool_template` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.pool_template DROP TABLE IF EXISTS `pool_template`; - -CREATE TABLE `pool_template` ( +CREATE TABLE IF NOT EXISTS `pool_template` ( `entry` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Pool entry', `max_limit` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Max number of objects (0) is no limit', `description` varchar(255) NOT NULL, @@ -2271,11 +2394,12 @@ CREATE TABLE `pool_template` ( PRIMARY KEY (`entry`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `quest_end_scripts` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.quest_end_scripts DROP TABLE IF EXISTS `quest_end_scripts`; - -CREATE TABLE `quest_end_scripts` ( +CREATE TABLE IF NOT EXISTS `quest_end_scripts` ( `id` mediumint(8) unsigned NOT NULL DEFAULT '0', `delay` int(10) unsigned NOT NULL DEFAULT '0', `command` mediumint(8) unsigned NOT NULL DEFAULT '0', @@ -2283,6 +2407,9 @@ CREATE TABLE `quest_end_scripts` ( `datalong2` int(10) unsigned NOT NULL DEFAULT '0', `datalong3` int(10) unsigned NOT NULL DEFAULT '0', `datalong4` int(10) unsigned NOT NULL DEFAULT '0', + `buddy_id` int(10) unsigned NOT NULL DEFAULT '0', + `buddy_radius` int(10) unsigned NOT NULL DEFAULT '0', + `buddy_type` tinyint(3) unsigned NOT NULL DEFAULT '0', `data_flags` tinyint(3) unsigned NOT NULL DEFAULT '0', `dataint` int(11) NOT NULL DEFAULT '0', `dataint2` int(11) NOT NULL DEFAULT '0', @@ -2295,39 +2422,68 @@ CREATE TABLE `quest_end_scripts` ( `comments` varchar(255) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `quest_start_scripts` */ +-- Data exporting was unselected. -DROP TABLE IF EXISTS `quest_start_scripts`; -CREATE TABLE `quest_start_scripts` ( - `id` mediumint(8) unsigned NOT NULL DEFAULT '0', - `delay` int(10) unsigned NOT NULL DEFAULT '0', - `command` mediumint(8) unsigned NOT NULL DEFAULT '0', - `datalong` mediumint(8) unsigned NOT NULL DEFAULT '0', - `datalong2` int(10) unsigned NOT NULL DEFAULT '0', - `datalong3` int(10) unsigned NOT NULL DEFAULT '0', - `datalong4` int(10) unsigned NOT NULL DEFAULT '0', - `data_flags` tinyint(3) unsigned NOT NULL DEFAULT '0', - `dataint` int(11) NOT NULL DEFAULT '0', - `dataint2` int(11) NOT NULL DEFAULT '0', - `dataint3` int(11) NOT NULL DEFAULT '0', - `dataint4` int(11) NOT NULL DEFAULT '0', - `x` float NOT NULL DEFAULT '0', - `y` float NOT NULL DEFAULT '0', - `z` float NOT NULL DEFAULT '0', - `o` float NOT NULL DEFAULT '0', - `comments` varchar(255) NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - -/*Table structure for table `quest_template` */ - -DROP TABLE IF EXISTS `quest_template`; - -CREATE TABLE `quest_template` ( +-- Dumping structure for table mangos.quest_greeting +DROP TABLE IF EXISTS `quest_greeting`; +CREATE TABLE IF NOT EXISTS `quest_greeting` ( `entry` mediumint(8) unsigned NOT NULL DEFAULT '0', + `type` tinyint(3) unsigned NOT NULL DEFAULT '0', + `content_default` text NOT NULL, + `content_loc1` text, + `content_loc2` text, + `content_loc3` text, + `content_loc4` text, + `content_loc5` text, + `content_loc6` text, + `content_loc7` text, + `content_loc8` text, + `Emote` smallint(5) unsigned NOT NULL DEFAULT '0', + `EmoteDelay` int(10) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`entry`,`type`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- Data exporting was unselected. + + +-- Dumping structure for table mangos.quest_start_scripts +DROP TABLE IF EXISTS `quest_start_scripts`; +CREATE TABLE IF NOT EXISTS `quest_start_scripts` ( + `id` mediumint(8) unsigned NOT NULL DEFAULT '0', + `delay` int(10) unsigned NOT NULL DEFAULT '0', + `command` mediumint(8) unsigned NOT NULL DEFAULT '0', + `datalong` mediumint(8) unsigned NOT NULL DEFAULT '0', + `datalong2` int(10) unsigned NOT NULL DEFAULT '0', + `datalong3` int(10) unsigned NOT NULL DEFAULT '0', + `datalong4` int(10) unsigned NOT NULL DEFAULT '0', + `buddy_id` int(10) unsigned NOT NULL DEFAULT '0', + `buddy_radius` int(10) unsigned NOT NULL DEFAULT '0', + `buddy_type` tinyint(3) unsigned NOT NULL DEFAULT '0', + `data_flags` tinyint(3) unsigned NOT NULL DEFAULT '0', + `dataint` int(11) NOT NULL DEFAULT '0', + `dataint2` int(11) NOT NULL DEFAULT '0', + `dataint3` int(11) NOT NULL DEFAULT '0', + `dataint4` int(11) NOT NULL DEFAULT '0', + `x` float NOT NULL DEFAULT '0', + `y` float NOT NULL DEFAULT '0', + `z` float NOT NULL DEFAULT '0', + `o` float NOT NULL DEFAULT '0', + `comments` varchar(255) NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- Data exporting was unselected. + + +-- Dumping structure for table mangos.quest_template +DROP TABLE IF EXISTS `quest_template`; +CREATE TABLE IF NOT EXISTS `quest_template` ( + `entry` mediumint(8) unsigned NOT NULL DEFAULT '0', + `patch` tinyint(3) unsigned NOT NULL DEFAULT '0', `Method` tinyint(3) unsigned NOT NULL DEFAULT '2', `ZoneOrSort` smallint(6) NOT NULL DEFAULT '0', `MinLevel` tinyint(3) unsigned NOT NULL DEFAULT '0', + `MaxLevel` tinyint(3) unsigned NOT NULL DEFAULT '0', `QuestLevel` tinyint(3) unsigned NOT NULL DEFAULT '0', `Type` smallint(5) unsigned NOT NULL DEFAULT '0', `RequiredClasses` smallint(5) unsigned NOT NULL DEFAULT '0', @@ -2449,14 +2605,15 @@ CREATE TABLE `quest_template` ( `OfferRewardEmoteDelay4` int(11) unsigned NOT NULL DEFAULT '0', `StartScript` mediumint(8) unsigned NOT NULL DEFAULT '0', `CompleteScript` mediumint(8) unsigned NOT NULL DEFAULT '0', - PRIMARY KEY (`entry`) + PRIMARY KEY (`entry`,`patch`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Quest System'; -/*Table structure for table `reference_loot_template` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.reference_loot_template DROP TABLE IF EXISTS `reference_loot_template`; - -CREATE TABLE `reference_loot_template` ( +CREATE TABLE IF NOT EXISTS `reference_loot_template` ( `entry` mediumint(8) unsigned NOT NULL DEFAULT '0', `item` mediumint(8) unsigned NOT NULL DEFAULT '0', `ChanceOrQuestChance` float NOT NULL DEFAULT '100', @@ -2467,11 +2624,12 @@ CREATE TABLE `reference_loot_template` ( PRIMARY KEY (`entry`,`item`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Loot System'; -/*Table structure for table `reputation_reward_rate` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.reputation_reward_rate DROP TABLE IF EXISTS `reputation_reward_rate`; - -CREATE TABLE `reputation_reward_rate` ( +CREATE TABLE IF NOT EXISTS `reputation_reward_rate` ( `faction` mediumint(8) unsigned NOT NULL DEFAULT '0', `quest_rate` float NOT NULL DEFAULT '1', `creature_rate` float NOT NULL DEFAULT '1', @@ -2479,11 +2637,12 @@ CREATE TABLE `reputation_reward_rate` ( PRIMARY KEY (`faction`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `reputation_spillover_template` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.reputation_spillover_template DROP TABLE IF EXISTS `reputation_spillover_template`; - -CREATE TABLE `reputation_spillover_template` ( +CREATE TABLE IF NOT EXISTS `reputation_spillover_template` ( `faction` smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT 'faction entry', `faction1` smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT 'faction to give spillover for', `rate_1` float NOT NULL DEFAULT '0' COMMENT 'the given rep points * rate', @@ -2500,31 +2659,56 @@ CREATE TABLE `reputation_spillover_template` ( PRIMARY KEY (`faction`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Reputation spillover reputation gain'; -/*Table structure for table `reserved_name` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.reserved_name DROP TABLE IF EXISTS `reserved_name`; - -CREATE TABLE `reserved_name` ( +CREATE TABLE IF NOT EXISTS `reserved_name` ( `name` varchar(12) NOT NULL DEFAULT '', PRIMARY KEY (`name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Player Reserved Names'; -/*Table structure for table `script_escort_data` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.scripted_areatrigger +DROP TABLE IF EXISTS `scripted_areatrigger`; +CREATE TABLE IF NOT EXISTS `scripted_areatrigger` ( + `entry` mediumint(8) NOT NULL, + `ScriptName` char(64) NOT NULL, + PRIMARY KEY (`entry`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- Data exporting was unselected. + + +-- Dumping structure for table mangos.scripted_event_id +DROP TABLE IF EXISTS `scripted_event_id`; +CREATE TABLE IF NOT EXISTS `scripted_event_id` ( + `id` mediumint(8) NOT NULL, + `ScriptName` char(64) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Script library scripted events'; + +-- Data exporting was unselected. + + +-- Dumping structure for table mangos.script_escort_data DROP TABLE IF EXISTS `script_escort_data`; - -CREATE TABLE `script_escort_data` ( +CREATE TABLE IF NOT EXISTS `script_escort_data` ( `creature_id` int(11) DEFAULT NULL, `quest` int(11) DEFAULT NULL, `escort_faction` int(11) DEFAULT NULL, UNIQUE KEY `creature_id` (`creature_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC; -/*Table structure for table `script_texts` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.script_texts DROP TABLE IF EXISTS `script_texts`; - -CREATE TABLE `script_texts` ( +CREATE TABLE IF NOT EXISTS `script_texts` ( `entry` mediumint(8) NOT NULL, `content_default` text NOT NULL, `content_loc1` text, @@ -2543,11 +2727,12 @@ CREATE TABLE `script_texts` ( PRIMARY KEY (`entry`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Script Texts'; -/*Table structure for table `script_waypoint` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.script_waypoint DROP TABLE IF EXISTS `script_waypoint`; - -CREATE TABLE `script_waypoint` ( +CREATE TABLE IF NOT EXISTS `script_waypoint` ( `entry` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'creature_template entry', `pointid` mediumint(8) unsigned NOT NULL DEFAULT '0', `location_x` float NOT NULL DEFAULT '0', @@ -2558,42 +2743,24 @@ CREATE TABLE `script_waypoint` ( PRIMARY KEY (`entry`,`pointid`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Script Creature waypoints'; -/*Table structure for table `scripted_areatrigger` */ +-- Data exporting was unselected. -DROP TABLE IF EXISTS `scripted_areatrigger`; - -CREATE TABLE `scripted_areatrigger` ( - `entry` mediumint(8) NOT NULL, - `ScriptName` char(64) NOT NULL, - PRIMARY KEY (`entry`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - -/*Table structure for table `scripted_event_id` */ - -DROP TABLE IF EXISTS `scripted_event_id`; - -CREATE TABLE `scripted_event_id` ( - `id` mediumint(8) NOT NULL, - `ScriptName` char(64) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Script library scripted events'; - -/*Table structure for table `skill_discovery_template` */ +-- Dumping structure for table mangos.skill_discovery_template DROP TABLE IF EXISTS `skill_discovery_template`; - -CREATE TABLE `skill_discovery_template` ( +CREATE TABLE IF NOT EXISTS `skill_discovery_template` ( `spellId` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'SpellId of the discoverable spell', `reqSpell` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'spell requirement', `chance` float NOT NULL DEFAULT '0' COMMENT 'chance to discover', PRIMARY KEY (`spellId`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Skill Discovery System'; -/*Table structure for table `skill_extra_item_template` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.skill_extra_item_template DROP TABLE IF EXISTS `skill_extra_item_template`; - -CREATE TABLE `skill_extra_item_template` ( +CREATE TABLE IF NOT EXISTS `skill_extra_item_template` ( `spellId` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'SpellId of the item creation spell', `requiredSpecialization` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Specialization spell id', `additionalCreateChance` float NOT NULL DEFAULT '0' COMMENT 'chance to create add', @@ -2601,21 +2768,23 @@ CREATE TABLE `skill_extra_item_template` ( PRIMARY KEY (`spellId`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Skill Specialization System'; -/*Table structure for table `skill_fishing_base_level` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.skill_fishing_base_level DROP TABLE IF EXISTS `skill_fishing_base_level`; - -CREATE TABLE `skill_fishing_base_level` ( +CREATE TABLE IF NOT EXISTS `skill_fishing_base_level` ( `entry` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Area identifier', `skill` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Base skill level requirement', PRIMARY KEY (`entry`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Fishing system'; -/*Table structure for table `skinning_loot_template` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.skinning_loot_template DROP TABLE IF EXISTS `skinning_loot_template`; - -CREATE TABLE `skinning_loot_template` ( +CREATE TABLE IF NOT EXISTS `skinning_loot_template` ( `entry` mediumint(8) unsigned NOT NULL DEFAULT '0', `item` mediumint(8) unsigned NOT NULL DEFAULT '0', `ChanceOrQuestChance` float NOT NULL DEFAULT '100', @@ -2626,22 +2795,24 @@ CREATE TABLE `skinning_loot_template` ( PRIMARY KEY (`entry`,`item`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Loot System'; -/*Table structure for table `spell_affect` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.spell_affect DROP TABLE IF EXISTS `spell_affect`; - -CREATE TABLE `spell_affect` ( +CREATE TABLE IF NOT EXISTS `spell_affect` ( `entry` smallint(5) unsigned NOT NULL DEFAULT '0', `effectId` tinyint(3) unsigned NOT NULL DEFAULT '0', `SpellFamilyMask` bigint(20) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`entry`,`effectId`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `spell_area` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.spell_area DROP TABLE IF EXISTS `spell_area`; - -CREATE TABLE `spell_area` ( +CREATE TABLE IF NOT EXISTS `spell_area` ( `spell` mediumint(8) unsigned NOT NULL DEFAULT '0', `area` mediumint(8) unsigned NOT NULL DEFAULT '0', `quest_start` mediumint(8) unsigned NOT NULL DEFAULT '0', @@ -2654,11 +2825,12 @@ CREATE TABLE `spell_area` ( PRIMARY KEY (`spell`,`area`,`quest_start`,`quest_start_active`,`aura_spell`,`racemask`,`gender`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `spell_bonus_data` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.spell_bonus_data DROP TABLE IF EXISTS `spell_bonus_data`; - -CREATE TABLE `spell_bonus_data` ( +CREATE TABLE IF NOT EXISTS `spell_bonus_data` ( `entry` smallint(5) unsigned NOT NULL, `direct_bonus` float NOT NULL DEFAULT '0', `dot_bonus` float NOT NULL DEFAULT '0', @@ -2668,11 +2840,12 @@ CREATE TABLE `spell_bonus_data` ( PRIMARY KEY (`entry`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `spell_chain` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.spell_chain DROP TABLE IF EXISTS `spell_chain`; - -CREATE TABLE `spell_chain` ( +CREATE TABLE IF NOT EXISTS `spell_chain` ( `spell_id` mediumint(9) NOT NULL DEFAULT '0', `prev_spell` mediumint(9) NOT NULL DEFAULT '0', `first_spell` mediumint(9) NOT NULL DEFAULT '0', @@ -2681,11 +2854,12 @@ CREATE TABLE `spell_chain` ( PRIMARY KEY (`spell_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Spell Additinal Data'; -/*Table structure for table `spell_check` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.spell_check DROP TABLE IF EXISTS `spell_check`; - -CREATE TABLE `spell_check` ( +CREATE TABLE IF NOT EXISTS `spell_check` ( `spellid` mediumint(7) unsigned NOT NULL DEFAULT '0', `SpellFamilyName` smallint(5) NOT NULL DEFAULT '-1', `SpellFamilyMask` bigint(30) NOT NULL DEFAULT '-1', @@ -2700,20 +2874,22 @@ CREATE TABLE `spell_check` ( PRIMARY KEY (`spellid`,`SpellFamilyName`,`SpellFamilyMask`,`SpellIcon`,`SpellVisual`,`SpellCategory`,`Code`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `spell_disabled` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.spell_disabled DROP TABLE IF EXISTS `spell_disabled`; - -CREATE TABLE `spell_disabled` ( +CREATE TABLE IF NOT EXISTS `spell_disabled` ( `entry` int(10) unsigned NOT NULL COMMENT 'Disabled spell', PRIMARY KEY (`entry`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -/*Table structure for table `spell_effect_mod` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.spell_effect_mod DROP TABLE IF EXISTS `spell_effect_mod`; - -CREATE TABLE `spell_effect_mod` ( +CREATE TABLE IF NOT EXISTS `spell_effect_mod` ( `Id` int(10) unsigned NOT NULL DEFAULT '0', `EffectIndex` int(3) unsigned NOT NULL DEFAULT '0', `Effect` int(3) NOT NULL DEFAULT '-1', @@ -2738,31 +2914,34 @@ CREATE TABLE `spell_effect_mod` ( PRIMARY KEY (`Id`,`EffectIndex`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -/*Table structure for table `spell_elixir` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.spell_elixir DROP TABLE IF EXISTS `spell_elixir`; - -CREATE TABLE `spell_elixir` ( +CREATE TABLE IF NOT EXISTS `spell_elixir` ( `entry` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'SpellId of potion', `mask` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT 'Mask 0x1 battle 0x2 guardian 0x3 flask 0x7 unstable flasks 0xB shattrath flasks', PRIMARY KEY (`entry`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Spell System'; -/*Table structure for table `spell_facing` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.spell_facing DROP TABLE IF EXISTS `spell_facing`; - -CREATE TABLE `spell_facing` ( +CREATE TABLE IF NOT EXISTS `spell_facing` ( `entry` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Spell ID', `facingcasterflag` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'flag for facing state, usually 1', PRIMARY KEY (`entry`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -/*Table structure for table `spell_group` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.spell_group DROP TABLE IF EXISTS `spell_group`; - -CREATE TABLE `spell_group` ( +CREATE TABLE IF NOT EXISTS `spell_group` ( `group_id` int(11) unsigned NOT NULL DEFAULT '0', `group_spell_id` int(11) unsigned NOT NULL DEFAULT '0', `spell_id` int(11) NOT NULL DEFAULT '0', @@ -2770,32 +2949,35 @@ CREATE TABLE `spell_group` ( UNIQUE KEY `group_id` (`group_id`,`group_spell_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Spell System'; -/*Table structure for table `spell_group_stack_rules` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.spell_group_stack_rules DROP TABLE IF EXISTS `spell_group_stack_rules`; - -CREATE TABLE `spell_group_stack_rules` ( +CREATE TABLE IF NOT EXISTS `spell_group_stack_rules` ( `group_id` int(11) unsigned NOT NULL DEFAULT '0', `stack_rule` tinyint(3) NOT NULL DEFAULT '1', PRIMARY KEY (`group_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `spell_learn_spell` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.spell_learn_spell DROP TABLE IF EXISTS `spell_learn_spell`; - -CREATE TABLE `spell_learn_spell` ( +CREATE TABLE IF NOT EXISTS `spell_learn_spell` ( `entry` smallint(5) unsigned NOT NULL DEFAULT '0', `SpellID` smallint(5) unsigned NOT NULL DEFAULT '0', `Active` tinyint(3) unsigned NOT NULL DEFAULT '1', PRIMARY KEY (`entry`,`SpellID`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Item System'; -/*Table structure for table `spell_mod` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.spell_mod DROP TABLE IF EXISTS `spell_mod`; - -CREATE TABLE `spell_mod` ( +CREATE TABLE IF NOT EXISTS `spell_mod` ( `Id` int(11) NOT NULL DEFAULT '0', `procChance` int(11) DEFAULT '-1', `procFlags` int(11) DEFAULT '-1', @@ -2831,26 +3013,30 @@ CREATE TABLE `spell_mod` ( `CategoryRecoveryTime` int(11) NOT NULL DEFAULT '-1', `SpellFamilyName` int(11) NOT NULL DEFAULT '-1', `SpellFamilyFlags` bigint(20) unsigned DEFAULT '0', + `Mechanic` int(2) DEFAULT '-1', + `EquippedItemClass` int(2) DEFAULT '-1', `Comment` varchar(255) DEFAULT NULL, PRIMARY KEY (`Id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -/*Table structure for table `spell_pet_auras` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.spell_pet_auras DROP TABLE IF EXISTS `spell_pet_auras`; - -CREATE TABLE `spell_pet_auras` ( +CREATE TABLE IF NOT EXISTS `spell_pet_auras` ( `spell` mediumint(8) unsigned NOT NULL COMMENT 'dummy spell id', `pet` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'pet id; 0 = all', `aura` mediumint(8) unsigned NOT NULL COMMENT 'pet aura id', PRIMARY KEY (`spell`,`pet`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -/*Table structure for table `spell_proc_event` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.spell_proc_event DROP TABLE IF EXISTS `spell_proc_event`; - -CREATE TABLE `spell_proc_event` ( +CREATE TABLE IF NOT EXISTS `spell_proc_event` ( `entry` mediumint(8) unsigned NOT NULL DEFAULT '0', `SchoolMask` tinyint(4) unsigned NOT NULL DEFAULT '0', `SpellFamilyName` smallint(5) unsigned NOT NULL DEFAULT '0', @@ -2865,32 +3051,23 @@ CREATE TABLE `spell_proc_event` ( PRIMARY KEY (`entry`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `spell_proc_item_enchant` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.spell_proc_item_enchant DROP TABLE IF EXISTS `spell_proc_item_enchant`; - -CREATE TABLE `spell_proc_item_enchant` ( +CREATE TABLE IF NOT EXISTS `spell_proc_item_enchant` ( `entry` mediumint(8) unsigned NOT NULL, `ppmRate` float NOT NULL DEFAULT '0', PRIMARY KEY (`entry`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `spell_script_target` */ +-- Data exporting was unselected. -DROP TABLE IF EXISTS `spell_script_target`; - -CREATE TABLE `spell_script_target` ( - `entry` mediumint(8) unsigned NOT NULL, - `type` tinyint(3) unsigned NOT NULL DEFAULT '0', - `targetEntry` mediumint(8) unsigned NOT NULL DEFAULT '0', - UNIQUE KEY `entry_type_target` (`entry`,`type`,`targetEntry`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Spell System'; - -/*Table structure for table `spell_scripts` */ +-- Dumping structure for table mangos.spell_scripts DROP TABLE IF EXISTS `spell_scripts`; - -CREATE TABLE `spell_scripts` ( +CREATE TABLE IF NOT EXISTS `spell_scripts` ( `id` mediumint(8) unsigned NOT NULL DEFAULT '0', `delay` int(10) unsigned NOT NULL DEFAULT '0', `command` mediumint(8) unsigned NOT NULL DEFAULT '0', @@ -2898,6 +3075,9 @@ CREATE TABLE `spell_scripts` ( `datalong2` int(10) unsigned NOT NULL DEFAULT '0', `datalong3` int(10) unsigned NOT NULL DEFAULT '0', `datalong4` int(10) unsigned NOT NULL DEFAULT '0', + `buddy_id` int(10) unsigned NOT NULL DEFAULT '0', + `buddy_radius` int(10) unsigned NOT NULL DEFAULT '0', + `buddy_type` tinyint(3) unsigned NOT NULL DEFAULT '0', `data_flags` tinyint(3) unsigned NOT NULL DEFAULT '0', `dataint` int(11) NOT NULL DEFAULT '0', `dataint2` int(11) NOT NULL DEFAULT '0', @@ -2910,11 +3090,24 @@ CREATE TABLE `spell_scripts` ( `comments` varchar(255) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*Table structure for table `spell_target_position` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.spell_script_target +DROP TABLE IF EXISTS `spell_script_target`; +CREATE TABLE IF NOT EXISTS `spell_script_target` ( + `entry` mediumint(8) unsigned NOT NULL, + `type` tinyint(3) unsigned NOT NULL DEFAULT '0', + `targetEntry` mediumint(8) unsigned NOT NULL DEFAULT '0', + UNIQUE KEY `entry_type_target` (`entry`,`type`,`targetEntry`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Spell System'; + +-- Data exporting was unselected. + + +-- Dumping structure for table mangos.spell_target_position DROP TABLE IF EXISTS `spell_target_position`; - -CREATE TABLE `spell_target_position` ( +CREATE TABLE IF NOT EXISTS `spell_target_position` ( `id` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Identifier', `target_map` smallint(5) unsigned NOT NULL DEFAULT '0', `target_position_x` float NOT NULL DEFAULT '0', @@ -2924,11 +3117,194 @@ CREATE TABLE `spell_target_position` ( PRIMARY KEY (`id`,`target_map`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Spell System'; -/*Table structure for table `spell_threat` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.spell_template +DROP TABLE IF EXISTS `spell_template`; +CREATE TABLE IF NOT EXISTS `spell_template` ( + `ID` int(4) unsigned NOT NULL DEFAULT '0', + `school` int(4) unsigned DEFAULT '0' COMMENT 'Resistances.dbc', + `category` int(4) unsigned DEFAULT '0' COMMENT 'SpellCategory.dbc', + `castUI` int(4) unsigned DEFAULT '0', + `dispel` int(4) unsigned DEFAULT '0' COMMENT 'SpellDispelType.dbc', + `mechanic` int(4) unsigned DEFAULT '0' COMMENT 'SpellMechanic.dbc', + `attributes` int(4) unsigned DEFAULT '0', + `attributesEx` int(4) unsigned DEFAULT '0', + `attributesEx2` int(4) unsigned DEFAULT '0', + `attributesEx3` int(4) unsigned DEFAULT '0', + `attributesEx4` int(4) unsigned DEFAULT '0', + `stances` int(4) unsigned DEFAULT '0' COMMENT 'SpellShapeshiftForm.dbc', + `stancesNot` int(4) unsigned DEFAULT '0' COMMENT 'SpellShapeshiftForm.dbc', + `targets` int(4) unsigned DEFAULT '0', + `targetCreatureType` int(4) unsigned DEFAULT '0' COMMENT 'CreatureType.dbc', + `requiresSpellFocus` int(4) unsigned DEFAULT '0' COMMENT 'SpellFocusObject.dbc', + `casterAuraState` int(4) unsigned DEFAULT '0', + `targetAuraState` int(4) unsigned DEFAULT '0', + `castingTimeIndex` int(4) unsigned DEFAULT '0' COMMENT 'SpellCastTimes.dbc', + `recoveryTime` int(4) unsigned DEFAULT '0', + `categoryRecoveryTime` int(4) unsigned DEFAULT '0', + `interruptFlags` int(4) unsigned DEFAULT '0', + `auraInterruptFlags` int(4) unsigned DEFAULT '0', + `channelInterruptFlags` int(4) unsigned DEFAULT '0', + `procFlags` int(4) unsigned DEFAULT '0', + `procChance` int(4) unsigned DEFAULT '0', + `procCharges` int(4) unsigned DEFAULT '0', + `maxLevel` int(4) unsigned DEFAULT '0', + `baseLevel` int(4) unsigned DEFAULT '0', + `spellLevel` int(4) unsigned DEFAULT '0', + `durationIndex` int(4) unsigned DEFAULT '0' COMMENT 'SpellDuration.dbc', + `powerType` int(4) unsigned DEFAULT '0', + `manaCost` int(4) unsigned DEFAULT '0', + `manCostPerLevel` int(4) unsigned DEFAULT '0', + `manaPerSecond` int(4) unsigned DEFAULT '0', + `manaPerSecondPerLevel` int(4) unsigned DEFAULT '0', + `rangeIndex` int(4) unsigned DEFAULT '0' COMMENT 'SpellRange.dbc', + `speed` float DEFAULT '0', + `modelNextSpell` int(4) unsigned DEFAULT '0', + `stackAmount` int(4) unsigned DEFAULT '0', + `totem1` int(4) unsigned DEFAULT '0', + `totem2` int(4) unsigned DEFAULT '0', + `reagent1` int(4) DEFAULT '0', + `reagent2` int(4) DEFAULT '0', + `reagent3` int(4) DEFAULT '0', + `reagent4` int(4) DEFAULT '0', + `reagent5` int(4) DEFAULT '0', + `reagent6` int(4) DEFAULT '0', + `reagent7` int(4) DEFAULT '0', + `reagent8` int(4) DEFAULT '0', + `reagentCount1` int(4) unsigned DEFAULT '0', + `reagentCount2` int(4) unsigned DEFAULT '0', + `reagentCount3` int(4) unsigned DEFAULT '0', + `reagentCount4` int(4) unsigned DEFAULT '0', + `reagentCount5` int(4) unsigned DEFAULT '0', + `reagentCount6` int(4) unsigned DEFAULT '0', + `reagentCount7` int(4) unsigned DEFAULT '0', + `reagentCount8` int(4) unsigned DEFAULT '0', + `equippedItemClass` int(4) DEFAULT '0' COMMENT 'ItemClass.dbc', + `equippedItemSubClassMask` int(4) DEFAULT '0' COMMENT 'ItemSubClass.dbc', + `equippedItemInventoryTypeMask` int(4) DEFAULT '0', + `effect1` int(4) unsigned DEFAULT '0', + `effect2` int(4) unsigned DEFAULT '0', + `effect3` int(4) unsigned DEFAULT '0', + `effectDieSides1` int(4) DEFAULT '0', + `effectDieSides2` int(4) DEFAULT '0', + `effectDieSides3` int(4) DEFAULT '0', + `effectBaseDice1` int(4) unsigned DEFAULT '0', + `effectBaseDice2` int(4) unsigned DEFAULT '0', + `effectBaseDice3` int(4) unsigned DEFAULT '0', + `effectDicePerLevel1` float DEFAULT '0', + `effectDicePerLevel2` float DEFAULT '0', + `effectDicePerLevel3` float DEFAULT '0', + `effectRealPointsPerLevel1` float DEFAULT '0', + `effectRealPointsPerLevel2` float DEFAULT '0', + `effectRealPointsPerLevel3` float DEFAULT '0', + `effectBasePoints1` int(4) DEFAULT '0', + `effectBasePoints2` int(4) DEFAULT '0', + `effectBasePoints3` int(4) DEFAULT '0', + `effectMechanic1` int(4) unsigned DEFAULT '0', + `effectMechanic2` int(4) unsigned DEFAULT '0', + `effectMechanic3` int(4) unsigned DEFAULT '0', + `effectImplicitTargetA1` int(4) unsigned DEFAULT '0', + `effectImplicitTargetA2` int(4) unsigned DEFAULT '0', + `effectImplicitTargetA3` int(4) unsigned DEFAULT '0', + `effectImplicitTargetB1` int(4) unsigned DEFAULT '0', + `effectImplicitTargetB2` int(4) unsigned DEFAULT '0', + `effectImplicitTargetB3` int(4) unsigned DEFAULT '0', + `effectRadiusIndex1` int(4) unsigned DEFAULT '0' COMMENT 'SpellRadius.dbc', + `effectRadiusIndex2` int(4) unsigned DEFAULT '0' COMMENT 'SpellRadius.dbc', + `effectRadiusIndex3` int(4) unsigned DEFAULT '0' COMMENT 'SpellRadius.dbc', + `effectApplyAuraName1` int(4) unsigned DEFAULT '0', + `effectApplyAuraName2` int(4) unsigned DEFAULT '0', + `effectApplyAuraName3` int(4) unsigned DEFAULT '0', + `effectAmplitude1` int(4) unsigned DEFAULT '0', + `effectAmplitude2` int(4) unsigned DEFAULT '0', + `effectAmplitude3` int(4) unsigned DEFAULT '0', + `effectMultipleValue1` float DEFAULT '0', + `effectMultipleValue2` float DEFAULT '0', + `effectMultipleValue3` float DEFAULT '0', + `effectChainTarget1` int(4) unsigned DEFAULT '0', + `effectChainTarget2` int(4) unsigned DEFAULT '0', + `effectChainTarget3` int(4) unsigned DEFAULT '0', + `effectItemType1` int(4) unsigned DEFAULT '0', + `effectItemType2` int(4) unsigned DEFAULT '0', + `effectItemType3` int(4) unsigned DEFAULT '0', + `effectMiscValue1` int(4) DEFAULT '0', + `effectMiscValue2` int(4) DEFAULT '0', + `effectMiscValue3` int(4) DEFAULT '0', + `effectTriggerSpell1` int(4) unsigned DEFAULT '0', + `effectTriggerSpell2` int(4) unsigned DEFAULT '0', + `effectTriggerSpell3` int(4) unsigned DEFAULT '0', + `effectPointsPerComboPoint1` float DEFAULT '0', + `effectPointsPerComboPoint2` float DEFAULT '0', + `effectPointsPerComboPoint3` float DEFAULT '0', + `spellVisual1` int(4) unsigned DEFAULT '0' COMMENT 'SpellVisual.dbc', + `spellVisual2` int(4) unsigned DEFAULT '0' COMMENT 'SpellVisual.dbc', + `spellIconId` int(4) unsigned DEFAULT '0' COMMENT 'SpellIcon.dbc', + `activeIconId` int(4) unsigned DEFAULT '0' COMMENT 'SpellIcon.dbc', + `spellPriority` int(4) unsigned DEFAULT '0', + `name1` varchar(256) COLLATE utf8_unicode_ci DEFAULT '', + `name2` varchar(256) COLLATE utf8_unicode_ci DEFAULT '', + `name3` varchar(256) COLLATE utf8_unicode_ci DEFAULT '', + `name4` varchar(256) COLLATE utf8_unicode_ci DEFAULT '', + `name5` varchar(256) COLLATE utf8_unicode_ci DEFAULT '', + `name6` varchar(256) COLLATE utf8_unicode_ci DEFAULT '', + `name7` varchar(256) COLLATE utf8_unicode_ci DEFAULT '', + `name8` varchar(256) COLLATE utf8_unicode_ci DEFAULT '', + `nameFlags` int(4) unsigned DEFAULT '0', + `nameSubtext1` varchar(256) COLLATE utf8_unicode_ci DEFAULT '', + `nameSubtext2` varchar(256) COLLATE utf8_unicode_ci DEFAULT '', + `nameSubtext3` varchar(256) COLLATE utf8_unicode_ci DEFAULT '', + `nameSubtext4` varchar(256) COLLATE utf8_unicode_ci DEFAULT '', + `nameSubtext5` varchar(256) COLLATE utf8_unicode_ci DEFAULT '', + `nameSubtext6` varchar(256) COLLATE utf8_unicode_ci DEFAULT '', + `nameSubtext7` varchar(256) COLLATE utf8_unicode_ci DEFAULT '', + `nameSubtext8` varchar(256) COLLATE utf8_unicode_ci DEFAULT '', + `nameSubtextFlags` int(4) unsigned DEFAULT '0', + `description1` varchar(1024) COLLATE utf8_unicode_ci DEFAULT '', + `description2` varchar(1024) COLLATE utf8_unicode_ci DEFAULT '', + `description3` varchar(1024) COLLATE utf8_unicode_ci DEFAULT '', + `description4` varchar(1024) COLLATE utf8_unicode_ci DEFAULT '', + `description5` varchar(1024) COLLATE utf8_unicode_ci DEFAULT '', + `description6` varchar(1024) COLLATE utf8_unicode_ci DEFAULT '', + `description7` varchar(1024) COLLATE utf8_unicode_ci DEFAULT '', + `description8` varchar(1024) COLLATE utf8_unicode_ci DEFAULT '', + `descriptionFlags` int(4) unsigned DEFAULT '0', + `auraDescription1` varchar(512) COLLATE utf8_unicode_ci DEFAULT '', + `auraDescription2` varchar(512) COLLATE utf8_unicode_ci DEFAULT '', + `auraDescription3` varchar(512) COLLATE utf8_unicode_ci DEFAULT '', + `auraDescription4` varchar(512) COLLATE utf8_unicode_ci DEFAULT '', + `auraDescription5` varchar(512) COLLATE utf8_unicode_ci DEFAULT '', + `auraDescription6` varchar(512) COLLATE utf8_unicode_ci DEFAULT '', + `auraDescription7` varchar(512) COLLATE utf8_unicode_ci DEFAULT '', + `auraDescription8` varchar(512) COLLATE utf8_unicode_ci DEFAULT '', + `auraDescriptionFlags` int(4) unsigned DEFAULT '0', + `manaCostPercentage` int(4) unsigned DEFAULT '0', + `startRecoveryCategory` int(4) unsigned DEFAULT '0', + `startRecoveryTime` int(4) unsigned DEFAULT '0', + `maxTargetLevel` int(4) unsigned DEFAULT '0', + `spellFamilyName` int(4) unsigned DEFAULT '0' COMMENT 'ChrClasses.dbc', + `spellFamilyFlags` bigint(20) unsigned DEFAULT '0', + `maxAffectedTargets` int(4) unsigned DEFAULT '0', + `dmgClass` int(4) unsigned DEFAULT '0', + `preventionType` int(4) unsigned DEFAULT '0', + `stanceBarOrder` int(4) DEFAULT '0', + `dmgMultiplier1` float DEFAULT '0', + `dmgMultiplier2` float DEFAULT '0', + `dmgMultiplier3` float DEFAULT '0', + `minFactionId` int(4) unsigned DEFAULT '0', + `minReputation` int(4) unsigned DEFAULT '0', + `requiredAuraVision` int(4) unsigned DEFAULT '0', + PRIMARY KEY (`ID`), + UNIQUE KEY `ID` (`ID`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +-- Data exporting was unselected. + + +-- Dumping structure for table mangos.spell_threat DROP TABLE IF EXISTS `spell_threat`; - -CREATE TABLE `spell_threat` ( +CREATE TABLE IF NOT EXISTS `spell_threat` ( `entry` mediumint(8) unsigned NOT NULL, `Threat` smallint(6) NOT NULL, `multiplier` float NOT NULL DEFAULT '1' COMMENT 'threat multiplier for damage/healing', @@ -2936,11 +3312,12 @@ CREATE TABLE `spell_threat` ( PRIMARY KEY (`entry`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED; -/*Table structure for table `transports` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.transports DROP TABLE IF EXISTS `transports`; - -CREATE TABLE `transports` ( +CREATE TABLE IF NOT EXISTS `transports` ( `guid` int(10) unsigned NOT NULL DEFAULT '0', `entry` mediumint(8) unsigned NOT NULL DEFAULT '0', `name` text, @@ -2948,16 +3325,18 @@ CREATE TABLE `transports` ( PRIMARY KEY (`entry`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Transports'; -/*Table structure for table `variables` */ +-- Data exporting was unselected. + +-- Dumping structure for table mangos.variables DROP TABLE IF EXISTS `variables`; - -CREATE TABLE `variables` ( +CREATE TABLE IF NOT EXISTS `variables` ( `index` int(10) unsigned NOT NULL DEFAULT '0', `value` int(10) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`index`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; +-- Data exporting was unselected. +/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */; +/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; diff --git a/src/game/AutoTesting/Tests/Cinematics.cpp b/src/game/AutoTesting/Tests/Cinematics.cpp index bb0bd0266..3a04bd37f 100644 --- a/src/game/AutoTesting/Tests/Cinematics.cpp +++ b/src/game/AutoTesting/Tests/Cinematics.cpp @@ -53,7 +53,7 @@ public: familyName = SPELLFAMILY_SHAMAN; break; } - for (uint32 id = 0; id < sSpellStore.GetNumRows(); id++) + for (uint32 id = 0; id < sSpellMgr.GetMaxSpellId(); id++) { SpellEntry const *spellInfo = sSpellMgr.GetSpellEntry(id); if (spellInfo && spellInfo->SpellFamilyName == familyName && spellInfo->spellLevel <= player->getLevel()) diff --git a/src/game/Chat/Chat.cpp b/src/game/Chat/Chat.cpp index b657f4625..5ccccc510 100644 --- a/src/game/Chat/Chat.cpp +++ b/src/game/Chat/Chat.cpp @@ -824,13 +824,6 @@ ChatCommand * ChatHandler::getCommandTable() { MSTR, nullptr, 0, false, nullptr, "", nullptr } }; - static ChatCommand exportCommandTable[] = - { - { NODE, "spell", SEC_CONSOLE, true, &ChatHandler::HandleDbcExportSpellCommand, "", nullptr}, - { NODE, "effects", SEC_CONSOLE, true, &ChatHandler::HandleDbcExportSpellEffectsCommand, "", nullptr}, - { MSTR, nullptr, 0, false, nullptr, "", nullptr} - }; - static ChatCommand worldCommandTable[] = { { NODE, "update", SEC_ADMINISTRATOR, false, &ChatHandler::HandleWorldUpdateCommand, "", nullptr}, @@ -1037,7 +1030,6 @@ ChatCommand * ChatHandler::getCommandTable() { NODE, "wp", SEC_GAMEMASTER, false, nullptr, "", wpCommandTable }, { NODE, "service", SEC_ADMINISTRATOR, true, nullptr, "", serviceCommandTable }, - { NODE, "export", SEC_CONSOLE, true, nullptr, "Export DBC files to database", exportCommandTable}, { NODE, "bot", SEC_GAMEMASTER, true, nullptr, "Manage bots", botCommandTable}, { NODE, "ahbot", SEC_GAMEMASTER, true, nullptr, "Manage AH bot", ahbotCommandTable}, { NODE, "world", SEC_GAMEMASTER, false, nullptr, "", worldCommandTable }, diff --git a/src/game/Chat/Chat.h b/src/game/Chat/Chat.h index 4b93dd447..dbe796ed2 100644 --- a/src/game/Chat/Chat.h +++ b/src/game/Chat/Chat.h @@ -174,8 +174,6 @@ class MANGOS_DLL_SPEC ChatHandler bool HandleViewLogCommand(char* ); //Custom bool HandleListAddonsCommand(char *); - bool HandleDbcExportSpellCommand(char *); - bool HandleDbcExportSpellEffectsCommand(char *); bool HandleUpdateWorldStateCommand(char *); bool HandleSendSpellVisualCommand(char *); bool HandleSendSpellImpactCommand(char *); diff --git a/src/game/CinematicStuff/CinematicStuff.cpp b/src/game/CinematicStuff/CinematicStuff.cpp index 77b151279..fdce48815 100644 --- a/src/game/CinematicStuff/CinematicStuff.cpp +++ b/src/game/CinematicStuff/CinematicStuff.cpp @@ -55,7 +55,7 @@ void CinematicStuff::AddSpells(Player* player) familyName = SPELLFAMILY_SHAMAN; break; } - for (uint32 id = 0; id < sSpellStore.GetNumRows(); id++) + for (uint32 id = 0; id < sSpellMgr.GetMaxSpellId(); id++) { SpellEntry const *spellInfo = sSpellMgr.GetSpellEntry(id); if (spellInfo && spellInfo->SpellFamilyName == familyName && spellInfo->spellLevel <= player->getLevel()) diff --git a/src/game/Commands/Level3.cpp b/src/game/Commands/Level3.cpp index 3e1cd7b37..62b2ae344 100644 --- a/src/game/Commands/Level3.cpp +++ b/src/game/Commands/Level3.cpp @@ -3118,7 +3118,7 @@ bool ChatHandler::HandleLookupSpellCommand(char* args) uint32 counter = 0; // Counter for figure out that we found smth. // Search in Spell.dbc - for (uint32 id = 0; id < sSpellStore.GetNumRows(); id++) + for (uint32 id = 0; id < sSpellMgr.GetMaxSpellId(); id++) { SpellEntry const *spellInfo = sSpellMgr.GetSpellEntry(id); if (spellInfo) diff --git a/src/game/Commands/Nostalrius.cpp b/src/game/Commands/Nostalrius.cpp index 125930487..124d2fdbe 100644 --- a/src/game/Commands/Nostalrius.cpp +++ b/src/game/Commands/Nostalrius.cpp @@ -58,326 +58,6 @@ #define MAX_SPELL_EFFECTS 3 -bool ChatHandler::HandleDbcExportSpellCommand(char *args) -{ - DEBUG_LOG("Debut exportation des DBC"); - - /* Spell */ - std::string query = ""; - std::string table = ""; - std::stringstream oss; - std::stringstream tblstruct; - uint32 count = 0; - uint32 curr = 0; - uint32 nbQueries = 0; - int loc = GetSessionDbcLocale(); - std::string spellName = ""; - std::string spellRank = ""; - tblstruct << "DROP TABLE IF EXISTS spell_dbc;\n"; - tblstruct << "CREATE TABLE spell_dbc ("; - for (uint32 id = 0; id < sSpellStore.GetNumRows(); id++) - { - SpellEntry const *spell = sSpellMgr.GetSpellEntry(id); - if (!spell) - continue; - curr++; - count++; - if (curr == 1) - { - // Premier - if (count != 1) - oss << ");\n\n"; - oss << "INSERT INTO spell_dbc VALUES\n("; - nbQueries++; - } - else - oss << "),\n("; - - oss << spell->Id << ","; - if (count == 1) tblstruct << "`Id` int(10) unsigned NOT NULL default '0',\n"; - oss << spell->Category << ","; - if (count == 1) tblstruct << "`Category` int(10) unsigned NOT NULL default '0',\n"; - oss << spell->Dispel << ","; - if (count == 1) tblstruct << "`Dispel` int(10) unsigned NOT NULL default '0',\n"; - oss << spell->Mechanic << ","; - if (count == 1) tblstruct << "`Mechanic` int(10) unsigned NOT NULL default '0',\n"; - oss << spell->Targets << ","; - if (count == 1) tblstruct << "`Targets` int(10) unsigned NOT NULL default '0',\n"; - oss << spell->TargetCreatureType << ","; - if (count == 1) tblstruct << "`TargetCreatureType` int(10) unsigned NOT NULL default '0',\n"; - oss << spell->procChance << ","; - if (count == 1) tblstruct << "`procChance` int(10) unsigned NOT NULL default '0',\n"; - oss << spell->maxLevel << ","; - if (count == 1) tblstruct << "`maxLevel` int(10) unsigned NOT NULL default '0',\n"; - oss << spell->baseLevel << ","; - if (count == 1) tblstruct << "`baseLevel` int(10) unsigned NOT NULL default '0',\n"; - oss << spell->spellLevel << ","; - if (count == 1) tblstruct << "`spellLevel` int(10) unsigned NOT NULL default '0',\n"; - oss << spell->DurationIndex << ","; - if (count == 1) tblstruct << "`DurationIndex` int(10) unsigned NOT NULL default '0',\n"; - oss << spell->powerType << ","; - if (count == 1) tblstruct << "`powerType` int(10) unsigned NOT NULL default '0',\n"; - - oss << spell->manaCost << ","; - if (count == 1) tblstruct << "`manaCost` int(10) unsigned NOT NULL default '0',\n"; - oss << spell->manaCostPerlevel << ","; - if (count == 1) tblstruct << "`manaCostPerlevel` int(10) unsigned NOT NULL default '0',\n"; - oss << spell->manaPerSecond << ","; - if (count == 1) tblstruct << "`manaPerSecond` int(10) unsigned NOT NULL default '0',\n"; - oss << spell->manaPerSecondPerLevel << ","; - if (count == 1) tblstruct << "`manaPerSecondPerLevel` int(10) unsigned NOT NULL default '0',\n"; - oss << spell->rangeIndex << ","; - if (count == 1) tblstruct << "`rangeIndex` int(10) unsigned NOT NULL default '0',\n"; - oss << spell->speed << ","; - if (count == 1) tblstruct << "`speed` float NOT NULL default '0',\n"; - - oss << spell->StackAmount << ","; - if (count == 1) tblstruct << "`StackAmount` int(10) unsigned NOT NULL default '0',\n"; - oss << spell->SpellIconID << ","; - if (count == 1) tblstruct << "`SpellIconID` int(10) unsigned NOT NULL default '0',\n"; - oss << spell->activeIconID << ","; - if (count == 1) tblstruct << "`activeIconID` int(10) unsigned NOT NULL default '0',\n"; - - /* Anti Injection SQL*/ - spellName = spell->SpellName[loc]; - spellRank = spell->Rank[loc]; - - CharacterDatabase.escape_string(spellName); - CharacterDatabase.escape_string(spellRank); - - oss << "\"" << spellName << "\","; - if (count == 1) tblstruct << "`SpellName` varchar(255) NOT NULL,\n"; - oss << "\"" << spellRank << "\","; - if (count == 1) tblstruct << "`Rank` varchar(255) NOT NULL,\n"; - oss << spell->ManaCostPercentage << ","; - if (count == 1) tblstruct << "`ManaCostPercentage` int(10) unsigned NOT NULL default '0',\n"; - oss << spell->StartRecoveryCategory << ","; - if (count == 1) tblstruct << "`StartRecoveryCategory` int(10) unsigned NOT NULL default '0',\n"; - - oss << spell->StartRecoveryTime << ","; - if (count == 1) tblstruct << "`StartRecoveryTime` int(10) unsigned NOT NULL default '0',\n"; - oss << spell->MaxTargetLevel << ","; - if (count == 1) tblstruct << "`MaxTargetLevel` int(10) unsigned NOT NULL default '0',\n"; - oss << spell->SpellFamilyName << ","; - if (count == 1) tblstruct << "`SpellFamilyName` int(10) unsigned NOT NULL default '0',\n"; - - if (count == 1) tblstruct << "SpellFamilyFlags int(64) unsigned NOT NULL DEFAULT '0',"; - oss << spell->SpellFamilyFlags << ","; - - - oss << spell->MaxAffectedTargets << ","; - if (count == 1) tblstruct << "`MaxAffectedTargets` int(10) unsigned NOT NULL default '0',\n"; - oss << spell->DmgClass << ","; - if (count == 1) tblstruct << "`DmgClass` int(10) unsigned NOT NULL default '0',\n"; - - oss << spell->PreventionType;// << ","; - if (count == 1) tblstruct << "`PreventionType` int(10) unsigned NOT NULL default '0',\n"; - - if (curr >= 100) - curr = 0; - } - oss << ");\n\n-- Data END"; - tblstruct << "PRIMARY KEY (`Id`)\n"; - tblstruct << ") ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Spell.dbc entries';"; - - query = oss.str(); - table = tblstruct.str(); - FILE* f = fopen("dbc_export.sql", "w"); - if (!f) - { - sLog.outError("Impossible d'ouvrir le fichier en ecriture."); - return false; - } - fputs("-- Structure\n", f); - fputs(table.c_str(), f); - fputs("\n-- Fin structure\n", f); - fputs("-- Data\n\n", f); - fputs(query.c_str(), f); - fclose(f); - sLog.outString("%u sorts exportes en %u requetes.", count, nbQueries); - sLog.outString(table.c_str()); - return true; -} - -bool ChatHandler::HandleDbcExportSpellEffectsCommand(char *args) -{ - sLog.outString("Debut exportation des DBC"); - uint32 uiExportOnlySpell = 0; - char* sSpellId = strtok((char*)args, " "); - if (sSpellId) - uiExportOnlySpell = uint32(atoi(sSpellId)); - - /* Spell */ - std::string query = ""; - std::string table = ""; - std::stringstream oss; - std::stringstream tblstruct; - std::stringstream fields; - uint32 count = 0; - uint32 curr = 0; - uint32 nbQueries = 0; - int loc = GetSessionDbcLocale(); - std::string spellName = ""; - std::string spellRank = ""; - - tblstruct << "DROP TABLE IF EXISTS spell_effect_mod;\n"; - tblstruct << "CREATE TABLE spell_effect_mod (\n"; - - tblstruct << "`Id` int(10) unsigned NOT NULL default '0',\n"; - fields << "Id"; - tblstruct << "`EffectIndex` int(3) unsigned NOT NULL default '0',\n"; - fields << "," << "EffectIndex"; - tblstruct << "`Effect` int(3) unsigned NOT NULL default '0',\n"; - fields << "," << "Effect"; - tblstruct << "`EffectDieSides` int(10) NOT NULL default '0',\n"; - fields << "," << "EffectDieSides"; - tblstruct << "`EffectBaseDice` int(10) NOT NULL default '0',\n"; - fields << "," << "EffectBaseDice"; - tblstruct << "`EffectDicePerLevel` float NOT NULL default '0',\n"; - fields << "," << "EffectDicePerLevel"; - tblstruct << "`EffectRealPointsPerLevel` float NOT NULL default '0',\n"; - fields << "," << "EffectRealPointsPerLevel"; - tblstruct << "`EffectBasePoints` int(10) NOT NULL default '0',\n"; - fields << "," << "EffectBasePoints"; - - tblstruct << "`EffectMechanic` int(10) unsigned NOT NULL default '0',\n"; - fields << "," << "EffectMechanic"; - tblstruct << "`EffectImplicitTargetA` int(10) unsigned NOT NULL default '0',\n"; - fields << "," << "EffectImplicitTargetA"; - tblstruct << "`EffectImplicitTargetB` int(10) unsigned NOT NULL default '0',\n"; - fields << "," << "EffectImplicitTargetB"; - tblstruct << "`EffectRadiusIndex` int(10) unsigned NOT NULL default '0',\n"; - fields << "," << "EffectRadiusIndex"; - tblstruct << "`EffectApplyAuraName` int(10) unsigned NOT NULL default '0',\n"; - fields << "," << "EffectApplyAuraName"; - tblstruct << "`EffectAmplitude` int(10) unsigned NOT NULL default '0',\n"; - fields << "," << "EffectAmplitude"; - - tblstruct << "`EffectMultipleValue` float NOT NULL default '0',\n"; - fields << "," << "EffectMultipleValue"; - tblstruct << "`EffectChainTarget` int(10) unsigned NOT NULL default '0',\n"; - fields << "," << "EffectChainTarget"; - tblstruct << "`EffectItemType` int(10) unsigned NOT NULL default '0',\n"; - fields << "," << "EffectItemType"; - tblstruct << "`EffectMiscValue` int(10) NOT NULL default '0',\n"; - fields << "," << "EffectMiscValue"; -#ifdef WOTLK - tblstruct << "`EffectMiscValueB` int(10) NOT NULL default '0',\n"; - fields << "," << "EffectMiscValueB"; -#endif - tblstruct << "`EffectTriggerSpell` int(10) unsigned NOT NULL default '0',\n"; - fields << "," << "EffectTriggerSpell"; - - tblstruct << "`EffectPointsPerComboPoint` float NOT NULL default '0',\n"; - fields << "," << "EffectPointsPerComboPoint"; -#ifdef WOTLK - tblstruct << "`EffectSpellClassMask` int(10) unsigned NOT NULL default '0',\n"; - fields << "," << "EffectSpellClassMask"; -#endif - fields << "," "Comment"; - tblstruct << "PRIMARY KEY (`Id`, `EffectIndex`)\n"; - tblstruct << ") ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Spell.dbc entries';"; - - for (uint32 id = 0; id < sSpellStore.GetNumRows(); id++) - { - if (uiExportOnlySpell && id != uiExportOnlySpell) - continue; - - SpellEntry const *spell = sSpellMgr.GetSpellEntry(id); - if (!spell) - continue; - - /* Spell Effects */ - for (uint8 eff = 0; eff < MAX_SPELL_EFFECTS; ++eff) - { - if (!uiExportOnlySpell && spell->Effect[eff] == 0) - continue; - - if (curr == 0) - { - // Premier - if (count != 0) - oss << ";\n\n"; - - oss << "REPLACE INTO spell_effect_mod (" << fields.str() << ") VALUES\n"; - nbQueries++; - } - else - oss << ","; - - oss << "("; - oss << spell->Id << ","; - oss << uint32(eff) << ","; - oss << spell->Effect[eff] << ","; - oss << spell->EffectDieSides[eff] << ","; - oss << spell->EffectBaseDice[eff] << ","; - oss << "'" << spell->EffectDicePerLevel[eff] << "',"; - oss << "'" << spell->EffectRealPointsPerLevel[eff] << "',"; - oss << spell->EffectBasePoints[eff] << ","; - - oss << spell->EffectMechanic[eff] << ","; - oss << spell->EffectImplicitTargetA[eff] << ","; - oss << spell->EffectImplicitTargetB[eff] << ","; - - oss << spell->EffectRadiusIndex[eff] << ","; - oss << spell->EffectApplyAuraName[eff] << ","; - oss << spell->EffectAmplitude[eff] << ","; - - oss << spell->EffectMultipleValue[eff] << ","; - oss << spell->EffectChainTarget[eff] << ","; - oss << spell->EffectItemType[eff] << ","; - oss << spell->EffectMiscValue[eff] << ","; - -#ifdef WOTLK - oss << spell->EffectMiscValueB[eff] << ","; -#endif - oss << spell->EffectTriggerSpell[eff] << ","; - - oss << "'" << spell->EffectPointsPerComboPoint[eff] << "'"; - -#ifdef WOTLK - oss << "," << spell->EffectSpellClassMask[eff] << ""; -#endif - if (uiExportOnlySpell) - oss << ",'Ajoute automatiquement'"; - - oss << ""; - oss << ")"; - curr++; - count++; - } - - if (curr >= 100) - curr = 0; - } - // Exportation de seulement un sort. - if (uiExportOnlySpell) - { - sLog.outString("%s", oss.str().c_str()); - SendSysMessage(" -> OK"); - return true; - } - oss << ";\n\n-- Data END"; - - query = oss.str(); - table = tblstruct.str(); - FILE* f = fopen("spell_effects.sql", "w"); - if (!f) - { - sLog.outError("Impossible d'ouvrir le fichier en ecriture."); - return false; - } - fputs("-- Structure\n", f); - fputs(table.c_str(), f); - fputs("\n-- Fin structure\n", f); - fputs("-- Data\n\n", f); - fputs(query.c_str(), f); - fclose(f); - sLog.outString("%u effets exportes en %u requetes.", count, nbQueries); - sLog.outString(table.c_str()); - return true; -} - bool ChatHandler::HandleHonorDebugScoresCommand(char *args) { /*uint32 BeginFlushHonorDate = sWorld.GetDateToday() - 7; // Il y a une semaine @@ -1742,7 +1422,7 @@ bool ChatHandler::HandleSpellInfosCommand(char *args) PSendSysMessage("Attributes0x%x:Ex[0x%x:0x%x:0x%x:0x%x]", pSpell->Attributes, pSpell->AttributesEx, pSpell->AttributesEx2, pSpell->AttributesEx3, pSpell->AttributesEx4); PSendSysMessage("RequiresSpellFocus%u:StackAmount%u", pSpell->RequiresSpellFocus, pSpell->StackAmount); PSendSysMessage("SpellIconID%u:SpellVisual%u:activeIconID%u", pSpell->SpellIconID, pSpell->SpellVisual, pSpell->activeIconID); - PSendSysMessage("SpellFamilyName%u:SpellFamilyFlags0x%llx", pSpell->SpellFamilyName, pSpell->SpellFamilyFlags.Flags); + PSendSysMessage("SpellFamilyName%u:SpellFamilyFlags0x%llx", pSpell->SpellFamilyName, pSpell->SpellFamilyFlags); PSendSysMessage("MaxTargetLevel%u:DmgClass%u:rangeIndex%u", pSpell->MaxTargetLevel, pSpell->DmgClass, pSpell->rangeIndex); PSendSysMessage("procChance%u:procFlags0x%x:procCharges%u", pSpell->procChance, pSpell->procFlags, pSpell->procCharges); PSendSysMessage("InterruptFlags0x%x:AuraInterruptFlags0x%x:PreventionType%x:spellLevel%u", pSpell->InterruptFlags, pSpell->AuraInterruptFlags, pSpell->PreventionType, pSpell->spellLevel); @@ -1765,7 +1445,7 @@ bool ChatHandler::HandleSpellSearchCommand(char *args) PSendSysMessage("* Results for SpellFamilyName %u and SpellFamilyFlags & 0x%x", familyName, familyFlags); LocaleConstant loc = GetSessionDbcLocale(); SpellEntry const* pSpell = NULL; - for (uint32 id = 0; id < sSpellStore.GetNumRows(); ++id) + for (uint32 id = 0; id < sSpellMgr.GetMaxSpellId(); ++id) { pSpell = sSpellMgr.GetSpellEntry(id); if (!pSpell) diff --git a/src/game/Commands/debugcmds.cpp b/src/game/Commands/debugcmds.cpp index 816a52418..7d393965f 100644 --- a/src/game/Commands/debugcmds.cpp +++ b/src/game/Commands/debugcmds.cpp @@ -89,7 +89,7 @@ bool ChatHandler::HandleDebugSendNextChannelSpellVisualCommand(char *args) } uint32 id = 0; SpellEntry const *spellInfo = NULL; - for (id = uiPlayId + 1; id <= sSpellStore.GetNumRows(); id++) + for (id = uiPlayId + 1; id <= sSpellMgr.GetMaxSpellId(); id++) { spellInfo = sSpellMgr.GetSpellEntry(id); if (!spellInfo || uiPlayId >= spellInfo->Id || !spellInfo->SpellVisual || !IsChanneledSpell(spellInfo)) @@ -97,7 +97,7 @@ bool ChatHandler::HandleDebugSendNextChannelSpellVisualCommand(char *args) else break; } - if (id && id <= sSpellStore.GetNumRows()) + if (id && id <= sSpellMgr.GetMaxSpellId()) { WorldPacket data(MSG_CHANNEL_START, (4 + 4)); data << uint32(id); @@ -107,7 +107,7 @@ bool ChatHandler::HandleDebugSendNextChannelSpellVisualCommand(char *args) PSendSysMessage("Playing channel visual of spell %u %s %s", id, spellInfo->SpellName[0], spellInfo->Rank[0]); return true; } - PSendSysMessage("Spell Id range 0 to %u, -1 to stop animation", sSpellStore.GetNumRows()); + PSendSysMessage("Spell Id range 0 to %u, -1 to stop animation", sSpellMgr.GetMaxSpellId()); return true; } @@ -118,7 +118,7 @@ bool ChatHandler::HandleSendSpellChannelVisualCommand(char *args) if (playIdStr) uiPlayId = int32(atoi(playIdStr)); - if (uiPlayId && uiPlayId <= sSpellStore.GetNumRows()) + if (uiPlayId && uiPlayId <= sSpellMgr.GetMaxSpellId()) { WorldPacket data(MSG_CHANNEL_START, (4 + 4)); data << uint32(uiPlayId); @@ -138,7 +138,7 @@ bool ChatHandler::HandleSendSpellChannelVisualCommand(char *args) PSendSysMessage("Sending channel stop"); return true; } - PSendSysMessage("Spell Id range 1 to %u, 0 to stop animation", sSpellStore.GetNumRows()); + PSendSysMessage("Spell Id range 1 to %u, 0 to stop animation", sSpellMgr.GetMaxSpellId()); return true; } diff --git a/src/game/Database/DBCStores.cpp b/src/game/Database/DBCStores.cpp index 6178200e9..fe78baf3a 100644 --- a/src/game/Database/DBCStores.cpp +++ b/src/game/Database/DBCStores.cpp @@ -97,7 +97,6 @@ SkillRaceClassInfoMap SkillRaceClassInfoBySkill; DBCStorage sSoundEntriesStore(SoundEntriesfmt); DBCStorage sSpellItemEnchantmentStore(SpellItemEnchantmentfmt); -DBCStorage sSpellStore(SpellEntryfmt); SpellCategoryStore sSpellCategoryStore; PetFamilySpellsStore sPetFamilySpellsStore; @@ -259,18 +258,11 @@ void LoadDBCStores(const std::string& dataPath) LoadDBC(availableDbcLocales, bar, bad_dbc_files, sSkillLineAbilityStore, dbcPath, "SkillLineAbility.dbc"); LoadDBC(availableDbcLocales, bar, bad_dbc_files, sSkillRaceClassInfoStore, dbcPath, "SkillRaceClassInfo.dbc"); LoadDBC(availableDbcLocales, bar, bad_dbc_files, sSoundEntriesStore, dbcPath, "SoundEntries.dbc"); - LoadDBC(availableDbcLocales, bar, bad_dbc_files, sSpellStore, dbcPath, "Spell.dbc"); - for (uint32 i = 1; i < sSpellStore.GetNumRows(); ++i) + for (uint32 i = 1; i < sSpellMgr.GetMaxSpellId(); ++i) { - DBCSpellEntry const * spell = sSpellStore.LookupEntry(i); + SpellEntry const * spell = sSpellMgr.GetSpellEntry(i); if (spell && spell->Category) sSpellCategoryStore[spell->Category].insert(i); - - // DBC not support uint64 fields but SpellEntry have SpellFamilyFlags mapped at 2 uint32 fields - // uint32 field already converted to bigendian if need, but must be swapped for correct uint64 bigendian view -#if MANGOS_ENDIAN == MANGOS_BIGENDIAN - std::swap(*((uint32*)(&spell->SpellFamilyFlags)), *(((uint32*)(&spell->SpellFamilyFlags)) + 1)); -#endif } for (uint32 j = 0; j < sSkillLineAbilityStore.GetNumRows(); ++j) @@ -282,7 +274,7 @@ void LoadDBCStores(const std::string& dataPath) if (skillLine->learnOnGetSkill != ABILITY_LEARNED_ON_GET_RACE_OR_CLASS_SKILL) continue; - DBCSpellEntry const* spellInfo = sSpellStore.LookupEntry(skillLine->spellId); + SpellEntry const* spellInfo = sSpellMgr.GetSpellEntry(skillLine->spellId); if (!spellInfo || !(spellInfo->Attributes & SPELL_ATTR_PASSIVE)) continue; @@ -418,8 +410,8 @@ void LoadDBCStores(const std::string& dataPath) // include existing nodes that have at least single not spell base (scripted) path { std::set spellPaths; - for (uint32 i = 1; i < sSpellStore.GetNumRows(); ++i) - if (DBCSpellEntry const* sInfo = sSpellStore.LookupEntry(i)) + for (uint32 i = 1; i < sSpellMgr.GetMaxSpellId(); ++i) + if (SpellEntry const* sInfo = sSpellMgr.GetSpellEntry(i)) for (int j = 0; j < MAX_EFFECT_INDEX; ++j) if (sInfo->Effect[j] == 123 /*SPELL_EFFECT_SEND_TAXI*/) spellPaths.insert(sInfo->EffectMiscValue[j]); @@ -490,8 +482,7 @@ void LoadDBCStores(const std::string& dataPath) } // Check loaded DBC files proper version - if (!sSpellStore.LookupEntry(33392) || - !sSkillLineAbilityStore.LookupEntry(15030)) + if (!sSkillLineAbilityStore.LookupEntry(15030)) { sLog.outError("\nYou have _outdated_ DBC files. Please re-extract DBC files for one from client build: %s", AcceptableClientBuildsListStr().c_str()); Log::WaitBeforeContinueIfNeed(); @@ -721,10 +712,6 @@ MANGOS_DLL_SPEC DBCStorage const* GetSoundEntriesStore() { return &sSoundEntriesStore; } -MANGOS_DLL_SPEC DBCStorage const* GetSpellStore() -{ - return &sSpellStore; -} MANGOS_DLL_SPEC DBCStorage const* GetSpellRangeStore() { return &sSpellRangeStore; diff --git a/src/game/Database/DBCStores.h b/src/game/Database/DBCStores.h index 531842e51..7842719d9 100644 --- a/src/game/Database/DBCStores.h +++ b/src/game/Database/DBCStores.h @@ -106,7 +106,6 @@ extern PetFamilySpellsStore sPetFamilySpellsStore; extern DBCStorage sSpellRadiusStore; extern DBCStorage sSpellRangeStore; extern DBCStorage sSpellShapeshiftFormStore; -extern DBCStorage sSpellStore; extern DBCStorage sStableSlotPricesStore; extern DBCStorage sTalentStore; extern DBCStorage sTalentTabStore; @@ -124,7 +123,6 @@ void LoadDBCStores(const std::string& dataPath); // script support functions MANGOS_DLL_SPEC DBCStorage const* GetSoundEntriesStore(); -MANGOS_DLL_SPEC DBCStorage const* GetSpellStore(); MANGOS_DLL_SPEC DBCStorage const* GetSpellRangeStore(); MANGOS_DLL_SPEC DBCStorage const* GetFactionStore(); MANGOS_DLL_SPEC DBCStorage const* GetCreatureDisplayStore(); diff --git a/src/game/Database/DBCStructure.h b/src/game/Database/DBCStructure.h index 5b5524da1..549b30811 100644 --- a/src/game/Database/DBCStructure.h +++ b/src/game/Database/DBCStructure.h @@ -628,109 +628,6 @@ struct ClassFamilyMask #define MAX_SPELL_REAGENTS 8 #define MAX_SPELL_TOTEMS 2 -// Cf SpellEntry.h -// Cette structure sert uniquement a charger les DBCs. -struct DBCSpellEntry -{ - uint32 Id; // 0 normally counted from 0 field (but some tools start counting from 1, check this before tool use for data view!) - uint32 School; // 1 not schoolMask from 2.x - just school type so everything linked with SpellEntry::SchoolMask must be rewrited - uint32 Category; // 2 - uint32 castUI; // 3 not used - uint32 Dispel; // 4 - uint32 Mechanic; // 5 - uint32 Attributes; // 6 - uint32 AttributesEx; // 7 - uint32 AttributesEx2; // 8 - uint32 AttributesEx3; // 9 - uint32 AttributesEx4; // 10 - uint32 Stances; // 11 - uint32 StancesNot; // 12 - uint32 Targets; // 13 - uint32 TargetCreatureType; // 14 - uint32 RequiresSpellFocus; // 15 - uint32 CasterAuraState; // 16 - uint32 TargetAuraState; // 17 - uint32 CastingTimeIndex; // 18 - uint32 RecoveryTime; // 19 - uint32 CategoryRecoveryTime; // 20 - uint32 InterruptFlags; // 21 - uint32 AuraInterruptFlags; // 22 - uint32 ChannelInterruptFlags; // 23 - uint32 procFlags; // 24 - uint32 procChance; // 25 - uint32 procCharges; // 26 - uint32 maxLevel; // 27 - uint32 baseLevel; // 28 - uint32 spellLevel; // 29 - uint32 DurationIndex; // 30 - uint32 powerType; // 31 - uint32 manaCost; // 32 - uint32 manaCostPerlevel; // 33 - uint32 manaPerSecond; // 34 - uint32 manaPerSecondPerLevel; // 35 - uint32 rangeIndex; // 36 - float speed; // 37 - uint32 modalNextSpell; // 38 not used - uint32 StackAmount; // 39 - uint32 Totem[MAX_SPELL_TOTEMS]; // 40-41 - int32 Reagent[MAX_SPELL_REAGENTS]; // 42-49 - uint32 ReagentCount[MAX_SPELL_REAGENTS]; // 50-57 - int32 EquippedItemClass; // 58 (value) - int32 EquippedItemSubClassMask; // 59 (mask) - int32 EquippedItemInventoryTypeMask; // 60 (mask) - uint32 Effect[MAX_EFFECT_INDEX]; // 61-63 - int32 EffectDieSides[MAX_EFFECT_INDEX]; // 64-66 - uint32 EffectBaseDice[MAX_EFFECT_INDEX]; // 67-69 - float EffectDicePerLevel[MAX_EFFECT_INDEX]; // 70-72 - float EffectRealPointsPerLevel[MAX_EFFECT_INDEX]; // 73-75 - int32 EffectBasePoints[MAX_EFFECT_INDEX]; // 76-78 (don't must be used in spell/auras explicitly, must be used cached Spell::m_currentBasePoints) - uint32 EffectMechanic[MAX_EFFECT_INDEX]; // 79-81 - uint32 EffectImplicitTargetA[MAX_EFFECT_INDEX]; // 82-84 - uint32 EffectImplicitTargetB[MAX_EFFECT_INDEX]; // 85-87 - uint32 EffectRadiusIndex[MAX_EFFECT_INDEX]; // 88-90 - spellradius.dbc - uint32 EffectApplyAuraName[MAX_EFFECT_INDEX]; // 91-93 - uint32 EffectAmplitude[MAX_EFFECT_INDEX]; // 94-96 - float EffectMultipleValue[MAX_EFFECT_INDEX]; // 97-99 - uint32 EffectChainTarget[MAX_EFFECT_INDEX]; // 100-102 - uint32 EffectItemType[MAX_EFFECT_INDEX]; // 103-105 - int32 EffectMiscValue[MAX_EFFECT_INDEX]; // 106-108 - uint32 EffectTriggerSpell[MAX_EFFECT_INDEX]; // 109-111 - float EffectPointsPerComboPoint[MAX_EFFECT_INDEX]; // 112-114 - uint32 SpellVisual; // 115 - uint32 SpellVisual2; // 116 not used - uint32 SpellIconID; // 117 - uint32 activeIconID; // 118 - uint32 spellPriority; // 119 - char* SpellName[8]; // 120-127 - uint32 SpellNameFlag; // 128 - char* Rank[8]; // 129-136 - // (Nostalrius) - uint32 Custom; //RankFlags; // 137 - //char* Description[8]; // 138-145 not used - //uint32 DescriptionFlags; // 146 not used - //char* ToolTip[8]; // 147-154 not used - //uint32 ToolTipFlags; // 155 not used - uint32 ManaCostPercentage; // 156 - uint32 StartRecoveryCategory; // 157 - uint32 StartRecoveryTime; // 158 - uint32 MaxTargetLevel; // 159 - uint32 SpellFamilyName; // 160 - ClassFamilyMask SpellFamilyFlags; // 161+162 - uint32 MaxAffectedTargets; // 163 - uint32 DmgClass; // 164 defenseType - uint32 PreventionType; // 165 - //uint32 StanceBarOrder; // 166 not used - float DmgMultiplier[MAX_EFFECT_INDEX]; // 167-169 - //uint32 MinFactionId; // 170 not used, and 0 in 2.4.2 - //uint32 MinReputation; // 171 not used, and 0 in 2.4.2 - //uint32 RequiredAuraVision; // 172 not used - - // prevent creating custom entries (copy data from original in fact) - DBCSpellEntry(DBCSpellEntry const&); // DON'T must have implementation - - DBCSpellEntry() {} -}; - struct SpellCastTimesEntry { uint32 ID; // 0 m_ID diff --git a/src/game/Database/DBCfmt.h b/src/game/Database/DBCfmt.h index 80545d2d3..9f58c00ed 100644 --- a/src/game/Database/DBCfmt.h +++ b/src/game/Database/DBCfmt.h @@ -59,7 +59,6 @@ const char SkillRaceClassInfofmt[]="diiiiixx"; const char SoundEntriesfmt[]="nxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; const char SpellCastTimefmt[]="nixx"; const char SpellDurationfmt[]="niii"; -const char SpellEntryfmt[]="niiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiifiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiffffffiiiiiiiiiiiiiiiiiiiiifffiiiiiiiiiiiifffiiiiissssssssissssssssixxxxxxxxxxxxxxxxxxiiiiiiiiiixfffxxx"; const char SpellFocusObjectfmt[]="nxxxxxxxxx"; const char SpellItemEnchantmentfmt[]="niiiiiixxxiiissssssssxii"; const char SpellRadiusfmt[]="nfxx"; diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index 28b1a94ad..5f0e191c3 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -4160,7 +4160,7 @@ void ObjectMgr::LoadQuests() } // check QUEST_SPECIAL_FLAG_EXPLORATION_OR_EVENT for spell with SPELL_EFFECT_QUEST_COMPLETE - for (uint32 i = 0; i < sSpellStore.GetNumRows(); ++i) + for (uint32 i = 0; i < sSpellMgr.GetMaxSpellId(); ++i) { SpellEntry const *spellInfo = sSpellMgr.GetSpellEntry(i); if (!spellInfo) @@ -4437,7 +4437,7 @@ void ObjectMgr::LoadPetCreateSpells() // cache spell->learn spell map for use in next loop std::map learnCache; - for (uint32 spell_id = 1; spell_id < sSpellStore.GetNumRows(); ++spell_id) + for (uint32 spell_id = 1; spell_id < sSpellMgr.GetMaxSpellId(); ++spell_id) { SpellEntry const *spellproto = sSpellMgr.GetSpellEntry(spell_id); if (!spellproto) @@ -7932,7 +7932,7 @@ void ObjectMgr::LoadTrainers(char const* tableName, bool isTemplates) if (spellinfo->Effect[0] != SPELL_EFFECT_LEARN_SPELL) { sLog.outErrorDb("Table `%s` for trainer (Entry: %u) has non-learning spell %u, ignore", tableName, entry, spell); - for (uint32 spell2 = 1; spell2 < sSpellStore.GetNumRows(); ++spell2) + for (uint32 spell2 = 1; spell2 < sSpellMgr.GetMaxSpellId(); ++spell2) { if (SpellEntry const* spellEntry2 = sSpellMgr.GetSpellEntry(spell2)) { @@ -9765,7 +9765,7 @@ bool PlayerCondition::IsValid(uint16 entry, ConditionType condition, uint32 valu case CONDITION_AURA: case CONDITION_SOURCE_AURA: { - if (!sSpellStore.LookupEntry(value1)) + if (!sSpellMgr.GetSpellEntry(value1)) { sLog.outErrorDb("Aura condition (entry %u, type %u) requires to have non existing spell (Id: %d), skipped", entry, condition, value1); return false; @@ -9890,7 +9890,7 @@ bool PlayerCondition::IsValid(uint16 entry, ConditionType condition, uint32 valu } case CONDITION_NO_AURA: { - if (!sSpellStore.LookupEntry(value1)) + if (!sSpellMgr.GetSpellEntry(value1)) { sLog.outErrorDb("Aura condition (entry %u, type %u) requires to have non existing spell (Id: %d), skipped", entry, condition, value1); return false; @@ -9960,7 +9960,7 @@ bool PlayerCondition::IsValid(uint16 entry, ConditionType condition, uint32 valu } case CONDITION_SPELL: { - if (!sSpellStore.LookupEntry(value1)) + if (!sSpellMgr.GetSpellEntry(value1)) { sLog.outErrorDb("Spell condition (entry %u, type %u) requires to have non existing spell (Id: %d), skipped", entry, condition, value1); return false; diff --git a/src/game/Objects/Player.cpp b/src/game/Objects/Player.cpp index 2a1b9a2ce..05e74ed2a 100644 --- a/src/game/Objects/Player.cpp +++ b/src/game/Objects/Player.cpp @@ -16843,12 +16843,12 @@ void Player::SendSpellMod(SpellModifier const* mod) for (int eff = 0; eff < 64; ++eff) { uint64 _mask = uint64(1) << eff; - if (mod->mask.IsFitToFamilyMask(_mask)) + if (!!(mod->mask & _mask)) { int32 val = 0; for (SpellModList::const_iterator itr = m_spellMods[mod->op].begin(); itr != m_spellMods[mod->op].end(); ++itr) { - if ((*itr)->type == mod->type && ((*itr)->mask.IsFitToFamilyMask(_mask))) + if ((*itr)->type == mod->type && !!((*itr)->mask & _mask)) val += (*itr)->value; } WorldPacket data(Opcode, (1 + 1 + 4)); diff --git a/src/game/Objects/Player.h b/src/game/Objects/Player.h index 8d83edfd4..b09a2c026 100644 --- a/src/game/Objects/Player.h +++ b/src/game/Objects/Player.h @@ -122,10 +122,6 @@ struct SpellModifier : op(_op), type(_type), charges(_charges), value(_value), mask(_mask), spellId(_spellId), ownerAura(NULL) {} - SpellModifier(SpellModOp _op, SpellModType _type, int32 _value, uint32 _spellId, ClassFamilyMask _mask, int16 _charges = 0) - : op(_op), type(_type), charges(_charges), value(_value), mask(_mask), spellId(_spellId), ownerAura(NULL) - {} - SpellModifier(SpellModOp _op, SpellModType _type, int32 _value, SpellEntry const* spellEntry, SpellEffectIndex eff, int16 _charges = 0); SpellModifier(SpellModOp _op, SpellModType _type, int32 _value, Aura* aura, int16 _charges = 0); @@ -136,7 +132,7 @@ struct SpellModifier SpellModType type : 8; int16 charges : 16; // 0 = infini, negatif = plus de charge. int32 value; - ClassFamilyMask mask; + uint64 mask; uint32 spellId; Aura* ownerAura; }; diff --git a/src/game/ScriptMgr.cpp b/src/game/ScriptMgr.cpp index 8f58b2c04..d20c87afd 100644 --- a/src/game/ScriptMgr.cpp +++ b/src/game/ScriptMgr.cpp @@ -1894,16 +1894,16 @@ void ScriptMgr::FillSpellSummary() { delete[] m_spellSummary; - m_spellSummary = new TSpellSummary[sSpellStore.GetNumRows()]; + m_spellSummary = new TSpellSummary[sSpellMgr.GetMaxSpellId()]; - DBCSpellEntry const* pTempSpell; + SpellEntry const* pTempSpell; - for (uint32 i = 0; i < sSpellStore.GetNumRows(); ++i) + for (uint32 i = 0; i < sSpellMgr.GetMaxSpellId(); ++i) { m_spellSummary[i].Effects = 0; m_spellSummary[i].Targets = 0; - pTempSpell = sSpellStore.LookupEntry(i); + pTempSpell = sSpellMgr.GetSpellEntry(i); // This spell doesn't exist if (!pTempSpell) continue; diff --git a/src/game/Spells/Spell.cpp b/src/game/Spells/Spell.cpp index 70eae6a7d..5c02c4432 100644 --- a/src/game/Spells/Spell.cpp +++ b/src/game/Spells/Spell.cpp @@ -265,7 +265,7 @@ Spell::Spell(Unit* caster, SpellEntry const *info, bool triggered, ObjectGuid or m_immediateHandled(false), m_needSpellLog(false), m_canTrigger(false) { MANGOS_ASSERT(caster != NULL && info != NULL); - MANGOS_ASSERT(info == sSpellMgr.GetSpellEntry(info->Id) && "`info` must be pointer to sSpellStore element"); + MANGOS_ASSERT(info == sSpellMgr.GetSpellEntry(info->Id) && "`info` must be pointer to a sSpellMgr element"); m_successCast = false; m_destroyed = false; diff --git a/src/game/Spells/SpellAuras.cpp b/src/game/Spells/SpellAuras.cpp index 100c8263a..8691f765b 100644 --- a/src/game/Spells/SpellAuras.cpp +++ b/src/game/Spells/SpellAuras.cpp @@ -264,7 +264,7 @@ Aura::Aura(SpellEntry const* spellproto, SpellEffectIndex eff, int32 *currentBas m_applied(false) { MANGOS_ASSERT(target); - MANGOS_ASSERT(spellproto && spellproto == sSpellMgr.GetSpellEntry(spellproto->Id) && "`info` must be pointer to sSpellStore element"); + MANGOS_ASSERT(spellproto && spellproto == sSpellMgr.GetSpellEntry(spellproto->Id) && "`info` must be pointer to a sSpellMgr element"); ASSERT(spellproto->EffectApplyAuraName[eff]); m_currentBasePoints = currentBasePoints ? *currentBasePoints : spellproto->CalculateSimpleValue(eff); @@ -864,14 +864,14 @@ bool Aura::isAffectedOnSpell(SpellEntry const *spell) const if (spell->SpellFamilyName != GetSpellProto()->SpellFamilyName) return false; - ClassFamilyMask mask = sSpellMgr.GetSpellAffectMask(GetId(), GetEffIndex()); + uint64 mask = sSpellMgr.GetSpellAffectMask(GetId(), GetEffIndex()); return spell->IsFitToFamilyMask(mask); } bool Aura::CanProcFrom(SpellEntry const *spell, uint32 EventProcEx, uint32 procEx, bool active, bool useClassMask) const { // Check EffectClassMask (in pre-3.x stored in spell_affect in fact) - ClassFamilyMask mask = sSpellMgr.GetSpellAffectMask(GetId(), GetEffIndex()); + uint64 mask = sSpellMgr.GetSpellAffectMask(GetId(), GetEffIndex()); // Nostalrius: c'est la moindre des choses d'utiliser un peu 'spell_proc_event' non ? if (!mask) @@ -905,7 +905,7 @@ bool Aura::CanProcFrom(SpellEntry const *spell, uint32 EventProcEx, uint32 procE { // SpellFamilyName check is performed in SpellMgr::IsSpellProcEventCanTriggeredBy and it is done once for whole holder // note: SpellFamilyName is not checked if no spell_proc_event is defined - return mask.IsFitToFamilyMask(spell->SpellFamilyFlags); + return !!(mask & spell->SpellFamilyFlags); } } @@ -5900,7 +5900,7 @@ SpellAuraHolder::SpellAuraHolder(SpellEntry const* spellproto, Unit *target, Wor m_spellTriggered(false), m_AuraDRLevel(DIMINISHING_LEVEL_1) { MANGOS_ASSERT(target); - MANGOS_ASSERT(spellproto && spellproto == sSpellMgr.GetSpellEntry(spellproto->Id) && "`info` must be pointer to sSpellStore element"); + MANGOS_ASSERT(spellproto && spellproto == sSpellMgr.GetSpellEntry(spellproto->Id) && "`info` must be pointer to a sSpellMgr element"); if (!caster) m_casterGuid = target->GetObjectGuid(); @@ -6116,7 +6116,7 @@ void SpellAuraHolder::_RemoveSpellAuraHolder() // Update target aura state flag (at last aura remove) //***************************************************** uint32 removeState = 0; - ClassFamilyMask removeFamilyFlag = m_spellProto->SpellFamilyFlags; + uint64 removeFamilyFlag = m_spellProto->SpellFamilyFlags; switch (m_spellProto->SpellFamilyName) { case SPELLFAMILY_PALADIN: diff --git a/src/game/Spells/SpellEntry.cpp b/src/game/Spells/SpellEntry.cpp index eda4b68ac..411cd65bf 100644 --- a/src/game/Spells/SpellEntry.cpp +++ b/src/game/Spells/SpellEntry.cpp @@ -14,118 +14,6 @@ SpellEntry::~SpellEntry() } } -bool SpellEntry::Load(DBCSpellEntry const* dbcEntry) -{ - if (!dbcEntry) - return false; - -#define COPY_FIELD(field) field = dbcEntry->field; - -#define COPY_ARRAY(size, field) { for (int i = 0; i < size; ++i) field[i] = dbcEntry->field[i]; } - -#define COPY_CHAR_ARRAY(field)\ - {\ - for (int i = 0; i < MAX_DBC_LOCALE; ++i)\ - {\ - field[i] = NULL;\ - if (dbcEntry->field[i])\ - {\ - field[i] = new char[strlen(dbcEntry->field[i]) + 1]; \ - strcpy(field[i], dbcEntry->field[i]);\ - }\ - }\ - } - - /// Copie des champs - COPY_FIELD(Id); - COPY_FIELD(School); - COPY_FIELD(Category); - COPY_FIELD(castUI); - COPY_FIELD(Dispel); - COPY_FIELD(Mechanic); - COPY_FIELD(Attributes); - COPY_FIELD(AttributesEx); - COPY_FIELD(AttributesEx2); - COPY_FIELD(AttributesEx3); - COPY_FIELD(AttributesEx4); - COPY_FIELD(Stances); - COPY_FIELD(StancesNot); - COPY_FIELD(Targets); - COPY_FIELD(TargetCreatureType); - COPY_FIELD(RequiresSpellFocus); - COPY_FIELD(CasterAuraState); - COPY_FIELD(TargetAuraState); - COPY_FIELD(CastingTimeIndex); - COPY_FIELD(RecoveryTime); - COPY_FIELD(CategoryRecoveryTime); - COPY_FIELD(InterruptFlags); - COPY_FIELD(AuraInterruptFlags); - COPY_FIELD(ChannelInterruptFlags); - COPY_FIELD(procFlags); - COPY_FIELD(procChance); - COPY_FIELD(procCharges); - COPY_FIELD(maxLevel); - COPY_FIELD(baseLevel); - COPY_FIELD(spellLevel); - COPY_FIELD(DurationIndex); - COPY_FIELD(powerType); - COPY_FIELD(manaCost); - COPY_FIELD(manaCostPerlevel); - COPY_FIELD(manaPerSecond); - COPY_FIELD(manaPerSecondPerLevel); - COPY_FIELD(rangeIndex); - COPY_FIELD(speed); - COPY_FIELD(modalNextSpell); - COPY_FIELD(StackAmount); - COPY_ARRAY(MAX_SPELL_TOTEMS, Totem); - COPY_ARRAY(MAX_SPELL_REAGENTS, Reagent); - COPY_ARRAY(MAX_SPELL_REAGENTS, ReagentCount); - COPY_FIELD(EquippedItemClass); - COPY_FIELD(EquippedItemSubClassMask); - COPY_FIELD(EquippedItemInventoryTypeMask); - COPY_ARRAY(MAX_EFFECT_INDEX, Effect); - COPY_ARRAY(MAX_EFFECT_INDEX, EffectDieSides); - COPY_ARRAY(MAX_EFFECT_INDEX, EffectBaseDice); - COPY_ARRAY(MAX_EFFECT_INDEX, EffectDicePerLevel); - COPY_ARRAY(MAX_EFFECT_INDEX, EffectRealPointsPerLevel); - COPY_ARRAY(MAX_EFFECT_INDEX, EffectBasePoints); - COPY_ARRAY(MAX_EFFECT_INDEX, EffectMechanic); - COPY_ARRAY(MAX_EFFECT_INDEX, EffectImplicitTargetA); - COPY_ARRAY(MAX_EFFECT_INDEX, EffectImplicitTargetB); - COPY_ARRAY(MAX_EFFECT_INDEX, EffectRadiusIndex); - COPY_ARRAY(MAX_EFFECT_INDEX, EffectApplyAuraName); - COPY_ARRAY(MAX_EFFECT_INDEX, EffectAmplitude); - COPY_ARRAY(MAX_EFFECT_INDEX, EffectMultipleValue); - COPY_ARRAY(MAX_EFFECT_INDEX, EffectChainTarget); - COPY_ARRAY(MAX_EFFECT_INDEX, EffectItemType); - COPY_ARRAY(MAX_EFFECT_INDEX, EffectMiscValue); - COPY_ARRAY(MAX_EFFECT_INDEX, EffectTriggerSpell); - COPY_ARRAY(MAX_EFFECT_INDEX, EffectPointsPerComboPoint); - - COPY_FIELD(SpellVisual); - COPY_FIELD(SpellVisual2); - COPY_FIELD(SpellIconID); - COPY_FIELD(activeIconID); - COPY_FIELD(spellPriority); - COPY_CHAR_ARRAY(SpellName); - COPY_FIELD(SpellNameFlag); - COPY_CHAR_ARRAY(Rank); - COPY_FIELD(ManaCostPercentage); - COPY_FIELD(StartRecoveryCategory); - COPY_FIELD(StartRecoveryTime); - COPY_FIELD(MaxTargetLevel); - COPY_FIELD(SpellFamilyName); - COPY_FIELD(SpellFamilyFlags); - COPY_FIELD(MaxAffectedTargets); - COPY_FIELD(DmgClass); - COPY_FIELD(PreventionType); - COPY_ARRAY(MAX_EFFECT_INDEX, DmgMultiplier); - - /// Chargements supplementaires - InitCachedValues(); - return true; -} - void SpellEntry::InitCachedValues() { ComputeBinary(); diff --git a/src/game/Spells/SpellEntry.h b/src/game/Spells/SpellEntry.h index 52a31d7b9..3718fdc3f 100644 --- a/src/game/Spells/SpellEntry.h +++ b/src/game/Spells/SpellEntry.h @@ -30,21 +30,19 @@ bool IsDiminishingReturnsGroupDurationLimited(DiminishingGroup group); DiminishingReturnsType GetDiminishingReturnsGroupType(DiminishingGroup group); float GetDiminishingRate(uint32 type); - class SpellEntry { public: SpellEntry() {} ~SpellEntry(); void InitCachedValues(); - bool Load(DBCSpellEntry const* dbcEntry); /// DBC DATA: - uint32 Id; // 0 normally counted from 0 field (but some tools start counting from 1, check this before tool use for data view!) - uint32 School; // 1 not schoolMask from 2.x - just school type so everything linked with SpellEntry::SchoolMask must be rewrited + uint32 Id; // 0 + uint32 School; // 1 uint32 Category; // 2 - uint32 castUI; // 3 not used + //uint32 castUI; // 3 not used uint32 Dispel; // 4 uint32 Mechanic; // 5 uint32 Attributes; // 6 @@ -79,7 +77,7 @@ class SpellEntry uint32 manaPerSecondPerLevel; // 35 uint32 rangeIndex; // 36 float speed; // 37 - uint32 modalNextSpell; // 38 not used + //uint32 modalNextSpell; // 38 not used uint32 StackAmount; // 39 uint32 Totem[MAX_SPELL_TOTEMS]; // 40-41 int32 Reagent[MAX_SPELL_REAGENTS]; // 42-49 @@ -92,11 +90,11 @@ class SpellEntry uint32 EffectBaseDice[MAX_EFFECT_INDEX]; // 67-69 float EffectDicePerLevel[MAX_EFFECT_INDEX]; // 70-72 float EffectRealPointsPerLevel[MAX_EFFECT_INDEX]; // 73-75 - int32 EffectBasePoints[MAX_EFFECT_INDEX]; // 76-78 (don't must be used in spell/auras explicitly, must be used cached Spell::m_currentBasePoints) + int32 EffectBasePoints[MAX_EFFECT_INDEX]; // 76-78 uint32 EffectMechanic[MAX_EFFECT_INDEX]; // 79-81 uint32 EffectImplicitTargetA[MAX_EFFECT_INDEX]; // 82-84 uint32 EffectImplicitTargetB[MAX_EFFECT_INDEX]; // 85-87 - uint32 EffectRadiusIndex[MAX_EFFECT_INDEX]; // 88-90 - spellradius.dbc + uint32 EffectRadiusIndex[MAX_EFFECT_INDEX]; // 88-90 uint32 EffectApplyAuraName[MAX_EFFECT_INDEX]; // 91-93 uint32 EffectAmplitude[MAX_EFFECT_INDEX]; // 94-96 float EffectMultipleValue[MAX_EFFECT_INDEX]; // 97-99 @@ -106,25 +104,34 @@ class SpellEntry uint32 EffectTriggerSpell[MAX_EFFECT_INDEX]; // 109-111 float EffectPointsPerComboPoint[MAX_EFFECT_INDEX]; // 112-114 uint32 SpellVisual; // 115 - uint32 SpellVisual2; // 116 not used + //uint32 SpellVisual2; // 116 not used uint32 SpellIconID; // 117 uint32 activeIconID; // 118 - uint32 spellPriority; // 119 + uint32 spellPriority; // 119 char* SpellName[8]; // 120-127 - uint32 SpellNameFlag; // 128 + //uint32 SpellNameFlag; // 128 not used char* Rank[8]; // 129-136 + //uint32 RankFlags; // 137 not used + //char* Description[8]; // 138-145 not used + //uint32 DescriptionFlags; // 146 not used + //char* ToolTip[8]; // 147-154 not used + //uint32 ToolTipFlags; // 155 not used uint32 ManaCostPercentage; // 156 uint32 StartRecoveryCategory; // 157 uint32 StartRecoveryTime; // 158 uint32 MaxTargetLevel; // 159 uint32 SpellFamilyName; // 160 - ClassFamilyMask SpellFamilyFlags; // 161+162 + uint64 SpellFamilyFlags; // 161+162 uint32 MaxAffectedTargets; // 163 - uint32 DmgClass; // 164 defenseType + uint32 DmgClass; // 164 uint32 PreventionType; // 165 + //int32 StanceBarOrder; // 166 not used float DmgMultiplier[MAX_EFFECT_INDEX]; // 167-169 + //uint32 MinFactionId; // 170 not used + //uint32 MinReputation; // 171 not used + //uint32 RequiredAuraVision; // 172 not used - /// CHAMPS SUPPLEMENTAIRES + /// CUSTOM FIELDS: uint32 Custom; protected: bool _isBinary; @@ -146,7 +153,7 @@ class SpellEntry bool IsFitToFamilyMask(uint64 familyFlags) const { - return SpellFamilyFlags.IsFitToFamilyMask(familyFlags); + return !!(SpellFamilyFlags & familyFlags); } bool IsFitToFamily(SpellFamily family, uint64 familyFlags) const @@ -154,26 +161,16 @@ class SpellEntry return SpellFamily(SpellFamilyName) == family && IsFitToFamilyMask(familyFlags); } - bool IsFitToFamilyMask(ClassFamilyMask const& mask) const - { - return SpellFamilyFlags.IsFitToFamilyMask(mask); - } - - bool IsFitToFamily(SpellFamily family, ClassFamilyMask const& mask) const - { - return SpellFamily(SpellFamilyName) == family && IsFitToFamilyMask(mask); - } - template bool IsFitToFamily() const { - return SpellFamily(SpellFamilyName) == family && SpellFamilyFlags.test(); + return SpellFamily(SpellFamilyName) == family && !!(SpellFamilyFlags & BitMask::value); } template bool IsFitToFamilyMask() const { - return SpellFamilyFlags.test(); + return !!(SpellFamilyFlags & BitMask::value); } bool IsAuraAddedBySpell(uint32 auraType) const @@ -210,7 +207,23 @@ class SpellEntry uint32 GetEffectImplicitTargetBByIndex(SpellEffectIndex j) const { return EffectImplicitTargetB[j];} uint32 GetEffectApplyAuraNameByIndex(SpellEffectIndex j) const { return EffectApplyAuraName[j];} uint32 GetEffectMiscValue(SpellEffectIndex j) const { return EffectMiscValue[j];} - ClassFamilyMask GetSpellFamilyFlags() const { return SpellFamilyFlags; } + uint64 GetSpellFamilyFlags() const { return SpellFamilyFlags; } + template + struct Shift + { + static T const value = T(1) << Val; + }; + template + struct BitMask + { + static T const value = Shift::value | BitMask::value; + }; + + template + struct BitMask + { + static T const value = 0; + }; }; #endif diff --git a/src/game/Spells/SpellMgr.cpp b/src/game/Spells/SpellMgr.cpp index 19353f91f..1581d803e 100644 --- a/src/game/Spells/SpellMgr.cpp +++ b/src/game/Spells/SpellMgr.cpp @@ -1437,7 +1437,7 @@ void SpellMgr::LoadSpellProcEvents() spe.spellFamilyName = fields[2].GetUInt32(); for (int i = 0; i < MAX_EFFECT_INDEX; ++i) - spe.spellFamilyMask[i] = ClassFamilyMask(fields[3 + i].GetUInt64()); + spe.spellFamilyMask[i] = fields[3 + i].GetUInt64(); spe.procFlags = fields[6].GetUInt32(); spe.procEx = fields[7].GetUInt32(); @@ -3087,8 +3087,8 @@ void SpellMgr::LoadSpellLearnSkills() // search auto-learned skills and add its to map also for use in unlearn spells/talents uint32 dbc_count = 0; - BarGoLink bar(sSpellStore.GetNumRows()); - for (uint32 spell = 0; spell < sSpellStore.GetNumRows(); ++spell) + BarGoLink bar(sSpellMgr.GetMaxSpellId()); + for (uint32 spell = 0; spell < sSpellMgr.GetMaxSpellId(); ++spell) { bar.step(); SpellEntry const* entry = sSpellMgr.GetSpellEntry(spell); @@ -3180,7 +3180,7 @@ void SpellMgr::LoadSpellLearnSpells() // search auto-learned spells and add its to map also for use in unlearn spells/talents uint32 dbc_count = 0; - for (uint32 spell = 0; spell < sSpellStore.GetNumRows(); ++spell) + for (uint32 spell = 0; spell < sSpellMgr.GetMaxSpellId(); ++spell) { SpellEntry const* entry = sSpellMgr.GetSpellEntry(spell); @@ -3348,7 +3348,7 @@ void SpellMgr::LoadSpellScriptTarget() // Check all spells /* Disabled (lot errors at this moment) - for(uint32 i = 1; i < sSpellStore.nCount; ++i) + for(uint32 i = 1; i < sSpellMgr.GetMaxSpellId; ++i) { SpellEntry const * spellInfo = sSpellMgr.GetSpellEntry(i); if(!spellInfo) @@ -4056,7 +4056,7 @@ void SpellMgr::CheckUsedSpells(char const* table) ++countMasks; bool found = false; - for (uint32 spellId = 1; spellId < sSpellStore.GetNumRows(); ++spellId) + for (uint32 spellId = 1; spellId < sSpellMgr.GetMaxSpellId(); ++spellId) { SpellEntry const* spellEntry = sSpellMgr.GetSpellEntry(spellId); if (!spellEntry) @@ -4261,7 +4261,7 @@ void SpellMgr::LoadSpellAffects() sLog.outString(); sLog.outString(">> Loaded %u spell affect definitions", count); - for (uint32 id = 0; id < sSpellStore.GetNumRows(); ++id) + for (uint32 id = 0; id < sSpellMgr.GetMaxSpellId(); ++id) { SpellEntry const* spellInfo = sSpellMgr.GetSpellEntry(id); if (!spellInfo) @@ -4335,20 +4335,252 @@ void SpellMgr::LoadSpells() { uint32 oldMSTime = WorldTimer::getMSTime(); sLog.outString("Loading spells ..."); - mSpellEntryMap.resize(sSpellStore.GetNumRows(), nullptr); - for (uint32 i = 0; i < sSpellStore.GetNumRows(); ++i) + // Getting the maximum ID. + QueryResult* result = WorldDatabase.Query("SELECT MAX(ID) FROM spell_template"); + + if (!result) { - if (DBCSpellEntry const* spellEntry = sSpellStore.LookupEntry(i)) - { - SpellEntry* newSpell = new SpellEntry(); - if (!newSpell->Load(spellEntry)) - { - delete newSpell; - continue; - } - mSpellEntryMap[i] = newSpell; - } + sLog.outString(">> Loaded 0 spells. DB table `spell_template` is empty."); + return; } - sLog.outString("%u spells loaded in %ums.", mSpellEntryMap.size(), WorldTimer::getMSTimeDiffToNow(oldMSTime)); + auto fields = result->Fetch(); + uint32 maxEntry = fields[0].GetUInt32() + 1; + delete result; + + // Actually loading the spells. + result = WorldDatabase.Query("SELECT * FROM spell_template"); + + if (!result) + { + sLog.outString(">> Loaded 0 spells. DB table `spell_template` is empty."); + return; + } + + mSpellEntryMap.resize(maxEntry, nullptr); + + do + { + fields = result->Fetch(); + + SpellEntry* spell = new SpellEntry(); + + uint32 spellId = fields[0].GetUInt32(); + + spell->Id = spellId; + spell->School = fields[1].GetUInt32(); + spell->Category = fields[2].GetUInt32(); + //spell->castUI = fields[3].GetUInt32(); not used + spell->Dispel = fields[4].GetUInt32(); + spell->Mechanic = fields[5].GetUInt32(); + spell->Attributes = fields[6].GetUInt32(); + spell->AttributesEx = fields[7].GetUInt32(); + spell->AttributesEx2 = fields[8].GetUInt32(); + spell->AttributesEx3 = fields[9].GetUInt32(); + spell->AttributesEx4 = fields[10].GetUInt32(); + spell->Stances = fields[11].GetUInt32(); + spell->StancesNot = fields[12].GetUInt32(); + spell->Targets = fields[13].GetUInt32(); + spell->TargetCreatureType = fields[14].GetUInt32(); + spell->RequiresSpellFocus = fields[15].GetUInt32(); + spell->CasterAuraState = fields[16].GetUInt32(); + spell->TargetAuraState = fields[17].GetUInt32(); + spell->CastingTimeIndex = fields[18].GetUInt32(); + spell->RecoveryTime = fields[19].GetUInt32(); + spell->CategoryRecoveryTime = fields[20].GetUInt32(); + spell->InterruptFlags = fields[21].GetUInt32(); + spell->AuraInterruptFlags = fields[22].GetUInt32(); + spell->ChannelInterruptFlags = fields[23].GetUInt32(); + spell->procFlags = fields[24].GetUInt32(); + spell->procChance = fields[25].GetUInt32(); + spell->procCharges = fields[26].GetUInt32(); + spell->maxLevel = fields[27].GetUInt32(); + spell->baseLevel = fields[28].GetUInt32(); + spell->spellLevel = fields[29].GetUInt32(); + spell->DurationIndex = fields[30].GetUInt32(); + spell->powerType = fields[31].GetUInt32(); + spell->manaCost = fields[32].GetUInt32(); + spell->manaCostPerlevel = fields[33].GetUInt32(); + spell->manaPerSecond = fields[34].GetUInt32(); + spell->manaPerSecondPerLevel = fields[35].GetUInt32(); + spell->rangeIndex = fields[36].GetUInt32(); + spell->speed = fields[37].GetFloat(); + //spell->modalNextSpell = fields[38].GetUInt32(); not used + spell->StackAmount = fields[39].GetUInt32(); + spell->Totem[0] = fields[40].GetUInt32(); + spell->Totem[1] = fields[41].GetUInt32(); + spell->Reagent[0] = fields[42].GetInt32(); + spell->Reagent[1] = fields[43].GetInt32(); + spell->Reagent[2] = fields[44].GetInt32(); + spell->Reagent[3] = fields[45].GetInt32(); + spell->Reagent[4] = fields[46].GetInt32(); + spell->Reagent[5] = fields[47].GetInt32(); + spell->Reagent[6] = fields[48].GetInt32(); + spell->Reagent[7] = fields[49].GetInt32(); + spell->ReagentCount[0] = fields[50].GetUInt32(); + spell->ReagentCount[1] = fields[51].GetUInt32(); + spell->ReagentCount[2] = fields[52].GetUInt32(); + spell->ReagentCount[3] = fields[53].GetUInt32(); + spell->ReagentCount[4] = fields[54].GetUInt32(); + spell->ReagentCount[5] = fields[55].GetUInt32(); + spell->ReagentCount[6] = fields[56].GetUInt32(); + spell->ReagentCount[7] = fields[57].GetUInt32(); + spell->EquippedItemClass = fields[58].GetInt32(); + spell->EquippedItemSubClassMask = fields[59].GetInt32(); + spell->EquippedItemInventoryTypeMask = fields[60].GetInt32(); + spell->Effect[0] = fields[61].GetUInt32(); + spell->Effect[1] = fields[62].GetUInt32(); + spell->Effect[2] = fields[63].GetUInt32(); + spell->EffectDieSides[0] = fields[64].GetInt32(); + spell->EffectDieSides[1] = fields[65].GetInt32(); + spell->EffectDieSides[2] = fields[66].GetInt32(); + spell->EffectBaseDice[0] = fields[67].GetUInt32(); + spell->EffectBaseDice[1] = fields[68].GetUInt32(); + spell->EffectBaseDice[2] = fields[69].GetUInt32(); + spell->EffectDicePerLevel[0] = fields[70].GetFloat(); + spell->EffectDicePerLevel[1] = fields[71].GetFloat(); + spell->EffectDicePerLevel[2] = fields[72].GetFloat(); + spell->EffectRealPointsPerLevel[0] = fields[73].GetFloat(); + spell->EffectRealPointsPerLevel[1] = fields[74].GetFloat(); + spell->EffectRealPointsPerLevel[2] = fields[75].GetFloat(); + spell->EffectBasePoints[0] = fields[76].GetInt32(); + spell->EffectBasePoints[1] = fields[77].GetInt32(); + spell->EffectBasePoints[2] = fields[78].GetInt32(); + spell->EffectMechanic[0] = fields[79].GetUInt32(); + spell->EffectMechanic[1] = fields[80].GetUInt32(); + spell->EffectMechanic[2] = fields[81].GetUInt32(); + spell->EffectImplicitTargetA[0] = fields[82].GetUInt32(); + spell->EffectImplicitTargetA[1] = fields[83].GetUInt32(); + spell->EffectImplicitTargetA[2] = fields[84].GetUInt32(); + spell->EffectImplicitTargetB[0] = fields[85].GetUInt32(); + spell->EffectImplicitTargetB[1] = fields[86].GetUInt32(); + spell->EffectImplicitTargetB[2] = fields[87].GetUInt32(); + spell->EffectRadiusIndex[0] = fields[88].GetUInt32(); + spell->EffectRadiusIndex[1] = fields[89].GetUInt32(); + spell->EffectRadiusIndex[2] = fields[90].GetUInt32(); + spell->EffectApplyAuraName[0] = fields[91].GetUInt32(); + spell->EffectApplyAuraName[1] = fields[92].GetUInt32(); + spell->EffectApplyAuraName[2] = fields[93].GetUInt32(); + spell->EffectAmplitude[0] = fields[94].GetUInt32(); + spell->EffectAmplitude[1] = fields[95].GetUInt32(); + spell->EffectAmplitude[2] = fields[96].GetUInt32(); + spell->EffectMultipleValue[0] = fields[97].GetFloat(); + spell->EffectMultipleValue[1] = fields[98].GetFloat(); + spell->EffectMultipleValue[2] = fields[99].GetFloat(); + spell->EffectChainTarget[0] = fields[100].GetUInt32(); + spell->EffectChainTarget[1] = fields[101].GetUInt32(); + spell->EffectChainTarget[2] = fields[102].GetUInt32(); + spell->EffectItemType[0] = fields[103].GetUInt32(); + spell->EffectItemType[1] = fields[104].GetUInt32(); + spell->EffectItemType[2] = fields[105].GetUInt32(); + spell->EffectMiscValue[0] = fields[106].GetInt32(); + spell->EffectMiscValue[1] = fields[107].GetInt32(); + spell->EffectMiscValue[2] = fields[108].GetInt32(); + spell->EffectTriggerSpell[0] = fields[109].GetUInt32(); + spell->EffectTriggerSpell[1] = fields[110].GetUInt32(); + spell->EffectTriggerSpell[2] = fields[111].GetUInt32(); + spell->EffectPointsPerComboPoint[0] = fields[112].GetFloat(); + spell->EffectPointsPerComboPoint[1] = fields[113].GetFloat(); + spell->EffectPointsPerComboPoint[2] = fields[114].GetFloat(); + spell->SpellVisual = fields[115].GetUInt32(); + //spell->SpellVisual2 = fields[116].GetUInt32(); not used + spell->SpellIconID = fields[117].GetUInt32(); + spell->activeIconID = fields[118].GetUInt32(); + spell->spellPriority = fields[119].GetUInt32(); + spell->SpellName[0] = new char[strlen(fields[120].GetString()) + 1]; + strcpy(spell->SpellName[0], fields[120].GetString()); + spell->SpellName[1] = new char[strlen(fields[121].GetString()) + 1]; + strcpy(spell->SpellName[1], fields[121].GetString()); + spell->SpellName[2] = new char[strlen(fields[122].GetString()) + 1]; + strcpy(spell->SpellName[2], fields[122].GetString()); + spell->SpellName[3] = new char[strlen(fields[123].GetString()) + 1]; + strcpy(spell->SpellName[3], fields[123].GetString()); + spell->SpellName[4] = new char[strlen(fields[124].GetString()) + 1]; + strcpy(spell->SpellName[4], fields[124].GetString()); + spell->SpellName[5] = new char[strlen(fields[125].GetString()) + 1]; + strcpy(spell->SpellName[5], fields[125].GetString()); + spell->SpellName[6] = new char[strlen(fields[126].GetString()) + 1]; + strcpy(spell->SpellName[6], fields[126].GetString()); + spell->SpellName[7] = new char[strlen(fields[127].GetString()) + 1]; + strcpy(spell->SpellName[7], fields[127].GetString()); + //spell->SpellNameFlag = fields[128].GetUInt32(); not used + spell->Rank[0] = new char[strlen(fields[129].GetString()) + 1]; + strcpy(spell->Rank[0], fields[129].GetString()); + spell->Rank[1] = new char[strlen(fields[130].GetString()) + 1]; + strcpy(spell->Rank[1], fields[130].GetString()); + spell->Rank[2] = new char[strlen(fields[131].GetString()) + 1]; + strcpy(spell->Rank[2], fields[131].GetString()); + spell->Rank[3] = new char[strlen(fields[132].GetString()) + 1]; + strcpy(spell->Rank[3], fields[132].GetString()); + spell->Rank[4] = new char[strlen(fields[133].GetString()) + 1]; + strcpy(spell->Rank[4], fields[133].GetString()); + spell->Rank[5] = new char[strlen(fields[134].GetString()) + 1]; + strcpy(spell->Rank[5], fields[134].GetString()); + spell->Rank[6] = new char[strlen(fields[135].GetString()) + 1]; + strcpy(spell->Rank[6], fields[135].GetString()); + spell->Rank[7] = new char[strlen(fields[136].GetString()) + 1]; + strcpy(spell->Rank[7], fields[136].GetString()); + /* not used + spell->RankFlags = fields[137].GetUInt32(); + spell->Description[0] = new char[strlen(fields[138].GetString()) + 1]; + strcpy(spell->Description[0], fields[138].GetString()); + spell->Description[1] = new char[strlen(fields[139].GetString()) + 1]; + strcpy(spell->Description[1], fields[139].GetString()); + spell->Description[2] = new char[strlen(fields[140].GetString()) + 1]; + strcpy(spell->Description[2], fields[140].GetString()); + spell->Description[3] = new char[strlen(fields[141].GetString()) + 1]; + strcpy(spell->Description[3], fields[141].GetString()); + spell->Description[4] = new char[strlen(fields[142].GetString()) + 1]; + strcpy(spell->Description[4], fields[142].GetString()); + spell->Description[5] = new char[strlen(fields[143].GetString()) + 1]; + strcpy(spell->Description[5], fields[143].GetString()); + spell->Description[6] = new char[strlen(fields[144].GetString()) + 1]; + strcpy(spell->Description[6], fields[144].GetString()); + spell->Description[7] = new char[strlen(fields[145].GetString()) + 1]; + strcpy(spell->Description[7], fields[145].GetString()); + spell->DescriptionFlags = fields[146].GetUInt32(); + spell->ToolTip[0] = new char[strlen(fields[147].GetString()) + 1]; + strcpy(spell->ToolTip[0], fields[147].GetString()); + spell->ToolTip[1] = new char[strlen(fields[148].GetString()) + 1]; + strcpy(spell->ToolTip[1], fields[148].GetString()); + spell->ToolTip[2] = new char[strlen(fields[149].GetString()) + 1]; + strcpy(spell->ToolTip[2], fields[149].GetString()); + spell->ToolTip[3] = new char[strlen(fields[150].GetString()) + 1]; + strcpy(spell->ToolTip[3], fields[150].GetString()); + spell->ToolTip[4] = new char[strlen(fields[151].GetString()) + 1]; + strcpy(spell->ToolTip[4], fields[151].GetString()); + spell->ToolTip[5] = new char[strlen(fields[152].GetString()) + 1]; + strcpy(spell->ToolTip[5], fields[152].GetString()); + spell->ToolTip[6] = new char[strlen(fields[153].GetString()) + 1]; + strcpy(spell->ToolTip[6], fields[153].GetString()); + spell->ToolTip[7] = new char[strlen(fields[154].GetString()) + 1]; + strcpy(spell->ToolTip[7], fields[154].GetString()); + spell->ToolTipFlags = fields[155].GetUInt32(); + */ + spell->ManaCostPercentage = fields[156].GetUInt32(); + spell->StartRecoveryCategory = fields[157].GetUInt32(); + spell->StartRecoveryTime = fields[158].GetUInt32(); + spell->MaxTargetLevel = fields[159].GetUInt32(); + spell->SpellFamilyName = fields[160].GetUInt32(); + spell->SpellFamilyFlags = fields[161].GetUInt64(); + spell->MaxAffectedTargets = fields[162].GetUInt32(); + spell->DmgClass = fields[163].GetUInt32(); + spell->PreventionType = fields[164].GetUInt32(); + //spell->StanceBarOrder = fields[165].GetInt32(); + spell->DmgMultiplier[0] = fields[166].GetFloat(); + spell->DmgMultiplier[1] = fields[167].GetFloat(); + spell->DmgMultiplier[2] = fields[168].GetFloat(); + //spell->MinFactionId = fields[169].GetUInt32(); + //spell->MinReputation = fields[170].GetUInt32(); + //spell->RequiredAuraVision = fields[171].GetUInt32(); + spell->Custom = 0; + + spell->InitCachedValues(); + mSpellEntryMap[spellId] = spell; + + } while (result->NextRow()); + + delete result; + + sLog.outString(">> Loaded %u spells in %ums.", mSpellEntryMap.size(), WorldTimer::getMSTimeDiffToNow(oldMSTime)); } diff --git a/src/game/Spells/SpellMgr.h b/src/game/Spells/SpellMgr.h index d490d489a..903c80017 100644 --- a/src/game/Spells/SpellMgr.h +++ b/src/game/Spells/SpellMgr.h @@ -23,7 +23,6 @@ #define _SPELLMGR_H // For static or at-server-startup loaded spell data -// For more high level function for sSpellStore data #include "Common.h" #include "SharedDefines.h" @@ -677,7 +676,7 @@ struct SpellProcEventEntry { uint32 schoolMask; uint32 spellFamilyName; // if nonzero - for matching proc condition based on candidate spell's SpellFamilyNamer value - ClassFamilyMask spellFamilyMask[MAX_EFFECT_INDEX]; // if nonzero - for matching proc condition based on candidate spell's SpellFamilyFlags (like auras 107 and 108 do) + uint64 spellFamilyMask[MAX_EFFECT_INDEX]; // if nonzero - for matching proc condition based on candidate spell's SpellFamilyFlags (like auras 107 and 108 do) uint32 procFlags; // bitmask for matching proc event uint32 procEx; // proc Extend info (see ProcFlagsEx) float ppmRate; // for melee (ranged?) damage spells - proc rate per minute. if zero, falls back to flat chance from Spell.dbc @@ -1033,14 +1032,14 @@ class SpellMgr } // Spell affects - ClassFamilyMask GetSpellAffectMask(uint32 spellId, SpellEffectIndex effectId) const + uint64 GetSpellAffectMask(uint32 spellId, SpellEffectIndex effectId) const { SpellAffectMap::const_iterator itr = mSpellAffectMap.find((spellId<<8) + effectId); if (itr != mSpellAffectMap.end()) - return ClassFamilyMask(itr->second); + return itr->second; if (SpellEntry const* spellEntry = GetSpellEntry(spellId)) - return ClassFamilyMask(spellEntry->EffectItemType[effectId]); - return ClassFamilyMask(); + return spellEntry->EffectItemType[effectId]; + return 0; } SpellElixirMap const& GetSpellElixirMap() const { return mSpellElixirs; } diff --git a/src/game/Spells/SpellModMgr.cpp b/src/game/Spells/SpellModMgr.cpp index f20267612..d22c67d03 100644 --- a/src/game/Spells/SpellModMgr.cpp +++ b/src/game/Spells/SpellModMgr.cpp @@ -69,20 +69,8 @@ void SpellModMgr::LoadSpellMods() { OUT_LOG(); OUT_LOG("Loading spell mods ..."); - // 1 : Reset des champs "Custom" pour tous les sorts charges des DBC - for (uint32 id = 0; id < sSpellMgr.GetMaxSpellId(); id++) - { - SpellEntry const *spellInfo = sSpellMgr.GetSpellEntry(id); - if (spellInfo) - { - SpellEntry* modif = ((SpellEntry*)spellInfo); - modif->Custom = 0; - } - } - OUT_LOG(); - OUT_LOG(">> Reseted %u spell", sSpellStore.GetNumRows()); - // 2 : Table spell_mod + // 1 : Table spell_mod QueryResult* result = WorldDatabase.Query( "SELECT Id, procChance, procFlags, Custom, DurationIndex, " "Category, CastingTimeIndex, StackAmount, SpellIconID, activeIconID, manaCost, " @@ -110,40 +98,31 @@ void SpellModMgr::LoadSpellMods() SpellEntry* newSpell = new SpellEntry; if (!sSpellMgr.SetSpellEntry(spellid, newSpell)) { - OUT_ERR("Impossible de creer le sort %u. Passe.", spellid); + OUT_ERR("Unable to create spell %u, skipping.", spellid); delete newSpell; continue; } else { - DBCSpellEntry* loader = new DBCSpellEntry; - memset(loader, 0, sizeof(DBCSpellEntry)); // Certaines valeurs sont a -1 par defaut. - loader->EquippedItemClass = -1; + newSpell->EquippedItemClass = -1; for (uint32 i = 0; i < 8; ++i) { std::stringstream name; name << "CustomSpell"; - loader->SpellName[i] = new char[name.str().size() + 1]; - strcpy(loader->SpellName[i], name.str().c_str()); + newSpell->SpellName[i] = new char[name.str().size() + 1]; + strcpy(newSpell->SpellName[i], name.str().c_str()); //sprintf (loader->SpellName[i], "CustomSpell%u", spellid); //sprintf (loader->Rank[i], "Custom"); } - if (!newSpell->Load(loader)) - { - OUT_ERR("Impossible de charger le sort %u. Passe.", spellid); - delete newSpell; - delete loader; - continue; - } - delete loader; + newSpell->InitCachedValues(); } } #endif SpellEntry* spell = ((SpellEntry*)sSpellMgr.GetSpellEntry(spellid)); if (!spell) { - OUT_ERR("Spell entry %u from `spell_mod` doesn't exist in dbc, ignoring.", spellid); + OUT_ERR("Spell entry %u from `spell_mod` doesn't exist, ignoring.", spellid); continue; } // 0 1 2 3 4 @@ -203,7 +182,7 @@ void SpellModMgr::LoadSpellMods() ModUInt32ValueIfExplicit(fields[33], spell->SpellFamilyName); uint64 flags = fields[34].GetUInt64(); if (flags) - spell->SpellFamilyFlags.Flags = flags; + spell->SpellFamilyFlags = flags; ModUInt32ValueIfExplicit(fields[35], spell->Mechanic); ModInt32ValueIfExplicit(fields[36], spell->EquippedItemClass); @@ -216,7 +195,7 @@ void SpellModMgr::LoadSpellMods() OUT_LOG(">> Loaded %u spell modifications", total_count); } - // 3 : Table spell_effect_mod + // 2 : Table spell_effect_mod OUT_LOG(); OUT_LOG("Loading spell effect mods ..."); result = WorldDatabase.Query( @@ -231,7 +210,7 @@ void SpellModMgr::LoadSpellMods() if (!result) { OUT_LOG(); - OUT_LOG(">> Loaded %u spell effect modifications. Table spell_effect_mod vide ou inexistante ?", total_count); + OUT_LOG(">> Loaded %u spell effect modifications. Table spell_effect_mod is empty.", total_count); } else { @@ -244,12 +223,12 @@ void SpellModMgr::LoadSpellMods() SpellEntry* spell = ((SpellEntry*)sSpellMgr.GetSpellEntry(spellid)); if (!spell) { - OUT_ERR("Spell entry %u from `spell_effect_mod` doesn't exist in dbc, ignoring.", spellid); + OUT_ERR("Spell entry %u from `spell_effect_mod` doesn't exist, ignoring.", spellid); continue; } if (effect_idx >= MAX_EFFECT_INDEX) { - OUT_ERR("Erreur : Le sort %u a une definition pour l'effet %u, alors que le max est %u.", spellid, effect_idx, (MAX_EFFECT_INDEX - 1)); + OUT_ERR("Erreur : Spell %u has a modification for effect %u, but the maximum effect id is %u.", spellid, effect_idx, (MAX_EFFECT_INDEX - 1)); continue; } //0 1 2 3 4 5 6 diff --git a/src/game/World.cpp b/src/game/World.cpp index 500c5f5b8..45dc70e15 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -1183,13 +1183,14 @@ void World::SetInitialWorldSettings() CharacterDatabase.PExecute("DELETE FROM corpse WHERE corpse_type = '0' OR time < (UNIX_TIMESTAMP()-'%u')", 3 * DAY); } + sSpellMgr.LoadSpells(); + ///- Load the DBC files sLog.outString("Initialize data stores..."); LoadDBCStores(m_dataPath); DetectDBCLang(); sObjectMgr.SetDBCLocaleIndex(GetDefaultDbcLocale()); // Get once for all the locale index of DBC language (console/broadcasts) - sSpellMgr.LoadSpells(); - + sLog.outString("Loading Script Names..."); sScriptMgr.LoadScriptNames(); diff --git a/src/scripts/eastern_kingdoms/eastern_plaguelands/naxxramas/instance_naxxramas.cpp b/src/scripts/eastern_kingdoms/eastern_plaguelands/naxxramas/instance_naxxramas.cpp index 958db8f8a..dbf13b5e8 100644 --- a/src/scripts/eastern_kingdoms/eastern_plaguelands/naxxramas/instance_naxxramas.cpp +++ b/src/scripts/eastern_kingdoms/eastern_plaguelands/naxxramas/instance_naxxramas.cpp @@ -1609,7 +1609,7 @@ struct mob_naxxramasPlagueSlimeAI : public ScriptedAI void ChangeColor() { uint32 spell = urand(28987, 28990); - if(const DBCSpellEntry* entry = sSpellStore.LookupEntry(spell)) + if(const SpellEntry* entry = sSpellMgr.GetSpellEntry(spell)) m_creature->UpdateEntry(entry->EffectMiscValue[0]); if (prev_spell) m_creature->RemoveAurasDueToSpell(prev_spell);