From 7ac4dc6f1301f6470d9ac4aca8857d28b054d4a9 Mon Sep 17 00:00:00 2001 From: VladimirMangos Date: Sun, 26 Jul 2009 10:39:45 +0400 Subject: [PATCH] [8251] Store in some DB tables only data for first rank. * Allow add to DB data only for first rank in table `mangos_spell_bonus_data` and `mangos_spell_proc_event`. * Copy data for other ranks for speedup use at loading for this data and data from `spell_proc_item_enchant`. --- sql/mangos.sql | 375 ++++++++---------- sql/updates/8251_01_mangos_spell_chain.sql | 141 +++++++ .../8251_02_mangos_spell_bonus_data.sql | 23 ++ .../8251_03_mangos_spell_proc_event.sql | 8 + sql/updates/Makefile.am | 6 + src/game/Pet.cpp | 12 +- src/game/Player.cpp | 15 +- src/game/SpellMgr.cpp | 60 ++- src/game/SpellMgr.h | 23 +- src/shared/revision_nr.h | 2 +- 10 files changed, 440 insertions(+), 225 deletions(-) create mode 100644 sql/updates/8251_01_mangos_spell_chain.sql create mode 100644 sql/updates/8251_02_mangos_spell_bonus_data.sql create mode 100644 sql/updates/8251_03_mangos_spell_proc_event.sql diff --git a/sql/mangos.sql b/sql/mangos.sql index 67d7d1cbb..f027c62bf 100644 --- a/sql/mangos.sql +++ b/sql/mangos.sql @@ -23,7 +23,7 @@ DROP TABLE IF EXISTS `db_version`; CREATE TABLE `db_version` ( `version` varchar(120) default NULL, `creature_ai_version` varchar(120) default NULL, - `required_8250_01_mangos_spell_threat` bit(1) default NULL + `required_8251_03_mangos_spell_proc_event` bit(1) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes'; -- @@ -13590,7 +13590,7 @@ CREATE TABLE `spell_bonus_data` ( LOCK TABLES `spell_bonus_data` WRITE; /*!40000 ALTER TABLE `spell_bonus_data` DISABLE KEYS */; INSERT INTO `spell_bonus_data` VALUES -('49941', '0', '0', '0.04', 'Death Knight - Blood Boil'), +('48721', '0', '0', '0.04', 'Death Knight - Blood Boil'), ('55078', '0', '0', '0.055', 'Death Knight - Blood Plague Dummy Proc'), ('50444', '0', '0', '0.105', 'Death Knight - Corpse Explosion Triggered'), ('52212', '0', '0', '0.0475', 'Death Knight - Death and Decay Triggered'), @@ -13622,19 +13622,7 @@ INSERT INTO `spell_bonus_data` VALUES ('5176', '0.5714', '0', '0', 'Druid - Wrath'), ('30451', '0.7143', '0', '0', 'Mage - Arcane Blast'), ('1449', '0.2128', '0', '0', 'Mage - Arcane Explosion'), -('7268', '0.2857', '0', '0', 'Mage - Arcane Missiles Triggered Spell Rank 1'), -('7269', '0.2857', '0', '0', 'Mage - Arcane Missiles Triggered Spell Rank 2'), -('7270', '0.2857', '0', '0', 'Mage - Arcane Missiles Triggered Spell Rank 3'), -('8419', '0.2857', '0', '0', 'Mage - Arcane Missiles Triggered Spell Rank 4'), -('8418', '0.2857', '0', '0', 'Mage - Arcane Missiles Triggered Spell Rank 5'), -('10273', '0.2857', '0', '0', 'Mage - Arcane Missiles Triggered Spell Rank 6'), -('10274', '0.2857', '0', '0', 'Mage - Arcane Missiles Triggered Spell Rank 7'), -('25346', '0.2857', '0', '0', 'Mage - Arcane Missiles Triggered Spell Rank 8'), -('27076', '0.2857', '0', '0', 'Mage - Arcane Missiles Triggered Spell Rank 9'), -('38700', '0.2857', '0', '0', 'Mage - Arcane Missiles Triggered Spell Rank 10'), -('38703', '0.2857', '0', '0', 'Mage - Arcane Missiles Triggered Spell Rank 11'), -('42844', '0.2857', '0', '0', 'Mage - Arcane Missiles Triggered Spell Rank 12'), -('42845', '0.2857', '0', '0', 'Mage - Arcane Missiles Triggered Spell Rank 13'), +('7268', '0.2857', '0', '0', 'Mage - Arcane Missiles Triggered Spell'), ('1463', '0.8053', '0', '0', 'Mage - Mana Shield'), ('44425', '0.8571', '0', '0', 'Mage - Arcane Barrage'), ('11113', '0.1357', '0', '0', 'Mage - Blast Wave Rank'), @@ -13646,39 +13634,17 @@ INSERT INTO `spell_bonus_data` VALUES ('2948', '0.4286', '0', '0', 'Mage - Scorch'), ('44614', '0.8571', '0', '0', 'Mage - Frostfire Bolt'), ('44457', '0.4', '0.2', '0', 'Mage - Living Bomb'), -('42208', '0.0952', '0', '0', 'Mage - Blizzard Triggered Spell Rank 1'), -('42209', '0.0952', '0', '0', 'Mage - Blizzard Triggered Spell Rank 2'), -('42210', '0.0952', '0', '0', 'Mage - Blizzard Triggered Spell Rank 3'), -('42211', '0.0952', '0', '0', 'Mage - Blizzard Triggered Spell Rank 4'), -('42212', '0.0952', '0', '0', 'Mage - Blizzard Triggered Spell Rank 5'), -('42213', '0.0952', '0', '0', 'Mage - Blizzard Triggered Spell Rank 6'), -('42198', '0.0952', '0', '0', 'Mage - Blizzard Triggered Spell Rank 7'), -('42937', '0.0952', '0', '0', 'Mage - Blizzard Triggered Spell Rank 8'), -('42938', '0.0952', '0', '0', 'Mage - Blizzard Triggered Spell Rank 9'), +('42208', '0.0952', '0', '0', 'Mage - Blizzard Triggered Spell'), ('120', '0.1357', '0', '0', 'Mage - Cone of Cold'), ('122', '0.193', '0', '0', 'Mage - Frost Nova'), ('116', '0.8143', '0', '0', 'Mage - Frost Bolt'), ('11426', '0.8053', '0', '0', 'Mage - Ice Barrier'), ('30455', '0.1429', '0', '0', 'Mage - Ice Lance'), -('34913','0', '0', '0', 'Mage - Molten Armor Triggered Rank 1'), -('43043','0', '0', '0', 'Mage - Molten Armor Triggered Rank 2'), -('43044','0', '0', '0', 'Mage - Molten Armor Triggered Rank 3'), +('34913','0', '0', '0', 'Mage - Molten Armor Triggered'), ('19750','0.4286', '0', '0', 'Paladin - Flash of Light'), ('635', '0.7143', '0', '0', 'Paladin - Holy Light'), -('25912', '0.4286', '0', '0', 'Paladin - Holy Shock Triggered Hurt Rank 1'), -('25911', '0.4286', '0', '0', 'Paladin - Holy Shock Triggered Hurt Rank 2'), -('25902', '0.4286', '0', '0', 'Paladin - Holy Shock Triggered Hurt Rank 3'), -('27176', '0.4286', '0', '0', 'Paladin - Holy Shock Triggered Hurt Rank 4'), -('33073', '0.4286', '0', '0', 'Paladin - Holy Shock Triggered Hurt Rank 5'), -('48822', '0.4286', '0', '0', 'Paladin - Holy Shock Triggered Hurt Rank 6'), -('48823', '0.4286', '0', '0', 'Paladin - Holy Shock Triggered Hurt Rank 7'), -('25914', '0.4286', '0', '0', 'Paladin - Holy Shock Triggered Heal Rank 1'), -('25913', '0.4286', '0', '0', 'Paladin - Holy Shock Triggered Heal Rank 2'), -('25903', '0.4286', '0', '0', 'Paladin - Holy Shock Triggered Heal Rank 3'), -('27175', '0.4286', '0', '0', 'Paladin - Holy Shock Triggered Heal Rank 4'), -('33074', '0.4286', '0', '0', 'Paladin - Holy Shock Triggered Heal Rank 5'), -('48820', '0.4286', '0', '0', 'Paladin - Holy Shock Triggered Heal Rank 6'), -('48821', '0.4286', '0', '0', 'Paladin - Holy Shock Triggered Heal Rank 7'), +('25912', '0.4286', '0', '0', 'Paladin - Holy Shock Triggered Hurt'), +('25914', '0.4286', '0', '0', 'Paladin - Holy Shock Triggered Heal'), ('31935', '0.07', '0', '0.07', 'Paladin - Avengers Shiled'), ('26573', '0', '0.04', '0.04', 'Paladin - Consecration'), ('879', '0.15', '0', '0.15', 'Paladin - Exorcism'), @@ -13701,13 +13667,7 @@ INSERT INTO `spell_bonus_data` VALUES ('19236', '0.8068', '0', '0', 'Priest - Desperate Prayer'), ('2061', '0.8068', '0', '0', 'Priest - Flash Heal'), ('2060', '1.6135', '0', '0', 'Priest - Greater Heal'), -('23455', '0.3035', '0', '0', 'Priest - Holy Nova Heal Rank 1'), -('23458', '0.3035', '0', '0', 'Priest - Holy Nova Heal Rank 2'), -('23459', '0.3035', '0', '0', 'Priest - Holy Nova Heal Rank 3'), -('27803', '0.3035', '0', '0', 'Priest - Holy Nova Heal Rank 4'), -('27804', '0.3035', '0', '0', 'Priest - Holy Nova Heal Rank 5'), -('27805', '0.3035', '0', '0', 'Priest - Holy Nova Heal Rank 6'), -('25329', '0.3035', '0', '0', 'Priest - Holy Nova Heal Rank 7'), +('23455', '0.3035', '0', '0', 'Priest - Holy Nova Heal'), ('17', '0.8068', '0', '0', 'Priest - Power Word: Shield'), ('596', '0.8086', '0', '0', 'Priest - Prayer of Healing'), ('33110', '0.8068', '0', '0', 'Priest - Prayer of Mending Heal Proc'), @@ -13718,8 +13678,7 @@ INSERT INTO `spell_bonus_data` VALUES ('8129', '0', '0', '0', 'Priest - Mana Burn'), ('8092', '0.4296', '0', '0', 'Priest - Mind Blast'), ('15407', '0.257', '0', '0', 'Priest - Mind Flay'), -('49821', '0.14286', '0', '0', 'Priest - Mind Sear Trigger Rank 1'), -('53022', '0.14286', '0', '0', 'Priest - Mind Sear Trigger Rank 2'), +('49821', '0.14286', '0', '0', 'Priest - Mind Sear Trigger'), ('34433', '0.65', '0', '0', 'Priest - Shadowfiend'), ('32379', '0.4296', '0', '0', 'Priest - Shadow Word: Death'), ('589', '0', '0.1829', '0', 'Priest - Shadow Word: Pain'), @@ -13732,66 +13691,16 @@ INSERT INTO `spell_bonus_data` VALUES ('61295', '0.4', '0.18', '0', 'Shaman - Riptide'), ('421', '0.57', '0', '0', 'Shaman - Chain Lightning'), ('8042', '0.3858', '0', '0', 'Shaman - Earth Shock'), -('8443', '0.2142', '0', '0', 'Shaman - Fire Nova Totem Casted by Totem Rank 1'), -('8504', '0.2142', '0', '0', 'Shaman - Fire Nova Totem Casted by Totem Rank 2'), -('8505', '0.2142', '0', '0', 'Shaman - Fire Nova Totem Casted by Totem Rank 3'), -('11310', '0.2142', '0', '0', 'Shaman - Fire Nova Totem Casted by Totem Rank 4'), -('11311', '0.2142', '0', '0', 'Shaman - Fire Nova Totem Casted by Totem Rank 5'), -('25538', '0.2142', '0', '0', 'Shaman - Fire Nova Totem Casted by Totem Rank 6'), -('25539', '0.2142', '0', '0', 'Shaman - Fire Nova Totem Casted by Totem Rank 7'), -('61651', '0.2142', '0', '0', 'Shaman - Fire Nova Totem Casted by Totem Rank 8'), -('61660', '0.2142', '0', '0', 'Shaman - Fire Nova Totem Casted by Totem Rank 9'), +('8443', '0.2142', '0', '0', 'Shaman - Fire Nova Totem Casted by Totem'), ('8050', '0.2142', '0.1', '0', 'Shaman - Flame Shock'), -('8026', '0.1', '0', '0', 'Shaman - Flametongue Weapon Proc Rank 1'), -('8028', '0.1', '0', '0', 'Shaman - Flametongue Weapon Proc Rank 2'), -('8029', '0.1', '0', '0', 'Shaman - Flametongue Weapon Proc Rank 3'), -('10445', '0.1', '0', '0', 'Shaman - Flametongue Weapon Proc Rank 4'), -('16343', '0.1', '0', '0', 'Shaman - Flametongue Weapon Proc Rank 5'), -('16344', '0.1', '0', '0', 'Shaman - Flametongue Weapon Proc Rank 6'), -('25488', '0.1', '0', '0', 'Shaman - Flametongue Weapon Proc Rank 7'), -('58786', '0.1', '0', '0', 'Shaman - Flametongue Weapon Proc Rank 8'), -('58787', '0.1', '0', '0', 'Shaman - Flametongue Weapon Proc Rank 9'), -('58788', '0.1', '0', '0', 'Shaman - Flametongue Weapon Proc Rank 10'), +('8026', '0.1', '0', '0', 'Shaman - Flametongue Weapon Proc'), ('8056', '0.3858', '0', '0', 'Shaman - Frost Shock'), ('8034', '0.1', '0', '0', 'Shaman - Frostbrand Attack Rank 1'), -('8037', '0.1', '0', '0', 'Shaman - Frostbrand Attack Rank 2'), -('10458', '0.1', '0', '0', 'Shaman - Frostbrand Attack Rank 3'), -('16352', '0.1', '0', '0', 'Shaman - Frostbrand Attack Rank 4'), -('16353', '0.1', '0', '0', 'Shaman - Frostbrand Attack Rank 5'), -('25501', '0.1', '0', '0', 'Shaman - Frostbrand Attack Rank 6'), -('58797', '0.1', '0', '0', 'Shaman - Frostbrand Attack Rank 7'), -('58798', '0.1', '0', '0', 'Shaman - Frostbrand Attack Rank 8'), -('58799', '0.1', '0', '0', 'Shaman - Frostbrand Attack Rank 9'), ('51505', '0.5714', '0', '0', 'Shaman - Lava Burst'), ('403', '0.7143', '0', '0', 'Shaman - Lightning Bolt'), -('26364', '0.33', '0', '0', 'Shaman - Lightning Shield Proc Rank 1'), -('26365', '0.33', '0', '0', 'Shaman - Lightning Shield Proc Rank 2'), -('26366', '0.33', '0', '0', 'Shaman - Lightning Shield Proc Rank 3'), -('26367', '0.33', '0', '0', 'Shaman - Lightning Shield Proc Rank 4'), -('26369', '0.33', '0', '0', 'Shaman - Lightning Shield Proc Rank 5'), -('26370', '0.33', '0', '0', 'Shaman - Lightning Shield Proc Rank 6'), -('26363', '0.33', '0', '0', 'Shaman - Lightning Shield Proc Rank 7'), -('26371', '0.33', '0', '0', 'Shaman - Lightning Shield Proc Rank 8'), -('26372', '0.33', '0', '0', 'Shaman - Lightning Shield Proc Rank 9'), -('49278', '0.33', '0', '0', 'Shaman - Lightning Shield Proc Rank 10'), -('49279', '0.33', '0', '0', 'Shaman - Lightning Shield Proc Rank 11'), -('8188', '0.1', '0', '0', 'Shaman - Magma Totam Passive Rank 1'), -('10582', '0.1', '0', '0', 'Shaman - Magma Totam Passive Rank 2'), -('10583', '0.1', '0', '0', 'Shaman - Magma Totam Passive Rank 3'), -('10584', '0.1', '0', '0', 'Shaman - Magma Totam Passive Rank 4'), -('25551', '0.1', '0', '0', 'Shaman - Magma Totam Passive Rank 5'), -('58733', '0.1', '0', '0', 'Shaman - Magma Totam Passive Rank 6'), -('58736', '0.1', '0', '0', 'Shaman - Magma Totam Passive Rank 7'), -('3606', '0.1667', '0', '0', 'Shaman - Searing Totem Attack Rank 1'), -('6350', '0.1667', '0', '0', 'Shaman - Searing Totem Attack Rank 2'), -('6351', '0.1667', '0', '0', 'Shaman - Searing Totem Attack Rank 3'), -('6352', '0.1667', '0', '0', 'Shaman - Searing Totem Attack Rank 4'), -('10435', '0.1667', '0', '0', 'Shaman - Searing Totem Attack Rank 5'), -('10436', '0.1667', '0', '0', 'Shaman - Searing Totem Attack Rank 6'), -('25530', '0.1667', '0', '0', 'Shaman - Searing Totem Attack Rank 7'), -('58700', '0.1667', '0', '0', 'Shaman - Searing Totem Attack Rank 8'), -('58701', '0.1667', '0', '0', 'Shaman - Searing Totem Attack Rank 9'), -('58702', '0.1667', '0', '0', 'Shaman - Searing Totem Attack Rank 10'), +('26364', '0.33', '0', '0', 'Shaman - Lightning Shield Proc'), +('8188', '0.1', '0', '0', 'Shaman - Magma Totam Passive'), +('3606', '0.1667', '0', '0', 'Shaman - Searing Totem Attack'), ('980', '0', '0.1', '0', 'Warlock - Curse of Agony'), ('603', '0', '2', '0', 'Warlock - Curse of Doom'), ('172', '0', '0.3', '0', 'Warlock - Corruption'), @@ -13814,23 +13723,9 @@ INSERT INTO `spell_bonus_data` VALUES ('1120', '0', '0.4286', '0', 'Warlock - Drain Soul'), ('755', '0', '0.4485', '0', 'Warlock - Health Funnel'), ('1949', '0', '0.0946', '0', 'Warlock - Hellfire'), -('5857', '0.1428', '0', '0', 'Warlock - Hellfire Effect on Enemy Rank 1'), -('11681', '0.1428', '0', '0', 'Warlock - Hellfire Effect on Enemy Rank 2'), -('11682', '0.1428', '0', '0', 'Warlock - Hellfire Effect on Enemy Rank 3'), -('27214', '0.1428', '0', '0', 'Warlock - Hellfire Effect on Enemy Rank 4'), -('47822', '0.1428', '0', '0', 'Warlock - Hellfire Effect on Enemy Rank 5'), -('42223', '0.952', '0', '0', 'Warlock - Rain of Fire Triggered Rank 1'), -('42224', '0.952', '0', '0', 'Warlock - Rain of Fire Triggered Rank 2'), -('42225', '0.952', '0', '0', 'Warlock - Rain of Fire Triggered Rank 3'), -('42226', '0.952', '0', '0', 'Warlock - Rain of Fire Triggered Rank 4'), -('42218', '0.952', '0', '0', 'Warlock - Rain of Fire Triggered Rank 5'), -('47817', '0.952', '0', '0', 'Warlock - Rain of Fire Triggered Rank 6'), -('47818', '0.952', '0', '0', 'Warlock - Rain of Fire Triggered Rank 7'), -('18220', '0.96', '0', '0', 'Warlock - Dark Pact Rank 1'), -('18937', '0.96', '0', '0', 'Warlock - Dark Pact Rank 2'), -('18938', '0.96', '0', '0', 'Warlock - Dark Pact Rank 3'), -('27265', '0.96', '0', '0', 'Warlock - Dark Pact Rank 4'), -('59092', '0.96', '0', '0', 'Warlock - Dark Pact Rank 5'), +('5857', '0.1428', '0', '0', 'Warlock - Hellfire Effect on Enemy'), +('42223', '0.952', '0', '0', 'Warlock - Rain of Fire Triggered'), +('18220', '0.96', '0', '0', 'Warlock - Dark Pact'), ('6229', '0.3', '0', '0', 'Warlock - Shadow Ward'), ('63106', '0', '0', '0', 'Warlock - Siphon Life Triggered'); /*!40000 ALTER TABLE `spell_bonus_data` ENABLE KEYS */; @@ -13860,6 +13755,27 @@ INSERT INTO spell_chain VALUES /*------------------ --(0) Not associated with skills ------------------*/ +/* Fire Nova Totem Casted by Totem */ +(8443,0,8443,1,0), +(8504,8443,8443,2,0), +(8505,8504,8443,3,0), +(11310,8505,8443,4,0), +(11311,11310,8443,5,0), +(25538,11311,8443,6,0), +(25539,25538,8443,7,0), +(61651,25539,8443,8,0), +(61660,61651,8443,9,0), +/* Flametongue Weapon Proc */ +(8026,0,8026,1,0), +(8028,8026,8026,2,0), +(8029,8028,8026,3,0), +(10445,8029,8026,4,0), +(16343,10445,8026,5,0), +(16344,16343,8026,6,0), +(25488,16344,8026,7,0), +(58786,25488,8026,8,0), +(58787,58786,8026,9,0), +(58788,58787,8026,10,0), /* Frostbrand Attack */ (8034,0,8034,1,0), (8037,8034,8034,2,0), @@ -13880,6 +13796,25 @@ INSERT INTO spell_chain VALUES (26890,11337,8680,7,0), (57964,26890,8680,8,0), (57965,57964,8680,9,0), +/* Magma Totam Passive */ +(8188,0,8188,1,0), +(10582,8188,8188,2,0), +(10583,10582,8188,3,0), +(10584,10583,8188,4,0), +(25551,10584,8188,5,0), +(58733,25551,8188,6,0), +(58736,58733,8188,7,0), +/* Searing Totem Attack */ +(3606,0,3606,1,0), +(6350,3606,3606,2,0), +(6351,6350,3606,3,0), +(6352,6351,3606,4,0), +(10435,6352,3606,5,0), +(10436,10435,3606,6,0), +(25530,10436,3606,7,0), +(58700,25530,3606,8,0), +(58701,58700,3606,9,0), +(58702,58701,3606,10,0), /* Wound Poison */ (13218,0,13218,1,0), (13222,13218,13218,2,0), @@ -13901,6 +13836,16 @@ INSERT INTO spell_chain VALUES (27085,10187,10,7,0), (42939,27085,10,8,0), (42940,42939,10,9,0), +/* Blizzard Triggered Spell */ +(42208,0,42208,1,0), +(42209,42208,42208,2,0), +(42210,42209,42208,3,0), +(42211,42210,42208,4,0), +(42212,42211,42208,5,0), +(42213,42212,42208,6,0), +(42198,42213,42208,7,0), +(42937,42198,42208,8,0), +(42938,42937,42208,9,0), /*ConeofCold*/ (120,0,120,1,0), (8492,120,120,2,0), @@ -13969,7 +13914,7 @@ INSERT INTO spell_chain VALUES /*------------------ --(8)Fire ------------------*/ -/*BlastWave*/ +/*Blast Wave*/ (11113,0,11113,1,0), (13018,11113,11113,2,0), (13019,13018,11113,3,0), @@ -13979,7 +13924,7 @@ INSERT INTO spell_chain VALUES (33933,27133,11113,7,0), (42944,33933,11113,8,0), (42945,42944,11113,9,0), -/*Dragon'sBreath*/ +/*Dragon's Breath*/ (31661,0,31661,1,0), (33041,31661,31661,2,0), (33042,33041,31661,3,0), @@ -14036,17 +13981,21 @@ INSERT INTO spell_chain VALUES (27086,10216,2120,7,0), (42925,27086,2120,8,0), (42926,42925,2120,9,0), -/*FrostfireBolt*/ +/*Frostfire Bolt*/ (44614,0,44614,1,0), (47610,44614,44614,2,0), -/*LivingBomb*/ +/*Living Bomb*/ (44457,0,44457,1,0), (55359,44457,44457,2,0), (55360,55359,44457,3,0), -/*MoltenArmor*/ +/*Molten Armor*/ (30482,0,30482,1,0), (43045,30482,30482,2,0), (43046,43045,30482,3,0), +/* Molten Armor Triggered */ +(34913,0,34913,1,0), +(43043,34913,34913,2,0), +(43044,43043,34913,3,0), /*Pyroblast*/ (11366,0,11366,1,0), (12505,11366,11366,2,0), @@ -14302,7 +14251,7 @@ INSERT INTO spell_chain VALUES (34866,34865,34861,5,0), (48088,34866,34861,6,0), (48089,48088,34861,7,0), -/*DesperatePrayer*/ +/*Desperate Prayer*/ (19236,0,19236,1,0), (19238,19236,19236,2,0), (19240,19238,19236,3,0), @@ -14316,7 +14265,7 @@ INSERT INTO spell_chain VALUES (63534,0,63534,1,0), (63542,63534,63534,2,0), (63543,63542,63534,3,0), -/*FlashHeal*/ +/*Flash Heal*/ (2061,0,2061,1,0), (9472,2061,2061,2,0), (9473,9472,2061,3,0), @@ -14328,7 +14277,7 @@ INSERT INTO spell_chain VALUES (25235,25233,2061,9,0), (48070,25235,2061,10,0), (48071,48070,2061,11,0), -/*GreaterHeal*/ +/*Greater Heal*/ (2060,0,2060,1,0), (10963,2060,2060,2,0), (10964,10963,2060,3,0), @@ -14365,7 +14314,15 @@ INSERT INTO spell_chain VALUES (25331,27801,15237,7,0), (48077,25331,15237,8,0), (48078,48077,15237,9,0), -/*LesserHeal*/ +/* Holy Nova Heal */ +(23455,0,23455,1,0), +(23458,23455,23455,2,0), +(23459,23458,23455,3,0), +(27803,23459,23455,4,0), +(27804,27803,23455,5,0), +(27805,27804,23455,6,0), +(25329,27805,23455,7,0), +/*Lesser Heal*/ (2050,0,2050,1,0), (2052,2050,2050,2,0), (2053,2052,2050,3,0), @@ -14459,7 +14416,7 @@ INSERT INTO spell_chain VALUES (25375,25372,8092,11,0), (48126,25375,8092,12,0), (48127,48126,8092,13,0), -/*MindFlay*/ +/*Mind Flay*/ (15407,0,15407,1,0), (17311,15407,15407,2,0), (17312,17311,15407,3,0), @@ -14469,9 +14426,12 @@ INSERT INTO spell_chain VALUES (25387,18807,15407,7,0), (48155,25387,15407,8,0), (48156,48155,15407,9,0), -/*MindSear*/ +/*Mind Sear*/ (48045,0,48045,1,0), (53023,48045,48045,2,0), +/* Mind Sear Trigger */ +(49821,0,49821,1,0), +(53022,49821,49821,2,0), /*MindVision*/ (2096,0,2096,1,0), (10909,2096,2096,2,0), @@ -15108,7 +15068,7 @@ INSERT INTO spell_chain VALUES /*------------------ --(236)Pet-Scorpid ------------------*/ -/*ScorpidPoison*/ +/*Scorpid Poison*/ (24640,0,24640,1,0), (24583,24640,24640,2,0), (24586,24583,24640,3,0), @@ -15118,7 +15078,7 @@ INSERT INTO spell_chain VALUES /*------------------ --(237)Arcane ------------------*/ -/*AmplifyMagic*/ +/*Amplify Magic*/ (1008,0,1008,1,0), (8455,1008,1008,2,0), (10169,8455,1008,3,0), @@ -15126,20 +15086,20 @@ INSERT INTO spell_chain VALUES (27130,10170,1008,5,0), (33946,27130,1008,6,0), (43017,33946,1008,7,0), -/*ArcaneBarrage*/ +/*Arcane Barrage*/ (44425,0,44425,1,0), (44780,44425,44425,2,0), (44781,44780,44425,3,0), -/*ArcaneBlast*/ +/*Arcane Blast*/ (30451,0,30451,1,0), (42894,30451,30451,2,0), (42896,42894,30451,3,0), (42897,42896,30451,4,0), -/*ArcaneBrilliance*/ +/*Arcane Brilliance*/ (23028,0,23028,1,0), (27127,23028,23028,2,0), (43002,27127,23028,3,0), -/*ArcaneExplosion*/ +/*Arcane Explosion*/ (1449,0,1449,1,0), (8437,1449,1449,2,0), (8438,8437,1449,3,0), @@ -15150,7 +15110,7 @@ INSERT INTO spell_chain VALUES (27082,27080,1449,8,0), (42920,27082,1449,9,0), (42921,42920,1449,10,0), -/*ArcaneIntellect*/ +/*Arcane Intellect*/ (1459,0,1459,1,0), (1460,1459,1459,2,0), (1461,1460,1459,3,0), @@ -15158,7 +15118,7 @@ INSERT INTO spell_chain VALUES (10157,10156,1459,5,0), (27126,10157,1459,6,0), (42995,27126,1459,7,0), -/*ArcaneMissiles*/ +/*Arcane Missiles*/ (5143,0,5143,1,0), (5144,5143,5143,2,0), (5145,5144,5143,3,0), @@ -15172,7 +15132,21 @@ INSERT INTO spell_chain VALUES (38704,38699,5143,11,0), (42843,38704,5143,12,0), (42846,42843,5143,13,0), -/*ConjureFood*/ +/* Arcane Missiles Triggered Spell */ +(7268,0,7268,1,0), +(7269,7268,7268,2,0), +(7270,7269,7268,3,0), +(8419,7270,7268,4,0), +(8418,8419,7268,5,0), +(10273,8418,7268,6,0), +(10274,10273,7268,7,0), +(25346,10274,7268,8,0), +(27076,25346,7268,9,0), +(38700,27076,7268,10,0), +(38703,38700,7268,11,0), +(42844,38703,7268,12,0), +(42845,42844,7268,13,0), +/*Conjure Food*/ (587,0,587,1,0), (597,587,587,2,0), (990,597,587,3,0), @@ -15181,7 +15155,7 @@ INSERT INTO spell_chain VALUES (10145,10144,587,6,0), (28612,10145,587,7,0), (33717,28612,587,8,0), -/*ConjureManaGem*/ +/*Conjure Mana Gem*/ (759,0,759,1,0), (3552,759,759,2,0), (10053,3552,759,3,0), @@ -15785,6 +15759,18 @@ INSERT INTO spell_chain VALUES (25472,25469,324,9,0), (49280,25472,324,10,0), (49281,49280,324,11,0), +/* Lightning Shield Proc */ +(26364,0,26364,1,0), +(26365,26364,26364,2,0), +(26366,26365,26364,3,0), +(26367,26366,26364,4,0), +(26369,26367,26364,5,0), +(26370,26369,26364,6,0), +(26363,26370,26364,7,0), +(26371,26363,26364,8,0), +(26372,26371,26364,9,0), +(49278,26372,26364,10,0), +(49279,49278,26364,11,0), /*Nature Resistance Totem*/ (10595,0,10595,1,0), (10600,10595,10595,2,0), @@ -16145,7 +16131,7 @@ INSERT INTO spell_chain VALUES (26983,9863,740,5,0), (48446,26983,740,6,0), (48447,48446,740,7,0), -/*WildGrowth*/ +/*Wild Growth*/ (48438,0,48438,1,0), (53248,48438,48438,2,0), (53249,53248,48438,3,0), @@ -16181,7 +16167,7 @@ INSERT INTO spell_chain VALUES (17402,17401,16914,3,0), (27012,17402,16914,4,0), (48467,27012,16914,5,0), -/*InsectSwarm*/ +/*Insect Swarm*/ (5570,0,5570,1,0), (24974,5570,5570,2,0), (24975,24974,5570,3,0), @@ -16204,7 +16190,7 @@ INSERT INTO spell_chain VALUES (26988,26987,8921,12,0), (48462,26988,8921,13,0), (48463,48462,8921,14,0), -/*SootheAnimal*/ +/*Soothe Animal*/ (2908,0,2908,1,0), (8955,2908,2908,2,0), (9901,8955,2908,3,0), @@ -16266,7 +16252,7 @@ INSERT INTO spell_chain VALUES /*------------------ --(593)Destruction ------------------*/ -/*ChaosBolt*/ +/*Chaos Bolt*/ (50796,0,50796,1,0), (59170,50796,50796,2,0), (59171,59170,50796,3,0), @@ -16277,6 +16263,12 @@ INSERT INTO spell_chain VALUES (11684,11683,1949,3,0), (27213,11684,1949,4,0), (47823,27213,1949,5,0), +/* Hellfire Effect on Enemy */ +(5857,0,5857,1,0), +(11681,5857,5857,2,0), +(11682,11681,5857,3,0), +(27214,11682,5857,4,0), +(47822,27214,5857,5,0), /*Immolate*/ (348,0,348,1,0), (707,348,348,2,0), @@ -16298,7 +16290,7 @@ INSERT INTO spell_chain VALUES (63349,0,63349,1,0), (63350,63349,63349,2,0), (63351,63350,63349,3,0), -/*RainofFire*/ +/*Rain of Fire*/ (5740,0,5740,1,0), (6219,5740,5740,2,0), (11677,6219,5740,3,0), @@ -16306,7 +16298,15 @@ INSERT INTO spell_chain VALUES (27212,11678,5740,5,0), (47819,27212,5740,6,0), (47820,47819,5740,7,0), -/*SearingPain*/ +/* Rain of Fire Triggered */ +(42223,0,42223,1,0), +(42224,42223,42223,2,0), +(42225,42224,42223,3,0), +(42226,42225,42223,4,0), +(42218,42226,42223,5,0), +(47817,42218,42223,6,0), +(47818,47817,42223,7,0), +/*Searing Pain*/ (5676,0,5676,1,0), (17919,5676,5676,2,0), (17920,17919,5676,3,0), @@ -16317,7 +16317,7 @@ INSERT INTO spell_chain VALUES (30459,27210,5676,8,0), (47814,30459,5676,9,0), (47815,47814,5676,10,0), -/*ShadowBolt*/ +/*Shadow Bolt*/ (686,0,686,1,0), (695,686,686,2,0), (705,695,686,3,0), @@ -16420,7 +16420,7 @@ INSERT INTO spell_chain VALUES (27136,27135,635,11,0), (48781,27136,635,12,0), (48782,48781,635,13,0), -/*HolyShock*/ +/*Holy Shock*/ (20473,0,20473,1,0), (20929,20473,20473,2,0), (20930,20929,20473,3,0), @@ -16428,7 +16428,23 @@ INSERT INTO spell_chain VALUES (33072,27174,20473,5,0), (48824,33072,20473,6,0), (48825,48824,20473,7,0), -/*HolyWrath*/ +/* Holy Shock Triggered Hurt */ +(25912,0,25912,1,0), +(25911,25912,25912,2,0), +(25902,25911,25912,3,0), +(27176,25902,25912,4,0), +(33073,27176,25912,5,0), +(48822,33073,25912,6,0), +(48823,48822,25912,7,0), +/* Holy Shock Triggered Heal */ +(25914,0,25914,1,0), +(25913,25914,25914,2,0), +(25903,25913,25914,3,0), +(27175,25903,25914,4,0), +(33074,27175,25914,5,0), +(48820,33074,25914,6,0), +(48821,48820,25914,7,0), +/*Holy Wrath*/ (2812,0,2812,1,0), (10318,2812,2812,2,0), (27139,10318,2812,3,0), @@ -17161,9 +17177,6 @@ LOCK TABLES `spell_proc_event` WRITE; /*!40000 ALTER TABLE `spell_proc_event` DISABLE KEYS */; INSERT INTO `spell_proc_event` VALUES ( 324, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 3), -( 325, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 3), -( 905, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 3), -( 945, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 3), ( 974, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 3), ( 1463, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000400, 0.000000, 0.000000, 0), ( 3232, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), @@ -17171,19 +17184,11 @@ INSERT INTO `spell_proc_event` VALUES ( 6346, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000100, 0.000000, 0.000000, 0), ( 7383, 0x00000001, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000100, 0.000000, 0.000000, 0), ( 7434, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), -( 8134, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 3), ( 8178, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0.000000, 0.000000, 0), -( 8494, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000400, 0.000000, 0.000000, 0), -( 8495, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000400, 0.000000, 0.000000, 0), ( 9452, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 3.000000, 0.000000, 0), ( 9782, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000040, 0.000000, 0.000000, 0), ( 9784, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000040, 0.000000, 0.000000, 0), ( 9799, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), -(10191, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000400, 0.000000, 0.000000, 0), -(10192, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000400, 0.000000, 0.000000, 0), -(10193, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000400, 0.000000, 0.000000, 0), -(10431, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 3), -(10432, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 3), (11095, 0x00000000, 3, 0x00000010, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (11119, 0x00000004, 3, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), (11120, 0x00000004, 3, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), @@ -17254,11 +17259,6 @@ INSERT INTO `spell_proc_event` VALUES (14193, 0x00000000, 8, 0x40800508, 0x00000002, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), (14194, 0x00000000, 8, 0x40800508, 0x00000002, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), (14195, 0x00000000, 8, 0x40800508, 0x00000002, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), -(14318, 0x00000000, 9, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), -(14319, 0x00000000, 9, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), -(14320, 0x00000000, 9, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), -(14321, 0x00000000, 9, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), -(14322, 0x00000000, 9, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (14531, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), (14774, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), (14892, 0x00000000, 6, 0x10001E00, 0x00010004, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), @@ -17349,8 +17349,6 @@ INSERT INTO `spell_proc_event` VALUES (20705, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), (20911, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000070, 0.000000, 0.000000, 0), (20925, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000040, 0.000000, 0.000000, 0), -(20927, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000040, 0.000000, 0.000000, 0), -(20928, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000040, 0.000000, 0.000000, 0), (21185, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 10), (21882, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), (21890, 0x00000000, 4, 0x2A764EEF, 0x0000036C, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), @@ -17373,16 +17371,11 @@ INSERT INTO `spell_proc_event` VALUES (23920, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000800, 0.000000, 0.000000, 0), (24353, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), (24389, 0x00000000, 3, 0x00C00017, 0x00000040, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), -(24398, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 3), (24658, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00014110, 0x00000000, 0.000000, 0.000000, 0), (24905, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 15.000000, 0.000000, 0), (24932, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 6), (25050, 0x00000004, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), -(25296, 0x00000000, 9, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), -(25469, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 3), -(25472, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 3), (25669, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 1.000000, 0.000000, 0), -(25899, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000070, 0.000000, 0.000000, 0), (25988, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), (26016, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 2.000000, 0.000000, 0), (26107, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000064, 0.000000, 0.000000, 0), @@ -17391,9 +17384,6 @@ INSERT INTO `spell_proc_event` VALUES (26135, 0x00000000, 10, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0.000000, 0.000000, 0), (26480, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 3.000000, 0.000000, 0), (26605, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), -(27044, 0x00000000, 9, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), -(27131, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000400, 0.000000, 0.000000, 0), -(27179, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000040, 0.000000, 0.000000, 0), (27419, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 3.000000, 0.000000, 0), (27498, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 3.000000, 0.000000, 0), (27521, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0.000000, 0.000000, 0), @@ -17495,8 +17485,6 @@ INSERT INTO `spell_proc_event` VALUES (32394, 0x00000000, 5, 0x00000402, 0x00000011, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (32409, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (32587, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000040, 0.000000, 0.000000, 0), -(32593, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 3), -(32594, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 3), (32642, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000040, 0.000000, 0.000000, 0), (32734, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 3), (32748, 0x00000000, 8, 0x00000000, 0x00000001, 0x00000000, 0x00000140, 0x00000000, 0.000000, 0.000000, 0), @@ -17521,11 +17509,9 @@ INSERT INTO `spell_proc_event` VALUES (33510, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 5.000000, 0.000000, 0), (33648, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), (33719, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000800, 0.000000, 0.000000, 0), -(33736, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 3), (33746, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 10), (33757, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 3), (33759, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 10), -(33776, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00008800, 0x00000000, 0.000000, 0.000000, 0), (33881, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), (33882, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), (33883, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), @@ -17555,8 +17541,6 @@ INSERT INTO `spell_proc_event` VALUES (34859, 0x00000000, 6, 0x00001800, 0x00000004, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), (34860, 0x00000000, 6, 0x00001800, 0x00000004, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), (34914, 0x00000000, 6, 0x00002000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), -(34916, 0x00000000, 6, 0x00002000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), -(34917, 0x00000000, 6, 0x00002000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (34935, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 8), (34938, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 8), (34939, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 8), @@ -17646,8 +17630,6 @@ INSERT INTO `spell_proc_event` VALUES (42368, 0x00000000, 10, 0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (42370, 0x00000000, 11, 0x00000040, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (42770, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0.000000, 0.000000, 0), -(43019, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000400, 0.000000, 0.000000, 0), -(43020, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000400, 0.000000, 0.000000, 0), (43338, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), (43443, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000800, 0.000000, 0.000000, 0), (43726, 0x00000000, 10, 0x40000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), @@ -17731,10 +17713,6 @@ INSERT INTO `spell_proc_event` VALUES (47582, 0x00000000, 6, 0x00000000, 0x00000000, 0x00000040, 0x00000000, 0x00010000, 0.000000, 0.000000, 0), (48110, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x000A02A8, 0x00000000, 0.000000, 0.000000, 0), (48111, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x000A02A8, 0x00000000, 0.000000, 0.000000, 0), -(48112, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x000A02A8, 0x00000000, 0.000000, 0.000000, 0), -(48113, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x000A02A8, 0x00000000, 0.000000, 0.000000, 0), -(48159, 0x00000000, 6, 0x00002000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), -(48160, 0x00000000, 6, 0x00002000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (48483, 0x00000000, 7, 0x00008800, 0x00000440, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (48484, 0x00000000, 7, 0x00008800, 0x00000440, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (48485, 0x00000000, 7, 0x00008800, 0x00000440, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), @@ -17750,18 +17728,12 @@ INSERT INTO `spell_proc_event` VALUES (48833, 0x00000000, 7, 0x00000000, 0x00000440, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (48835, 0x00000000, 10, 0x00000000, 0x00000008, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (48837, 0x00000000, 11, 0x90100000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), -(48951, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000040, 0.000000, 0.000000, 0), -(48952, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000040, 0.000000, 0.000000, 0), (48988, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), (49018, 0x00000000, 15, 0x01400000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (49137, 0x00000000, 15, 0x00000000, 0x00004000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (49188, 0x00000000, 15, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (49208, 0x00000000, 15, 0x00440000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (49222, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 3), -(49280, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 3), -(49281, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 3), -(49283, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 3), -(49284, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 3), (49503, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), (49504, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), (49529, 0x00000000, 15, 0x01400000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), @@ -17823,11 +17795,6 @@ INSERT INTO `spell_proc_event` VALUES (52008, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 20.000000, 0), (52020, 0x00000000, 7, 0x00008000, 0x00100000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (52127, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 3), -(52129, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 3), -(52131, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 3), -(52134, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 3), -(52136, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 3), -(52138, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 3), (52420, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 30), (52423, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000020, 0.000000, 0.000000, 0), (52795, 0x00000000, 6, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), @@ -17920,7 +17887,6 @@ INSERT INTO `spell_proc_event` VALUES (57878, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000010, 0.000000, 0.000000, 0), (57880, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000010, 0.000000, 0.000000, 0), (57881, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000010, 0.000000, 0.000000, 0), -(57960, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 3), (58357, 0x00000000, 4, 0x00000040, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), (58364, 0x00000000, 4, 0x00000400, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (58372, 0x00000000, 4, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), @@ -17973,11 +17939,8 @@ INSERT INTO `spell_proc_event` VALUES (61847, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000010, 0.000000, 0.000000, 0), (63108, 0x00000000, 5, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (63156, 0x00000000, 0, 0x00000001, 0x00000040, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), -(63158, 0x00000000, 0, 0x00000001, 0x00000040, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (63245, 0x00000000, 5, 0x00000100, 0x00800000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), -(63730, 0x00000000, 6, 0x00000800, 0x00000004, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), -(63733, 0x00000000, 6, 0x00000800, 0x00000004, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), -(63737, 0x00000000, 6, 0x00000800, 0x00000004, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0); +(63730, 0x00000000, 6, 0x00000800, 0x00000004, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0); /*!40000 ALTER TABLE `spell_proc_event` ENABLE KEYS */; UNLOCK TABLES; diff --git a/sql/updates/8251_01_mangos_spell_chain.sql b/sql/updates/8251_01_mangos_spell_chain.sql new file mode 100644 index 000000000..9002e853d --- /dev/null +++ b/sql/updates/8251_01_mangos_spell_chain.sql @@ -0,0 +1,141 @@ +ALTER TABLE db_version CHANGE COLUMN required_8250_01_mangos_spell_threat required_8251_01_mangos_spell_chain bit; + +DELETE FROM `spell_chain` WHERE `spell_id` IN ( + 7268,7269,7270,8419,8418,10273,10274,25346,27076,38700,38703,42844,42845, + 42208,42209,42210,42211,42212,42213,42198,42937,42938, + 34913,43043,43044, + 25912,25911,25902,27176,33073,48822,48823, + 25914,25913,25903,27175,33074,48820,48821, + 23455,23458,23459,27803,27804,27805,25329, + 49821,53022, + 8443,8504,8505,11310,11311,25538,25539,61651,61660, + 8026,8028,8029,10445,16343,16344,25488,58786,58787,58788, + 26364,26365,26366,26367,26369,26370,26363,26371,26372,49278,49279, + 8188,10582,10583,10584,25551,58733,58736, + 3606,6350,6351,6352,10435,10436,25530,58700,58701,58702, + 5857,11681,11682,27214,47822, + 42223,42224,42225,42226,42218,47817,47818 +); + +INSERT INTO `spell_chain` (`spell_id`, `prev_spell`, `first_spell`, `rank`, `req_spell`) VALUES +/* Arcane Missiles Triggered Spell */ +(7268,0,7268,1,0), +(7269,7268,7268,2,0), +(7270,7269,7268,3,0), +(8419,7270,7268,4,0), +(8418,8419,7268,5,0), +(10273,8418,7268,6,0), +(10274,10273,7268,7,0), +(25346,10274,7268,8,0), +(27076,25346,7268,9,0), +(38700,27076,7268,10,0), +(38703,38700,7268,11,0), +(42844,38703,7268,12,0), +(42845,42844,7268,13,0), +/* Blizzard Triggered Spell */ +(42208,0,42208,1,0), +(42209,42208,42208,2,0), +(42210,42209,42208,3,0), +(42211,42210,42208,4,0), +(42212,42211,42208,5,0), +(42213,42212,42208,6,0), +(42198,42213,42208,7,0), +(42937,42198,42208,8,0), +(42938,42937,42208,9,0), +/* Molten Armor Triggered */ +(34913,0,34913,1,0), +(43043,34913,34913,2,0), +(43044,43043,34913,3,0), +/* Holy Shock Triggered Hurt */ +(25912,0,25912,1,0), +(25911,25912,25912,2,0), +(25902,25911,25912,3,0), +(27176,25902,25912,4,0), +(33073,27176,25912,5,0), +(48822,33073,25912,6,0), +(48823,48822,25912,7,0), +/* Holy Shock Triggered Heal */ +(25914,0,25914,1,0), +(25913,25914,25914,2,0), +(25903,25913,25914,3,0), +(27175,25903,25914,4,0), +(33074,27175,25914,5,0), +(48820,33074,25914,6,0), +(48821,48820,25914,7,0), +/* Holy Nova Heal */ +(23455,0,23455,1,0), +(23458,23455,23455,2,0), +(23459,23458,23455,3,0), +(27803,23459,23455,4,0), +(27804,27803,23455,5,0), +(27805,27804,23455,6,0), +(25329,27805,23455,7,0), +/* Mind Sear Trigger */ +(49821,0,49821,1,0), +(53022,49821,49821,2,0), +/* Fire Nova Totem Casted by Totem */ +(8443,0,8443,1,0), +(8504,8443,8443,2,0), +(8505,8504,8443,3,0), +(11310,8505,8443,4,0), +(11311,11310,8443,5,0), +(25538,11311,8443,6,0), +(25539,25538,8443,7,0), +(61651,25539,8443,8,0), +(61660,61651,8443,9,0), +/* Flametongue Weapon Proc */ +(8026,0,8026,1,0), +(8028,8026,8026,2,0), +(8029,8028,8026,3,0), +(10445,8029,8026,4,0), +(16343,10445,8026,5,0), +(16344,16343,8026,6,0), +(25488,16344,8026,7,0), +(58786,25488,8026,8,0), +(58787,58786,8026,9,0), +(58788,58787,8026,10,0), +/* Lightning Shield Proc */ +(26364,0,26364,1,0), +(26365,26364,26364,2,0), +(26366,26365,26364,3,0), +(26367,26366,26364,4,0), +(26369,26367,26364,5,0), +(26370,26369,26364,6,0), +(26363,26370,26364,7,0), +(26371,26363,26364,8,0), +(26372,26371,26364,9,0), +(49278,26372,26364,10,0), +(49279,49278,26364,11,0), +/* Magma Totam Passive */ +(8188,0,8188,1,0), +(10582,8188,8188,2,0), +(10583,10582,8188,3,0), +(10584,10583,8188,4,0), +(25551,10584,8188,5,0), +(58733,25551,8188,6,0), +(58736,58733,8188,7,0), +/* Searing Totem Attack */ +(3606,0,3606,1,0), +(6350,3606,3606,2,0), +(6351,6350,3606,3,0), +(6352,6351,3606,4,0), +(10435,6352,3606,5,0), +(10436,10435,3606,6,0), +(25530,10436,3606,7,0), +(58700,25530,3606,8,0), +(58701,58700,3606,9,0), +(58702,58701,3606,10,0), +/* Hellfire Effect on Enemy */ +(5857,0,5857,1,0), +(11681,5857,5857,2,0), +(11682,11681,5857,3,0), +(27214,11682,5857,4,0), +(47822,27214,5857,5,0), +/* Rain of Fire Triggered */ +(42223,0,42223,1,0), +(42224,42223,42223,2,0), +(42225,42224,42223,3,0), +(42226,42225,42223,4,0), +(42218,42226,42223,5,0), +(47817,42218,42223,6,0), +(47818,47817,42223,7,0); diff --git a/sql/updates/8251_02_mangos_spell_bonus_data.sql b/sql/updates/8251_02_mangos_spell_bonus_data.sql new file mode 100644 index 000000000..53df1b1c6 --- /dev/null +++ b/sql/updates/8251_02_mangos_spell_bonus_data.sql @@ -0,0 +1,23 @@ +ALTER TABLE db_version CHANGE COLUMN required_8251_01_mangos_spell_chain required_8251_02_mangos_spell_bonus_data bit; + +DELETE FROM `spell_bonus_data` where entry in ( + 49941,48721, + 8037,10458,16352,16353,25501,58797,58798,58799,18937,18938,27265,59092,49941, + 7269,7270,8419,8418,10273,10274,25346,27076,38700,38703,42844,42845, + 42209,42210,42211,42212,42213,42198,42937,42938, + 43043,43044, + 25911,25902,27176,33073,48822,48823, + 25913,25903,27175,33074,48820,48821, + 23458,23459,27803,27804,27805,25329, + 53022, + 8504,8505,11310,11311,25538,25539,61651,61660, + 8028,8029,10445,16343,16344,25488,58786,58787,58788, + 26365,26366,26367,26369,26370,26363,26371,26372,49278,49279, + 10582,10583,10584,25551,58733,58736, + 6350,6351,6352,10435,10436,25530,58700,58701,58702, + 11681,11682,27214,47822, + 42224,42225,42226,42218,47817,47818 +); + +INSERT INTO `spell_bonus_data` VALUES +('48721', '0', '0', '0.04', 'Death Knight - Blood Boil'); diff --git a/sql/updates/8251_03_mangos_spell_proc_event.sql b/sql/updates/8251_03_mangos_spell_proc_event.sql new file mode 100644 index 000000000..afcac12a8 --- /dev/null +++ b/sql/updates/8251_03_mangos_spell_proc_event.sql @@ -0,0 +1,8 @@ +ALTER TABLE db_version CHANGE COLUMN required_8251_02_mangos_spell_bonus_data required_8251_03_mangos_spell_proc_event bit; + +DELETE FROM `spell_proc_event` WHERE entry IN ( + 325,905,945,8134,8494,8495,10191,10192,10193,10431,10432,14318,14319,14320, + 14321,14322,20927,20928,24398,25296,25469,25472,25899,27044,27131,27179,32593, + 32594,33736,33776,34916,34917,43019,43020,63158,48159,48160,48951,48952,49280, + 49281,49283,49284,52129,52131,52134,52136,52138,57960,48112,48113,63733,63737 +); diff --git a/sql/updates/Makefile.am b/sql/updates/Makefile.am index c7898fb10..463d1c432 100644 --- a/sql/updates/Makefile.am +++ b/sql/updates/Makefile.am @@ -255,6 +255,9 @@ pkgdata_DATA = \ 8249_01_mangos_spell_proc_item_enchant.sql \ 8249_02_mangos_spell_chain.sql \ 8250_01_mangos_spell_threat.sql \ + 8251_01_mangos_spell_chain.sql \ + 8251_02_mangos_spell_bonus_data.sql \ + 8251_03_mangos_spell_proc_event.sql \ README ## Additional files to include when running 'make dist' @@ -490,4 +493,7 @@ EXTRA_DIST = \ 8249_01_mangos_spell_proc_item_enchant.sql \ 8249_02_mangos_spell_chain.sql \ 8250_01_mangos_spell_threat.sql \ + 8251_01_mangos_spell_chain.sql \ + 8251_02_mangos_spell_bonus_data.sql \ + 8251_03_mangos_spell_proc_event.sql \ README diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp index 722cef4f7..487267322 100644 --- a/src/game/Pet.cpp +++ b/src/game/Pet.cpp @@ -1918,13 +1918,19 @@ void Pet::CastPetAura(PetAura const* aura) CastSpell(this, auraId, true); } +struct DoPetLearnSpell +{ + DoPetLearnSpell(Pet& _pet) : pet(_pet) {} + void operator() (uint32 spell_id) { pet.learnSpell(spell_id); } + Pet& pet; +}; + void Pet::learnSpellHighRank(uint32 spellid) { learnSpell(spellid); - SpellChainMapNext const& nextMap = spellmgr.GetSpellChainNext(); - for(SpellChainMapNext::const_iterator itr = nextMap.lower_bound(spellid); itr != nextMap.upper_bound(spellid); ++itr) - learnSpellHighRank(itr->second); + DoPetLearnSpell worker(*this); + spellmgr.doForHighRanks(spellid,worker); } void Pet::SynchronizeLevelWithOwner() diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 62fe327d7..432da969c 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -7028,8 +7028,7 @@ void Player::CastItemCombatSpell(Unit* Target, WeaponAttackType attType) } // Use first rank to access spell item enchant procs - uint32 firstRank = spellmgr.GetFirstSpellInChain(spellInfo->Id); - float ppmRate = spellmgr.GetItemEnchantProcChance(firstRank); + float ppmRate = spellmgr.GetItemEnchantProcChance(spellInfo->Id); float chance = ppmRate ? GetPPMProcChance(proto->Delay, ppmRate) @@ -19680,13 +19679,19 @@ bool Player::IsAllowUseFlyMountsHere() const return v_map == 530 || v_map == 571 && HasSpell(54197); } +struct DoPlayerLearnSpell +{ + DoPlayerLearnSpell(Player& _player) : player(_player) {} + void operator() (uint32 spell_id) { player.learnSpell(spell_id,false); } + Player& player; +}; + void Player::learnSpellHighRank(uint32 spellid) { learnSpell(spellid,false); - SpellChainMapNext const& nextMap = spellmgr.GetSpellChainNext(); - for(SpellChainMapNext::const_iterator itr = nextMap.lower_bound(spellid); itr != nextMap.upper_bound(spellid); ++itr) - learnSpellHighRank(itr->second); + DoPlayerLearnSpell worker(*this); + spellmgr.doForHighRanks(spellid,worker); } void Player::_LoadSkills() diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index b9a97109e..95997a3d8 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -700,6 +700,13 @@ bool SpellMgr::IsAffectedByMod(SpellEntry const *spellInfo, SpellModifier *mod) return false; } +struct DoSpellProcEvent +{ + DoSpellProcEvent(SpellProcEventEntry const& _spe) : spe(_spe) {} + void operator() (uint32 spell_id) { spellmgr.mSpellProcEventMap[spell_id] = spe; } + SpellProcEventEntry const& spe; +}; + void SpellMgr::LoadSpellProcEvents() { mSpellProcEventMap.clear(); // need for reload case @@ -734,6 +741,15 @@ void SpellMgr::LoadSpellProcEvents() continue; } + uint32 first_id = GetFirstSpellInChain(entry); + + if ( first_id != entry ) + { + sLog.outErrorDb("Spell %u listed in `spell_proc_event` is not first rank (%u) in chain", entry, first_id); + // prevent loading since it won't have an effect anyway + continue; + } + SpellProcEventEntry spe; spe.schoolMask = fields[1].GetUInt32(); @@ -748,6 +764,10 @@ void SpellMgr::LoadSpellProcEvents() mSpellProcEventMap[entry] = spe; + // also add to high ranks + DoSpellProcEvent worker(spe); + doForHighRanks(entry,worker); + if (spell->procFlags==0) { if (spe.procFlags == 0) @@ -769,6 +789,13 @@ void SpellMgr::LoadSpellProcEvents() sLog.outString( ">> Loaded %u extra spell proc event conditions", count ); } +struct DoSpellProcItemEnchant +{ + DoSpellProcItemEnchant(float _ppm) : ppm(_ppm) {} + void operator() (uint32 spell_id) { spellmgr.mSpellProcItemEnchantMap[spell_id] = ppm; } + float ppm; +}; + void SpellMgr::LoadSpellProcItemEnchant() { mSpellProcItemEnchantMap.clear(); // need for reload case @@ -808,15 +835,21 @@ void SpellMgr::LoadSpellProcItemEnchant() continue; } - if ( GetFirstSpellInChain(entry) != entry ) + uint32 first_id = GetFirstSpellInChain(entry); + + if ( first_id != entry ) { - sLog.outErrorDb("Spell %u listed in `spell_proc_item_enchant` is not first rank in chain", entry); + sLog.outErrorDb("Spell %u listed in `spell_proc_item_enchant` is not first rank (%u) in chain", entry, first_id); // prevent loading since it won't have an effect anyway continue; } mSpellProcItemEnchantMap[entry] = ppmRate; + // also add to high ranks + DoSpellProcItemEnchant worker(ppmRate); + doForHighRanks(entry,worker); + ++count; } while( result->NextRow() ); @@ -826,6 +859,13 @@ void SpellMgr::LoadSpellProcItemEnchant() sLog.outString( ">> Loaded %u proc item enchant definitions", count ); } +struct DoSpellBonusess +{ + DoSpellBonusess(SpellBonusEntry const& _spellBonus) : spellBonus(_spellBonus) {} + void operator() (uint32 spell_id) { spellmgr.mSpellBonusMap[spell_id] = spellBonus; } + SpellBonusEntry const& spellBonus; +}; + void SpellMgr::LoadSpellBonusess() { mSpellBonusMap.clear(); // need for reload case @@ -848,13 +888,22 @@ void SpellMgr::LoadSpellBonusess() bar.step(); uint32 entry = fields[0].GetUInt32(); - const SpellEntry *spell = sSpellStore.LookupEntry(entry); + SpellEntry const* spell = sSpellStore.LookupEntry(entry); if (!spell) { sLog.outErrorDb("Spell %u listed in `spell_bonus_data` does not exist", entry); continue; } + uint32 first_id = GetFirstSpellInChain(entry); + + if ( first_id != entry ) + { + sLog.outErrorDb("Spell %u listed in `spell_bonus_data` is not first rank (%u) in chain", entry, first_id); + // prevent loading since it won't have an effect anyway + continue; + } + SpellBonusEntry sbe; sbe.direct_damage = fields[1].GetFloat(); @@ -862,6 +911,11 @@ void SpellMgr::LoadSpellBonusess() sbe.ap_bonus = fields[3].GetFloat(); mSpellBonusMap[entry] = sbe; + + // also add to high ranks + DoSpellBonusess worker(sbe); + doForHighRanks(entry,worker); + } while( result->NextRow() ); delete result; diff --git a/src/game/SpellMgr.h b/src/game/SpellMgr.h index 2d865159b..6203cb750 100644 --- a/src/game/SpellMgr.h +++ b/src/game/SpellMgr.h @@ -628,6 +628,10 @@ inline bool IsProfessionOrRidingSkill(uint32 skill) class SpellMgr { + friend struct DoSpellBonusess; + friend struct DoSpellProcEvent; + friend struct DoSpellProcItemEnchant; + // Constructors public: SpellMgr(); @@ -699,13 +703,7 @@ class SpellMgr SpellBonusMap::const_iterator itr = mSpellBonusMap.find(spellId); if( itr != mSpellBonusMap.end( ) ) return &itr->second; - // Not found, try lookup for 1 spell rank if exist - if (uint32 rank_1 = GetFirstSpellInChain(spellId)) - { - SpellBonusMap::const_iterator itr2 = mSpellBonusMap.find(rank_1); - if( itr2 != mSpellBonusMap.end( ) ) - return &itr2->second; - } + return NULL; } @@ -746,6 +744,17 @@ class SpellMgr SpellChainMapNext const& GetSpellChainNext() const { return mSpellChainsNext; } + template + void doForHighRanks(uint32 spellid, Worker& worker) + { + SpellChainMapNext const& nextMap = GetSpellChainNext(); + for(SpellChainMapNext::const_iterator itr = nextMap.lower_bound(spellid); itr != nextMap.upper_bound(spellid); ++itr) + { + worker(itr->second); + doForHighRanks(itr->second,worker); + } + } + // Note: not use rank for compare to spell ranks: spell chains isn't linear order // Use IsHighRankOfSpell instead uint8 GetSpellRank(uint32 spell_id) const diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 9f04ff169..079fe63cf 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "8250" + #define REVISION_NR "8251" #endif // __REVISION_NR_H__