From 56186319bdd41dd26b6cc14f84e6e41eef5d953b Mon Sep 17 00:00:00 2001 From: Shauren Date: Tue, 17 Feb 2015 01:01:44 +0100 Subject: Core/Spells: Cooldown updates * Refactored cooldown handling to separate class shared by creatures and players * Updated and enabled cooldown packets * Implemented creature school lockouts * Implemented spell charges * Fixed AuraUpdate structure * Fixed aura flag AFLAG_NOCASTER handling * Implemented spell charge related auras --- sql/base/characters_database.sql | 54 +++++++++++++++++++++- .../characters/2015_02_17_00_characters.sql | 28 +++++++++++ 2 files changed, 80 insertions(+), 2 deletions(-) create mode 100644 sql/updates/characters/2015_02_17_00_characters.sql (limited to 'sql') diff --git a/sql/base/characters_database.sql b/sql/base/characters_database.sql index 55c71d4bc58..b920bcba8cd 100644 --- a/sql/base/characters_database.sql +++ b/sql/base/characters_database.sql @@ -1231,6 +1231,31 @@ LOCK TABLES `character_spell` WRITE; /*!40000 ALTER TABLE `character_spell` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `character_spell_charges` +-- + +DROP TABLE IF EXISTS `character_spell_charges`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `character_spell_charges` ( + `guid` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier, Low part', + `categoryId` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'SpellCategory.dbc Identifier', + `rechargeStart` int(10) unsigned NOT NULL DEFAULT '0', + `rechargeEnd` int(10) unsigned NOT NULL DEFAULT '0', + KEY `idx_guid` (`guid`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `character_spell_charges` +-- + +LOCK TABLES `character_spell_charges` WRITE; +/*!40000 ALTER TABLE `character_spell_charges` DISABLE KEYS */; +/*!40000 ALTER TABLE `character_spell_charges` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `character_spell_cooldown` -- @@ -1240,7 +1265,7 @@ DROP TABLE IF EXISTS `character_spell_cooldown`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `character_spell_cooldown` ( `guid` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier, Low part', - `spell` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Spell Identifier', + `spell` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Spell Identifier', `item` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Item Identifier', `time` int(10) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`guid`,`spell`) @@ -2573,6 +2598,31 @@ LOCK TABLES `pet_spell` WRITE; /*!40000 ALTER TABLE `pet_spell` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `pet_spell_charges` +-- + +DROP TABLE IF EXISTS `pet_spell_charges`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `pet_spell_charges` ( + `guid` int(10) unsigned NOT NULL, + `categoryId` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'SpellCategory.dbc Identifier', + `rechargeStart` int(10) unsigned NOT NULL DEFAULT '0', + `rechargeEnd` int(10) unsigned NOT NULL DEFAULT '0', + KEY `idx_guid` (`guid`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `pet_spell_charges` +-- + +LOCK TABLES `pet_spell_charges` WRITE; +/*!40000 ALTER TABLE `pet_spell_charges` DISABLE KEYS */; +/*!40000 ALTER TABLE `pet_spell_charges` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `pet_spell_cooldown` -- @@ -2582,7 +2632,7 @@ DROP TABLE IF EXISTS `pet_spell_cooldown`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `pet_spell_cooldown` ( `guid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier, Low part', - `spell` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Spell Identifier', + `spell` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Spell Identifier', `time` int(10) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`guid`,`spell`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/sql/updates/characters/2015_02_17_00_characters.sql b/sql/updates/characters/2015_02_17_00_characters.sql new file mode 100644 index 00000000000..ebf539c9a40 --- /dev/null +++ b/sql/updates/characters/2015_02_17_00_characters.sql @@ -0,0 +1,28 @@ +-- +-- Table structure for table `character_spell_charges` +-- + +DROP TABLE IF EXISTS `character_spell_charges`; +CREATE TABLE `character_spell_charges` ( + `guid` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier, Low part', + `categoryId` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'SpellCategory.dbc Identifier', + `rechargeStart` int(10) unsigned NOT NULL DEFAULT '0', + `rechargeEnd` int(10) unsigned NOT NULL DEFAULT '0', + KEY `idx_guid` (`guid`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- +-- Table structure for table `pet_spell_charges` +-- + +DROP TABLE IF EXISTS `pet_spell_charges`; +CREATE TABLE `pet_spell_charges` ( + `guid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier, Low part', + `categoryId` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'SpellCategory.dbc Identifier', + `rechargeStart` int(10) unsigned NOT NULL DEFAULT '0', + `rechargeEnd` int(10) unsigned NOT NULL DEFAULT '0', + KEY `idx_guid` (`guid`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +ALTER TABLE `character_spell_cooldown` CHANGE `spell` `spell` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Spell Identifier'; +ALTER TABLE `pet_spell_cooldown` CHANGE `spell` `spell` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Spell Identifier'; -- cgit v1.2.3