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);
