aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/2012_12_19_00_world_sai.sql56
-rw-r--r--sql/updates/world/2012_12_22_01_world_sai.sql365
-rw-r--r--src/server/game/Entities/Item/Item.cpp7
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp42
-rw-r--r--src/server/game/Spells/SpellInfo.cpp18
-rw-r--r--src/server/game/Spells/SpellMgr.cpp3
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp2
-rw-r--r--src/server/scripts/Kalimdor/moonglade.cpp2
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp7
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp91
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp9
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h3
12 files changed, 485 insertions, 120 deletions
diff --git a/sql/updates/world/2012_12_19_00_world_sai.sql b/sql/updates/world/2012_12_19_00_world_sai.sql
index 170028e8a68..e11891cdfbd 100644
--- a/sql/updates/world/2012_12_19_00_world_sai.sql
+++ b/sql/updates/world/2012_12_19_00_world_sai.sql
@@ -14,14 +14,14 @@ DELETE FROM `smart_scripts` WHERE `entryorguid`=@SCRIPT AND `source_type`=9;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@DARION_MORGRAINE,0,0,0,20,0,100,0,12657,0,0,0,80,@SCRIPT,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Highlord Darion Morgraine - On quest 12657 rewarded - Start action list'),
(@DARION_MORGRAINE,0,1,0,1,0,100,0,60000,90000,60000,90000,4,12893,1,0,0,0,0,0,0,0,0,0,0,0,0, 'Highlord Darion Morgraine - OOC - Play sound'),
-(@SCRIPT,9,0,0,0,0,100,0,16000,16000,0,0,5,22,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Highlord Darion Morgraine - Action 0 - Play emote 22'),
-(@SCRIPT,9,1,0,0,0,100,0,0,0,0,0,12,28487,3,46000,0,0,0,8,0,0,0,2465.47,-5567.3,372.16,1.64, 'Highlord Darion Morgraine - Action 1 - Summon'),
-(@SCRIPT,9,2,0,0,0,100,0,0,0,0,0,12,28487,3,46000,0,0,0,8,0,0,0,2434.52,-5588.56,372.16,3.26, 'Highlord Darion Morgraine - Action 2 - Summon'),
-(@SCRIPT,9,3,0,0,0,100,0,0,0,0,0,12,28487,3,46000,0,0,0,8,0,0,0,2455.59,-5618.32,372.16,4.59, 'Highlord Darion Morgraine - Action 3 - Summon'),
-(@SCRIPT,9,4,0,0,0,100,0,0,0,0,0,12,28487,3,46000,0,0,0,8,0,0,0,2439.31,-5608.69,372.16,3.77, 'Highlord Darion Morgraine - Action 4 - Summon'),
-(@SCRIPT,9,5,0,0,0,100,0,0,0,0,0,12,28487,3,46000,0,0,0,8,0,0,0,2486.72,-5598.66,372.16,6.02, 'Highlord Darion Morgraine - Action 5 - Summon'),
-(@SCRIPT,9,6,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Highlord Darion Morgraine - Action 6 - Say line 0'),
-(@SCRIPT,9,7,0,0,0,100,0,16000,16000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Highlord Darion Morgraine - Action 7 - Say line 1');
+(@SCRIPT,9,0,0,0,0,100,0,0,0,0,0,12,28487,3,46000,0,0,0,8,0,0,0,2465.47,-5567.3,372.16,1.64, 'Highlord Darion Morgraine - Action 0 - Summon'),
+(@SCRIPT,9,1,0,0,0,100,0,0,0,0,0,12,28487,3,46000,0,0,0,8,0,0,0,2434.52,-5588.56,372.16,3.26, 'Highlord Darion Morgraine - Action 1 - Summon'),
+(@SCRIPT,9,2,0,0,0,100,0,0,0,0,0,12,28487,3,46000,0,0,0,8,0,0,0,2455.59,-5618.32,372.16,4.59, 'Highlord Darion Morgraine - Action 2 - Summon'),
+(@SCRIPT,9,3,0,0,0,100,0,0,0,0,0,12,28487,3,46000,0,0,0,8,0,0,0,2439.31,-5608.69,372.16,3.77, 'Highlord Darion Morgraine - Action 3 - Summon'),
+(@SCRIPT,9,4,0,0,0,100,0,0,0,0,0,12,28487,3,46000,0,0,0,8,0,0,0,2486.72,-5598.66,372.16,6.02, 'Highlord Darion Morgraine - Action 4 - Summon'),
+(@SCRIPT,9,5,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Highlord Darion Morgraine - Action 5 - Say line 0'),
+(@SCRIPT,9,6,0,0,0,100,0,16000,16000,0,0,5,22,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Highlord Darion Morgraine - Action 6 - Play emote 22'),
+(@SCRIPT,9,7,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Highlord Darion Morgraine - Action 7 - Say line 1');
-- Convert from db_script_string to creature_text
DELETE FROM `db_script_string` WHERE `entry` IN (2000005409,2000005410);
@@ -41,28 +41,28 @@ DELETE FROM `smart_scripts` WHERE `entryorguid`=@Arthorn_Windsong AND `source_ty
DELETE FROM `smart_scripts` WHERE `entryorguid`=@SCRIPT AND `source_type`=9;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@Arthorn_Windsong,0,0,0,20,0,100,0,10988,0,0,0,80,@SCRIPT,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Captain Brandon - On quest 10988 rewarded - Start script'),
-(@SCRIPT,9,0,0,0,0,100,0,30000,30000,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 0 - Say line 0'),
-(@SCRIPT,9,1,0,0,0,100,0,43000,43000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 1 - Say line 1'),
-(@SCRIPT,9,2,0,0,0,100,0,43000,43000,0,0,5,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 2 - Play emote 1'),
-(@SCRIPT,9,3,0,0,0,100,0,56000,56000,0,0,69,1,0,0,0,0,0,8,0,0,0,3024.32,5511.29,146.051,2.31064, 'Arthorn Windsong - Action 3 - Move to'),
-(@SCRIPT,9,4,0,0,0,100,0,17000,17000,0,0,5,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 4 - Play emote 1'),
-(@SCRIPT,9,5,0,0,0,100,0,17000,17000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 5 - Say line 2'),
-(@SCRIPT,9,6,0,0,0,100,0,11000,11000,0,0,5,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 6 - Play emote'),
-(@SCRIPT,9,7,0,0,0,100,0,11000,11000,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 7- Say line 3'),
-(@SCRIPT,9,8,0,0,0,100,0,1000,1000,0,0,1,4,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 8 - Say line 4'),
-(@SCRIPT,9,9,0,0,0,100,0,11000,11000,0,0,11,39679,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 9 - Cast spell'),
-(@SCRIPT,9,10,0,0,0,100,0,10000,10000,0,0,69,0,0,0,0,0,0,8,0,0,0,3044.22,5510.91,146.033,4.654, 'Windsong - Action 10 - Move to pos'),
-(@SCRIPT,9,11,0,0,0,100,0,56000,56000,0,0,1,5,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 11 - Say line 5');
+(@SCRIPT,9,0,0,0,0,100,0,1000,1000,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 0 - Say line 0'),
+(@SCRIPT,9,1,0,0,0,100,0,9000,9000,0,0,69,1,0,0,0,0,0,8,0,0,0,3024.22,5510.29,146.033,4.63856, 'Arthorn Windsong - Action 1 - Move to'),
+(@SCRIPT,9,2,0,0,0,100,0,1000,1000,0,0,5,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 2 - Play emote 1'),
+(@SCRIPT,9,3,0,0,0,100,0,0,0,0,0,11,39679,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 3 - Cast spell'),
+(@SCRIPT,9,4,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 4 - Say line 1'),
+(@SCRIPT,9,5,0,0,0,100,0,6000,6000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 5 - Say line 2'),
+(@SCRIPT,9,6,0,0,0,100,0,0,0,0,0,5,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 6 - Play emote 1'),
+(@SCRIPT,9,7,0,0,0,100,0,13000,13000,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 7- Say line 3'),
+(@SCRIPT,9,8,0,0,0,100,0,13000,13000,0,0,1,4,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 8 - Say line 4'),
+(@SCRIPT,9,9,0,0,0,100,0,0,0,0,0,5,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 9 - Play emote'),
+(@SCRIPT,9,10,0,0,0,100,0,14000,14000,0,0,69,0,0,0,0,0,0,8,0,0,0,3024.32,5511.29,146.051,2.31064, 'Windsong - Action 10 - Move to pos'),
+(@SCRIPT,9,11,0,0,0,100,0,0,0,0,0,1,5,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 11 - Say line 5');
-- Convert from db_script_string to creature_text
-DELETE FROM `db_script_string` WHERE `entry` IN (2000000073,2000000074,2000000072,2000000071,2000000070,2000000075);
+DELETE FROM `db_script_string` WHERE `entry` IN (2000000070,2000000071,2000000072,2000000073,2000000074,2000000075);
DELETE FROM `creature_text` WHERE `entry`=@Arthorn_Windsong;
INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
-(@Arthorn_Windsong,0,0, 'There''s something else here, too. After a discription of a bloody battle and the downfall of the raven, there''s a prophecy. Anzu will haunt the dreams of his enemies, twisting them to affect a return to this world...',12,0,100,1,0,0, 'Arthorn Windsong'),
-(@Arthorn_Windsong,1,0, 'The tablet has the confirmation we need, just as I thought. Now, we have to use this information to draw out and defeat this Anzu before he can do any more damage to the Emerald Dream!',12,0,100,1,0,0, 'Arthorn Windsong'),
-(@Arthorn_Windsong,2,0, 'It''s all here... how the raven''s followers captured and subdued the sprints of rivals, trapping them forever within stone statues! The tablet even mentions the raven god''s name -- Anzu. I''d thought it was lost to history!',12,0,100,1,0,0, 'Arthorn Windsong'),
-(@Arthorn_Windsong,3,0, 'This is it! This is really it -- the Book of the Raven!',12,0,100,1,0,0, 'Arthorn Windsong'),
-(@Arthorn_Windsong,4,0, 'It would''ve taken years to find the Book of the Raven without you, young sparrowhawk. Return to your home in Nagrand with our gratitude.',12,0,100,1,0,0, 'Arthorn Windsong'),
+(@Arthorn_Windsong,0,0, 'It would''ve taken years to find the Book of the Raven without you, young sparrowhawk. Return to your home in Nagrand with our gratitude.',12,0,100,1,0,0, 'Arthorn Windsong'),
+(@Arthorn_Windsong,1,0, 'This is it! This is really it -- the Book of the Raven!',12,0,100,1,0,0, 'Arthorn Windsong'),
+(@Arthorn_Windsong,2,0, 'There''s something else here, too. After a discription of a bloody battle and the downfall of the raven, there''s a prophecy. Anzu will haunt the dreams of his enemies, twisting them to affect a return to this world...',12,0,100,1,0,0, 'Arthorn Windsong'),
+(@Arthorn_Windsong,3,0, 'It''s all here... how the raven''s followers captured and subdued the sprints of rivals, trapping them forever within stone statues! The tablet even mentions the raven god''s name -- Anzu. I''d thought it was lost to history!',12,0,100,1,0,0, 'Arthorn Windsong'),
+(@Arthorn_Windsong,4,0, 'The tablet has the confirmation we need, just as I thought. Now, we have to use this information to draw out and defeat this Anzu before he can do any more damage to the Emerald Dream!',12,0,100,1,0,0, 'Arthorn Windsong'),
(@Arthorn_Windsong,5,0, 'Since the sparrowhawks have proven such a success in hunting down the raven stones, Watcher Elaira has trained another one to relay my voice at a great distance. He can help us communicate as you investigate the bird spirits revealed in the tablet!',12,0,100,1,0,0, 'Arthorn Windsong');
-- Convert quest_end_script "10850" to SAI
@@ -73,7 +73,7 @@ SET @Inactive_Fel_Reaver := 22293;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@Inactive_Fel_Reaver;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@Inactive_Fel_Reaver AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
-(@Inactive_Fel_Reaver,0,0,0,20,0,100,0,10850,0,0,0,15,10855,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Inactive Fel Reaver - On quest 10850 rewarded - Call Quest Explored for invoker');
+(@Inactive_Fel_Reaver,0,0,0,20,0,100,0,10850,0,0,0,15,10855,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Inactive Fel Reaver - On quest 10850 rewarded - Call area explored events happen');
-- Convert quest_end_script "10447" to SAI
-- Indexes:
@@ -103,4 +103,4 @@ DELETE FROM `smart_scripts` WHERE `entryorguid`=@SCRIPT AND `source_type`=9;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@Blood_Crystal,1,0,0,20,0,100,0,9565,0,0,0,80,@SCRIPT,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Blood Crystal - On quest 9565 rewarded - Start actionlist'),
(@SCRIPT,9,0,0,0,0,100,0,2000,2000,0,0,12,17189,3,180000,0,0,0,8,0,0,0,-3105.36,-12549.2,-1.28,4.6, 'Blood Crystal - Action 0 - Summon'),
-(@SCRIPT,9,1,0,0,0,100,0,2000,2000,0,0,12,17189,3,180000,0,0,0,8,0,0,0,-3128.49,-12540.2,-2.54,1.5, 'Blood Crystal - Action 1 - Summon');
+(@SCRIPT,9,1,0,0,0,100,0,0,0,0,0,12,17189,3,180000,0,0,0,8,0,0,0,-3128.49,-12540.2,-2.54,1.5, 'Blood Crystal - Action 1 - Summon');
diff --git a/sql/updates/world/2012_12_22_01_world_sai.sql b/sql/updates/world/2012_12_22_01_world_sai.sql
new file mode 100644
index 00000000000..e2a61426679
--- /dev/null
+++ b/sql/updates/world/2012_12_22_01_world_sai.sql
@@ -0,0 +1,365 @@
+-- Remove from quest_end_scripts
+DELETE FROM `quest_end_scripts` WHERE `id` IN (7642,5158,3922,1191,1103,997,943,931,930,902,492,489,407,349,308,63);
+
+-- Convert quest_end_script "7642" to SAI
+-- Indexes:
+SET @Grimand_Elmore := 1416;
+SET @SCRIPT := @Grimand_Elmore * 100;
+
+-- Add SAI support
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@Grimand_Elmore;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@Grimand_Elmore AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@SCRIPT AND `source_type`=9;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@Grimand_Elmore,0,0,0,20,0,100,0,7642,0,0,0,80,@SCRIPT,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Grimand Elmore - On quest 7642 rewarded - Start action list'),
+(@SCRIPT,9,0,0,0,0,100,0,2000,2000,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Grimand Elmore - Action 3 - Say line 0'),
+(@SCRIPT,9,1,0,0,0,100,0,1000,1000,0,0,69,0,0,0,0,0,0,8,0,0,0,-8393.09,687.41,95.27,3.72, 'Grimand Elmore - Action 1 - Move to pos'),
+(@SCRIPT,9,2,0,0,0,100,0,5000,5000,0,0,69,0,0,0,0,0,0,8,0,0,0,-8400.51,681.85,95.96,5, 'Grimand Elmore - Action 6 - Move to pos'),
+(@SCRIPT,9,3,0,0,0,100,0,3000,3000,0,0,69,0,0,0,0,0,0,8,0,0,0,-8388.72,646.85,94.82,3.92, 'Grimand Elmore - Action 2 - Move to pos'),
+(@SCRIPT,9,4,0,0,0,100,0,9000,9000,0,0,69,0,0,0,0,0,0,8,0,0,0,-8422.25,618.12,95.46,3.2, 'Grimand Elmore - Action 10 - Move to pos'),
+(@SCRIPT,9,5,0,0,0,100,0,13000,13000,0,0,5,69,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Grimand Elmore - Action 4 - Play emote'),
+(@SCRIPT,9,6,0,0,0,100,0,6000,6000,0,0,5,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Grimand Elmore - Action 5 - Play emote'),
+(@SCRIPT,9,7,0,0,0,100,0,0,0,0,0,69,0,0,0,0,0,0,8,0,0,0,-8421.99,617.93,95.45,5.34, 'Grimand Elmore - Action 7 - Move to pos'),
+(@SCRIPT,9,8,0,0,0,100,0,2000,2000,0,0,5,233,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Grimand Elmore - Action 8 - Play emote'),
+(@SCRIPT,9,9,0,0,0,100,0,6000,6000,0,0,5,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Grimand Elmore - Action 9 - Play emote'),
+(@SCRIPT,9,10,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Grimand Elmore - Action 13 - Say line 1'),
+(@SCRIPT,9,11,0,0,0,100,0,4000,4000,0,0,69,0,0,0,0,0,0,8,0,0,0,-8388.72,646.85,94.82,3.92, 'Grimand Elmore - Action 11 - Move to pos'),
+(@SCRIPT,9,12,0,0,0,100,0,9000,9000,0,0,69,0,0,0,0,0,0,8,0,0,0,-8400.51,681.85,95.96,5, 'Grimand Elmore - Action 12 - Move to pos'),
+(@SCRIPT,9,13,0,0,0,100,0,12000,12000,0,0,69,0,0,0,0,0,0,8,0,0,0,-8393.09,687.41,95.27,3.72, 'Grimand Elmore - Action 14 - Move to pos'),
+(@SCRIPT,9,14,0,0,0,100,0,15000,15000,0,0,69,0,0,0,0,0,0,8,0,0,0,-8387,685.2,95.35,2.28, 'Grimand Elmore - Action 0 - Move to pos');
+-- Convert from db_script_string to creature_text
+DELETE FROM `db_script_string` WHERE `entry` IN (2000000063,2000000064);
+DELETE FROM `creature_text` WHERE `entry`=@Grimand_Elmore;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(@Grimand_Elmore,0,0, 'Follow me, good $C. I''ll have your barding done faster than I could down a Dwarven stout. Mmmm... stout.',12,0,100,1,0,0, 'Grimand Elmore'),
+(@Grimand_Elmore,1,0, 'Well, that should do it. Come now, back to the shop to finish our business!',12,0,100,1,0,0, 'Grimand Elmore');
+
+-- Convert quest_end_script "5158" to SAI
+-- Indexes:
+SET @Islen_Waterseer := 5901;
+SET @SCRIPT := @Islen_Waterseer * 100;
+
+-- Add SAI support
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@Islen_Waterseer;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@Islen_Waterseer AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@SCRIPT AND `source_type`=9;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@Islen_Waterseer,0,0,0,20,0,100,0,5158,0,0,0,80,@SCRIPT,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Islen Waterseer - On quest 5158 rewarded - Start action list'),
+(@SCRIPT,9,0,0,0,0,100,0,0,0,0,0,18,33554432,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Islen Waterseer - Action 0 - Set unit flags'),
+(@SCRIPT,9,1,0,0,0,100,0,1000,1000,0,0,69,0,0,0,0,0,0,8,0,0,0,-1345.16,-4065.02,-0.49,4.73, 'Islen Waterseer- Action 1 - Move to pos'),
+(@SCRIPT,9,2,0,0,0,100,0,5000,5000,0,0,12,11256,3,30000,0,0,0,8,0,0,0,-1346.59,-4076.39,-1.23,1.6, 'Islen Waterseer - Action 2 - Summon'),
+(@SCRIPT,9,3,0,0,0,100,0,4000,4000,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Islen Waterseer - Action 4 - Say line 0'),
+(@SCRIPT,9,4,0,0,0,100,0,12000,12000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Islen Waterseer - Action 5 - Say line 1'),
+(@SCRIPT,9,5,0,0,0,100,0,2000,2000,0,0,69,0,0,0,0,0,0,8,0,0,0,-1345.0,-4048.0,6.09,4.34, 'Islen Waterseer - Action 6 - Move to pos'),
+(@SCRIPT,9,6,0,0,0,100,0,6000,6000,0,0,19,33554432,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Islen Waterseer - Action 7 - Remove unit flags');
+
+-- Convert from db_script_string to creature_text
+DELETE FROM `db_script_string` WHERE `entry` IN (2000000057,2000000058);
+DELETE FROM `creature_text` WHERE `entry`=@Islen_Waterseer;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(@Islen_Waterseer,0,0, 'Spirits of Water, I give you praise, and I beg of you a favour. You have heard $N''s pleas, and I trust his inent is noble. Please, will you aid us?',42,0,100,1,0,0, 'Islen Waterseer'),
+(@Islen_Waterseer,1,0, 'Thank you great spirit. Thank you!',12,0,100,1,0,0, 'Islen Waterseer');
+
+-- Convert quest_end_script "3922" to SAI
+-- Indexes:
+SET @Wenikee_Boltbucket := 9316;
+SET @SCRIPT := @Wenikee_Boltbucket * 100;
+
+-- Add SAI support
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@Wenikee_Boltbucket;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@Wenikee_Boltbucket AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@SCRIPT AND `source_type`=9;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@Wenikee_Boltbucket,0,0,0,20,0,100,0,3922,0,0,0,80,@SCRIPT,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Wenikee Boltbucket - On quest 3922 rewarded - Start action list'),
+(@SCRIPT,9,0,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Wenikee Boltbucket - Action 0 - Say line 0'),
+(@SCRIPT,9,1,0,0,0,100,0,0,0,0,0,70,7,0,0,0,0,0,14,6579,162024,0,0,0,0,0, 'Wenikee Boltbucket - Action 1 - Respawn go guid in 7 seconds'),
+(@SCRIPT,9,2,0,0,0,100,0,1000,1000,0,0,69,0,0,0,0,0,0,8,0,0,0,858.17,-2347.74,91.8282,6.06139, 'Wenikee Boltbucket - Action 2 - Move to pos'),
+(@SCRIPT,9,3,0,0,0,100,0,1000,1000,0,0,5,173,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Wenikee Boltbucket - Action 3 - Play emote'),
+(@SCRIPT,9,4,0,0,0,100,0,4000,4000,0,0,11,13727,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Wenikee Boltbucket - Action 4 - Cast spell'),
+(@SCRIPT,9,5,0,0,0,100,0,1000,1000,0,0,69,0,0,0,0,0,0,8,0,0,0,858.14,-2347.64,91.92,2.72271, 'Wenikee Boltbucket - Action 5 - Move to pos'),
+(@SCRIPT,9,6,0,0,0,100,0,1000,1000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Wenikee Boltbucket - Action 6 - Say line 1');
+
+-- Convert from db_script_string to creature_text
+DELETE FROM `db_script_string` WHERE `entry` IN (2000000103,2000000104);
+DELETE FROM `creature_text` WHERE `entry`=@Wenikee_Boltbucket;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(@Wenikee_Boltbucket,0,0, 'Ok, let''s get started!',12,0,100,1,0,0, 'Wenikee Boltbucket'),
+(@Wenikee_Boltbucket,1,0, '... oops.',12,0,100,1,0,0, 'Wenikee Boltbucket');
+
+-- Convert quest_end_script "1191" to SAI
+-- Indexes:
+SET @Zamek := 4709;
+SET @SCRIPT := @Zamek * 100;
+
+-- Add SAI support
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@Zamek;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@Zamek AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@SCRIPT AND `source_type`=9;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@Zamek,0,0,0,20,0,100,0,1191,0,0,0,80,@SCRIPT,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Zamek - On quest 1191 rewarded - Start action list'),
+(@SCRIPT,9,0,0,0,0,100,0,0,0,0,0,69,0,0,0,0,0,0,8,0,0,0,-6273.41,-3841.7,-58.75,1.9, 'Zamek - Action 0 - Move to pos'),
+(@SCRIPT,9,1,0,0,0,100,0,30000,30000,0,0,70,600,0,0,0,0,0,14,13621,20805,0,0,0,0,0, 'Zamek - Action 1 - Respawn go'),
+(@SCRIPT,9,2,0,0,0,100,0,5000,5000,0,0,69,0,0,0,0,0,0,8,0,0,0,-6224,-3945,-58.75,0.75, 'Zamek - Action 2 - Move to pos');
+
+-- Convert quest_end_script "1103" to SAI
+-- Indexes:
+SET @Tiev_Mordune := 7007;
+SET @SCRIPT := @Tiev_Mordune * 100;
+
+-- Add SAI support
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@Tiev_Mordune;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@Tiev_Mordune AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@SCRIPT AND `source_type`=9;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@Tiev_Mordune,0,0,0,20,0,100,0,1103,0,0,0,80,@SCRIPT,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Tiev Vordune - On quest 1103 rewarded - Start action list'),
+(@SCRIPT,9,0,0,0,0,100,0,0,0,0,0,70,30,0,0,0,0,0,14,15175,106528,0,0,0,0,0, 'Tiev Mordune - Action 0 - Respawn go'),
+(@SCRIPT,9,1,0,0,0,100,0,15000,15000,0,0,12,5895,3,180000,0,0,0,8,0,0,0,417.05,1822.39,13.007,0.035, 'Tiev Vordune - Action 1 - Move to pos'),
+(@SCRIPT,9,2,0,0,0,100,0,0,0,0,0,70,180,0,0,0,0,0,14,15176,106528,0,0,0,0,0, 'Tiev Mordune - Action 2 - Respawn go');
+
+-- Convert quest_end_script "997"/"931"/"930" to SAI
+-- Indexes:
+SET @Denalan := 2080;
+SET @SCRIPT := @Denalan * 100;
+SET @SCRIPT1 := @SCRIPT + 1;
+SET @SCRIPT2 := @SCRIPT + 2;
+
+-- Add SAI support
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@Denalan;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@Denalan AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@SCRIPT,@SCRIPT1,@SCRIPT2) AND `source_type`=9;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@Denalan,0,0,0,20,0,100,0,997,0,0,0,80,@SCRIPT,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Denalan - On quest 997 rewarded - Start action list'),
+(@Denalan,0,1,0,20,0,100,0,931,0,0,0,80,@SCRIPT1,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Denalan - On quest 931 rewarded - Start action list 1'),
+(@Denalan,0,2,0,20,0,100,0,930,0,0,0,80,@SCRIPT2,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Denalan - On quest 930 rewarded - Start action list 2'),
+(@SCRIPT,9,0,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Denalan - Action 0 - Say 0'),
+(@SCRIPT,9,1,0,0,0,100,0,0,0,0,0,69,0,0,0,0,0,0,8,0,0,0,9505.03,719.358,1256.22,2.5643, 'Denalan - Action 1 - Move'),
+(@SCRIPT,9,2,0,0,0,100,0,5000,5000,0,0,5,16,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Denalan - Action 2 - Play emote'),
+(@SCRIPT,9,3,0,0,0,100,0,4000,4000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Denalan - Action 3 - Say 1'),
+(@SCRIPT,9,4,0,0,0,100,0,1000,1000,0,0,5,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Denalan - Action 4 - Play emote'),
+(@SCRIPT,9,5,0,0,0,100,0,1000,1000,0,0,69,0,0,0,0,0,0,14,0,0,0,9505.83,712.352,1255.89,0.533, 'Denalan - Action 5 - Move'),
+(@SCRIPT1,9,0,0,0,0,100,0,2000,2000,0,0,69,0,0,0,0,0,0,8,0,0,0,9508.02,715.749,1255.89,1.03055, 'Denalan - Action 0 - Move'),
+(@SCRIPT1,9,1,0,0,0,100,0,0,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Denalan - Action 1 - Say 2'),
+(@SCRIPT1,9,2,0,0,0,100,0,1000,1000,0,0,69,0,0,0,0,0,0,8,0,0,0,9507.66,718.009,1255.89,1.80417, 'Denalan - Action 2 - Move'),
+(@SCRIPT1,9,3,0,0,0,100,0,1000,1000,0,0,69,0,0,0,0,0,0,8,0,0,0,9505.56,719.088,1256.2,2.65632, 'Denalan - Action 3 - Move'),
+(@SCRIPT1,9,4,0,0,0,100,0,2000,2000,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Denalan - Action 4 - Say 3'),
+(@SCRIPT1,9,5,0,0,0,100,0,0,0,0,0,5,16,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Denalan - Action 5 - Play emote'),
+(@SCRIPT1,9,6,0,0,0,100,0,5000,5000,0,0,69,0,0,0,0,0,0,8,0,0,0,9506.92,713.766,1255.89,0.279253, 'Denalan - Action 6 - Move'),
+(@SCRIPT1,9,7,0,0,0,100,0,2000,2000,0,0,70,15,0,0,0,0,0,14,67984,7510,0,0,0,0,0, 'Denalan - Action 7 - Respawn go'),
+(@SCRIPT1,9,8,0,0,0,100,0,0,0,0,0,70,15,0,0,0,0,0,14,42936,7510,0,0,0,0,0, 'Denalan - Action 8 - Respawn go'),
+(@SCRIPT1,9,9,0,0,0,100,0,0,0,0,0,70,15,0,0,0,0,0,14,30276,7510,0,0,0,0,0, 'Denalan - Action 9 - Respawn go'),
+(@SCRIPT2,9,0,0,0,0,100,0,2000,2000,0,0,1,4,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Denalan - Action 0 - Say 4'),
+(@SCRIPT2,9,1,0,0,0,100,0,0,0,0,0,1,5,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Denalan - Action 1 - Say 5'),
+(@SCRIPT2,9,2,0,0,0,100,0,1000,1000,0,0,69,0,0,0,0,0,0,8,0,0,0,9508.02,715.749,1255.89,1.03055, 'Denalan - Action 2 - Move'),
+(@SCRIPT2,9,3,0,0,0,100,0,1000,1000,0,0,69,0,0,0,0,0,0,8,0,0,0,9507.66,718.009,1255.89,1.80417, 'Denalan - Action 3 - Move'),
+(@SCRIPT2,9,4,0,0,0,100,0,2000,2000,0,0,69,0,0,0,0,0,0,8,0,0,0,9505.56,719.088,1256.2,2.65632, 'Denalan - Action 4 - Move'),
+(@SCRIPT2,9,5,0,0,0,100,0,0,0,0,0,1,6,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Denalan - Action 5 - Say 6'),
+(@SCRIPT2,9,6,0,0,0,100,0,5000,5000,0,0,5,16,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Denalan - Action 6 - Play emote'),
+(@SCRIPT2,9,7,0,0,0,100,0,2000,2000,0,0,69,0,0,0,0,0,0,8,0,0,0,9506.92,713.766,1255.89,0.279253, 'Denalan - Action 7 - Move'),
+(@SCRIPT2,9,8,0,0,0,100,0,0,0,0,0,12,3569,3,20000,0,0,0,8,0,0,0,9505.13,722.011,1255.94,0.0244875, 'Denalan - Action 8 - Summon'),
+(@SCRIPT2,9,9,0,0,0,100,0,0,0,0,0,1,7,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Denalan - Action 9 - Say 7'),
+(@SCRIPT2,9,10,0,0,0,100,0,0,0,0,0,12,3569,3,20000,0,0,0,8,0,0,0,9504.09,720.294,1255.94,1.00709, 'Denalan - Action 10 - Summon'),
+(@SCRIPT2,9,11,0,0,0,100,0,0,0,0,0,12,3569,3,20000,0,0,0,8,0,0,0,9504.13,721.459,1255.94,6.24727, 'Denalan - Action 11 - Summon');
+
+-- Convert from db_script_string to creature_text
+DELETE FROM `db_script_string` WHERE `entry` IN (2000000048,2000000049,2000000093,2000000094,2000000086,2000000087,2000000088,2000000089);
+DELETE FROM `creature_text` WHERE `entry`=@Denalan;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(@Denalan,0,0, 'Now let us place this rare earth in my planter...',12,0,100,1,0,0, 'Denalan'),
+(@Denalan,1,0, 'Thank you again, $N. This rare earth will be very helpful in my experiments.',12,0,100,1,0,0, 'Denalan'),
+(@Denalan,2,0, 'Denalan hurries to his planter.',41,0,100,1,0,0, 'Denalan'),
+(@Denalan,3,0, 'I hope this frond takes root...',12,0,100,1,0,0, 'Denalan'),
+(@Denalan,4,0, 'Denalan removes the seeds from the Glowing Fruit...',41,0,100,1,0,0, 'Denalan'),
+(@Denalan,5,0, 'Let''s see how these seeds grow in my prepared soil...',12,0,100,1,0,0, 'Denalan'),
+(@Denalan,6,0, 'Denalan plants fruit seeds.',41,0,100,1,0,0, 'Denalan'),
+(@Denalan,7,0, 'Bogling rises from the soil!',41,0,100,1,0,0, 'Denalan');
+
+-- Convert quest_end_script "943" to SAI
+-- Indexes:
+SET @Archaeologist_Flagongut := 2911;
+SET @SCRIPT := @Archaeologist_Flagongut * 100;
+
+-- Add SAI support
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@Archaeologist_Flagongut;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@Archaeologist_Flagongut AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@SCRIPT AND `source_type`=9;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@Archaeologist_Flagongut,0,0,0,20,0,100,0,943,0,0,0,80,@SCRIPT,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Archaeologist Flagongut - On quest 943 rewarded - Start action list'),
+(@SCRIPT,9,0,0,0,0,100,0,0,0,0,0,12,3582,3,40000,0,0,0,8,0,0,0,-3809,-839,16.94,2.16, 'Archaeologist Flagongut - Action 0 - Summon'),
+(@SCRIPT,9,1,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Archaeologist Flagongut - Action 1 - Say 0'),
+(@SCRIPT,9,2,0,0,0,100,0,1000,1000,0,0,69,0,0,0,0,0,0,8,0,0,0,-3809,-839,16.94,2.16, 'Archaeologist Flagongut - Action 2 - Move'),
+(@SCRIPT,9,3,0,0,0,100,0,24000,24000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Archaeologist Flagongut - Action 3 - Say 1'),
+(@SCRIPT,9,4,0,0,0,100,0,5000,5000,0,0,69,0,0,0,0,0,0,8,0,0,0,-3819,-821,16.94,4.7, 'Archaeologist Flagongut - Action 4 - Move');
+
+-- Convert from db_script_string to creature_text
+DELETE FROM `db_script_string` WHERE `entry` IN (2000000060,2000000061);
+DELETE FROM `creature_text` WHERE `entry`=@Archaeologist_Flagongut;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(@Archaeologist_Flagongut,0,0, 'By the stars! A spirit has been summoned!',12,0,100,1,0,0, 'Archaeologist Flagongut'),
+(@Archaeologist_Flagongut,1,0, 'It''s a mystery of the past indeed! But a key to our future!',12,0,100,1,0,0, 'Archaeologist Flagongut');
+
+-- Convert quest_end_script "902" to SAI
+-- Indexes:
+SET @Sputtervalve := 3442;
+SET @SCRIPT := @Sputtervalve * 100;
+
+-- Add SAI support
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@Sputtervalve;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@Sputtervalve AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@SCRIPT AND `source_type`=9;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@Sputtervalve,0,0,0,20,0,100,0,902,0,0,0,80,@SCRIPT,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Sputtervalve - On quest 902 rewarded - Start action list'),
+(@SCRIPT,9,0,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Sputtervalve - Action 0 - Say 0'),
+(@SCRIPT,9,1,0,0,0,100,0,1000,1000,0,0,70,13,0,0,0,0,0,14,6552,162024,0,0,0,0,0, 'Sputtervalve - Action 1 - Respawn go'),
+(@SCRIPT,9,2,0,0,0,100,0,1000,1000,0,0,5,173,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Sputtervalve - Action 2 - Play emote'),
+(@SCRIPT,9,3,0,0,0,100,0,6000,6000,0,0,11,13727,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Sputtervalve - Action 3 - Cast spell'),
+(@SCRIPT,9,4,0,0,0,100,0,1000,1000,0,0,5,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Sputtervalve - Action 4 - Play emote none'),
+(@SCRIPT,9,5,0,0,0,100,0,1000,1000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Sputtervalve - Action 5 - Say 1');
+
+-- Convert from db_script_string to creature_text
+DELETE FROM `db_script_string` WHERE `entry` IN (2000000101,2000000102);
+DELETE FROM `creature_text` WHERE `entry`=@Sputtervalve;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(@Sputtervalve,0,0, 'Ok, let''s take a look at this thing...',12,0,100,1,0,0, 'Sputtervalve'),
+(@Sputtervalve,1,0, 'Oh, darn...',12,0,100,1,0,0, 'Sputtervalve');
+
+-- Convert quest_end_script "492" to SAI
+-- Indexes:
+SET @Kalaran_Windblade := 8479;
+SET @SCRIPT := @Kalaran_Windblade * 100;
+
+-- Add SAI support
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@Kalaran_Windblade;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@Kalaran_Windblade AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@SCRIPT AND `source_type`=9;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@Kalaran_Windblade,0,0,0,20,0,100,0,492,0,0,0,80,@SCRIPT,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Kalaran Windblade - On quest 492 rewarded - Start action list'),
+(@SCRIPT,9,0,0,0,0,100,0,1000,1000,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Kalaran Windblade - Action 0 - Say 0'),
+(@SCRIPT,9,1,0,0,0,100,0,1000,1000,0,0,5,7,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Kalaran Windblade - Action 1 - Play emote'),
+(@SCRIPT,9,2,0,0,0,100,0,4000,4000,0,0,11,5,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Kalaran Windblade - Action 2 - Cast Death Touch on self');
+
+-- Convert from db_script_string to creature_text
+DELETE FROM `db_script_string` WHERE `entry`=2000000084;
+DELETE FROM `creature_text` WHERE `entry`=@Kalaran_Windblade;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(@Kalaran_Windblade,0,0, 'I raise my brew and hope to be rid of the likes of you! Cheers, you no good scoundrel, $N!',12,0,100,1,0,0, 'Kalaran Windblade');
+
+-- Convert quest_end_script "489" to SAI
+-- Indexes:
+SET @Zenn_Foulhoof := 2150;
+SET @SCRIPT := @Zenn_Foulhoof * 100;
+
+-- Add SAI support
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@Zenn_Foulhoof;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@Zenn_Foulhoof AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@SCRIPT AND `source_type`=9;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@Zenn_Foulhoof,0,0,0,20,0,100,0,492,0,0,0,80,@SCRIPT,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Zenn Foulhoof - On quest 492 rewarded - Start action list'),
+(@SCRIPT,9,0,0,0,0,100,0,2000,2000,0,0,11,12244,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Zenn Foulhoof - Action 0 - Cast spell'),
+(@SCRIPT,9,1,0,0,0,100,0,0,0,0,0,11,3329,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Zenn Foulhoof - Action 1 - Cast spell'),
+(@SCRIPT,9,2,0,0,0,100,0,1000,1000,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Zenn Foulhoof - Action 2 - Say 0');
+
+-- Convert from db_script_string to creature_text
+DELETE FROM `db_script_string` WHERE `entry`=2000000047;
+DELETE FROM `creature_text` WHERE `entry`=@Zenn_Foulhoof;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(@Zenn_Foulhoof,0,0, 'Ribbit! No!! This cannot...ribbit...be! You have duped me with...ribbit...your foul trickery! Ribbit!',12,0,100,1,0,0, 'Zenn Foulhoof');
+
+-- Convert quest_end_script "407" to SAI
+-- Indexes:
+SET @Scarlet_Zealot := 1931;
+SET @SCRIPT := @Scarlet_Zealot * 100;
+
+-- Add SAI support
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@Scarlet_Zealot;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@Scarlet_Zealot AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@SCRIPT AND `source_type`=9;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@Scarlet_Zealot,0,0,0,20,0,100,0,407,0,0,0,80,@SCRIPT,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Scarlet Zealot - On quest 407 rewarded - Start action list'),
+(@SCRIPT,9,0,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Scarlet Zealot - Action 0 - Say 0'),
+(@SCRIPT,9,1,0,0,0,100,0,3000,3000,0,0,11,3287,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Scarlet Zealot - Action 1 - Cast spell'),
+(@SCRIPT,9,2,0,0,0,100,0,0,0,0,0,69,0,0,0,0,0,0,8,0,0,0,2292,239.481,27.0892,0.693878, 'Scarlet Zealot - Action 2 - Move'),
+(@SCRIPT,9,3,0,0,0,100,0,3000,3000,0,0,69,0,0,0,0,0,0,8,0,0,0,2287.97,236.253,27.0892,2.6613, 'Scarlet Zealot - Action 3 - Move'),
+(@SCRIPT,9,4,0,0,0,100,0,2000,2000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Scarlet Zealot - Action 4 - Say 1'),
+(@SCRIPT,9,5,0,0,0,100,0,2000,2000,0,0,69,0,0,0,0,0,0,8,0,0,0,2292.52,235.226,27.0892,4.8345, 'Scarlet Zealot - Action 5 - Move'),
+(@SCRIPT,9,6,0,0,0,100,0,3000,3000,0,0,69,0,0,0,0,0,0,8,0,0,0,2288.96,237.96,27.0892,2.48773, 'Scarlet Zealot - Action 6 - Move'),
+(@SCRIPT,9,7,0,0,0,100,0,6000,6000,0,0,11,5,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Scarlet Zealot - Action 7 - Cast spell');
+
+-- Convert from db_script_string to creature_text
+DELETE FROM `db_script_string` WHERE `entry` IN (2000000082,2000000083);
+DELETE FROM `creature_text` WHERE `entry`=@Scarlet_Zealot;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(@Scarlet_Zealot,0,0, 'I. . .I. . .don''t. . .feel. . .right. . .',12,0,100,1,0,0, 'Scarlet Zealot'),
+(@Scarlet_Zealot,1,0, 'My mind. . .my flesh. . .I''m. . .rotting. . . .!',12,0,100,1,0,0, 'Scarlet Zealot');
+
+-- Convert quest_end_script "349" to SAI
+-- Indexes:
+SET @Witch_Doctor_Unbagwa := 1449;
+SET @SCRIPT := @Witch_Doctor_Unbagwa * 100;
+
+-- Add SAI support
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@Witch_Doctor_Unbagwa;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@Witch_Doctor_Unbagwa AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@SCRIPT AND `source_type`=9;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@Witch_Doctor_Unbagwa,0,0,0,20,0,100,0,349,0,0,0,80,@SCRIPT,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Scarlet Zealot - On quest 349 rewarded - Start action list'),
+(@SCRIPT,9,0,0,0,0,100,0,2000,2000,0,0,12,1511,3,300000,0,0,0,8,0,0,0,-13743.7,-23.97,45.14,5.7, 'Witch Doctor Unbagwa - Action 0 - Summon'),
+(@SCRIPT,9,1,0,0,0,100,0,28000,28000,0,0,12,1516,3,300000,0,0,0,8,0,0,0,-13743.7,-23.97,45.14,5.7, 'Witch Doctor Unbagwa - Action 1 - Summon'),
+(@SCRIPT,9,2,0,0,0,100,0,20000,20000,0,0,12,1514,3,300000,0,0,0,8,0,0,0,-13743.7,-23.97,45.14,5.7, 'Witch Doctor Unbagwa - Action 2 - Summon');
+
+-- Convert quest_end_script "308" to SAI
+-- Indexes:
+SET @Jarven_Thunderbrew := 1373;
+SET @SCRIPT := @Jarven_Thunderbrew * 100;
+
+-- Add SAI support
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@Jarven_Thunderbrew;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@Jarven_Thunderbrew AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@SCRIPT AND `source_type`=9;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@Jarven_Thunderbrew,0,0,0,20,0,100,0,308,0,0,0,80,@SCRIPT,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Jarven Thunderbrew - On quest 308 rewarded - Start action list'),
+(@SCRIPT,9,0,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Jarven Thunderbrew - Action 0 - Say 0'),
+(@SCRIPT,9,1,0,0,0,100,0,0,0,0,0,69,0,0,0,0,0,0,8,0,0,0,-5601.64,-541.38,392.42,0.5, 'Jarven Thunderbrew - Action 1 - Move'),
+(@SCRIPT,9,2,0,0,0,100,0,2000,2000,0,0,69,0,0,0,0,0,0,8,0,0,0,-5597.94,-542.04,392.42,5.5, 'Jarven Thunderbrew - Action 2 - Move'),
+(@SCRIPT,9,3,0,0,0,100,0,1000,1000,0,0,70,30,0,0,0,0,0,14,35875,270,0,0,0,0,0, 'Jarven Thunderbrew - Action 3 - Respawn'),
+(@SCRIPT,9,4,0,0,0,100,0,0,0,0,0,69,0,0,0,0,0,0,8,0,0,0,-5597.95,-548.43,395.48,4.7, 'Jarven Thunderbrew - Action 4 - Move'),
+(@SCRIPT,9,5,0,0,0,100,0,4000,4000,0,0,69,0,0,0,0,0,0,8,0,0,0,-5605.31,-549.33,399.09,3.1, 'Jarven Thunderbrew - Action 5 - Move'),
+(@SCRIPT,9,6,0,0,0,100,0,3000,3000,0,0,69,0,0,0,0,0,0,8,0,0,0,-5607.55,-546.63,399.09,1.5, 'Jarven Thunderbrew - Action 6 - Move'),
+(@SCRIPT,9,7,0,0,0,100,0,4000,4000,0,0,69,0,0,0,0,0,0,8,0,0,0,-5597.52,-538.75,399.09,1.5, 'Jarven Thunderbrew - Action 7 - Move'),
+(@SCRIPT,9,8,0,0,0,100,0,4000,4000,0,0,69,0,0,0,0,0,0,8,0,0,0,-5597.62,-530.24,399.65,3, 'Jarven Thunderbrew - Action 8 - Move'),
+(@SCRIPT,9,9,0,0,0,100,0,3000,3000,0,0,69,0,0,0,0,0,0,8,0,0,0,-5603.67,-529.91,399.65,4.2, 'Jarven Thunderbrew - Action 9 - Move'),
+(@SCRIPT,9,10,0,0,0,100,0,4000,4000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Jarven Thunderbrew - Action 10 - Say 1'),
+(@SCRIPT,9,11,0,0,0,100,0,11000,11000,0,0,69,0,0,0,0,0,0,8,0,0,0,-5603.67,-529.91,399.65,4.2, 'Jarven Thunderbrew - Action 11 - Move'),
+(@SCRIPT,9,12,0,0,0,100,0,3000,3000,0,0,69,0,0,0,0,0,0,8,0,0,0,-5597.62,-530.24,399.65,3, 'Jarven Thunderbrew - Action 12 - Move'),
+(@SCRIPT,9,13,0,0,0,100,0,3000,3000,0,0,69,0,0,0,0,0,0,8,0,0,0,-5597.52,-538.75,399.09,1.5, 'Jarven Thunderbrew - Action 13 - Move'),
+(@SCRIPT,9,14,0,0,0,100,0,3000,3000,0,0,69,0,0,0,0,0,0,8,0,0,0,-5607.55,-546.63,399.09,1.5, 'Jarven Thunderbrew - Action 14 - Move'),
+(@SCRIPT,9,15,0,0,0,100,0,3000,3000,0,0,69,0,0,0,0,0,0,8,0,0,0,-5605.31,-549.33,399.09,3.1, 'Jarven Thunderbrew - Action 15 - Move'),
+(@SCRIPT,9,16,0,0,0,100,0,3000,3000,0,0,69,0,0,0,0,0,0,8,0,0,0,-5597.95,-548.43,395.48,4.7, 'Jarven Thunderbrew - Action 16 - Move'),
+(@SCRIPT,9,17,0,0,0,100,0,3000,3000,0,0,69,0,0,0,0,0,0,8,0,0,0,-5597.94,-542.04,392.42,5.5, 'Jarven Thunderbrew - Action 17 - Move'),
+(@SCRIPT,9,18,0,0,0,100,0,1000,1000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Jarven Thunderbrew - Action 18 - Say 2'),
+(@SCRIPT,9,19,0,0,0,100,0,3000,3000,0,0,11,5,0,0,0,0,0,1,0,0,0,-5601.64,-541.38,392.42,0.5, 'Jarven Thunderbrew - Action 19 - Movel'),
+(@SCRIPT,9,20,0,0,0,100,0,2000,2000,0,0,11,5,0,0,0,0,0,1,0,0,0,-5605.96,-544.45,392.43,0.9, 'Jarven Thunderbrew - Action 20 - Move'),
+(@SCRIPT,9,21,0,0,0,100,0,2000,2000,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Jarven Thunderbrew - Action 21 - Say 3');
+
+-- Convert from db_script_string to creature_text
+DELETE FROM `db_script_string` WHERE `entry` IN (2000000077,2000000056,2000000078,2000000079);
+DELETE FROM `creature_text` WHERE `entry`=@Jarven_Thunderbrew;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(@Jarven_Thunderbrew,0,0, '%s gestures to the pitcher of water sitting on the edge of the well.',12,0,100,1,0,0, 'Jarven Thunderbrew'),
+(@Jarven_Thunderbrew,1,0, 'Hey there, Belm! Give me a mug of Thunder Ale, and one for my good friend $N.',12,0,100,1,0,0, 'Jarven Thunderbrew'),
+(@Jarven_Thunderbrew,2,0, 'How goes the barrel watching...?',12,0,100,1,0,0, 'Jarven Thunderbrew'),
+(@Jarven_Thunderbrew,3,0, 'Well, back to business for me. But it sure was nice taking that short break, and it''s always nice drinking Thunder Ale!',12,0,100,1,0,0, 'Jarven Thunderbrew');
+
+-- Convert quest_end_script "63" to SAI
+-- Indexes:
+SET @Brazier_Everfount := 113791;
+SET @SCRIPT := @Brazier_Everfount * 100;
+
+-- Add SAI support
+UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI' WHERE `entry`=@Brazier_Everfount;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@Brazier_Everfount AND `source_type`=1;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@SCRIPT AND `source_type`=9;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@Brazier_Everfount,1,0,0,20,0,100,0,63,0,0,0,80,@SCRIPT,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Brazier of Everfount - On quest 63 rewarded - Start action list'),
+(@SCRIPT,9,0,0,0,0,100,0,0,0,0,0,70,30,0,0,0,0,0,14,15175,106528,0,0,0,0,0, 'Brazier of Everfount - Action 0 - Respawn go'),
+(@SCRIPT,9,1,0,0,0,100,0,15000,15000,0,0,70,180,0,0,0,0,0,14,15176,106529,0,0,0,0,0, 'Brazier of Everfount - Action 1 - Respawn go'),
+(@SCRIPT,9,2,0,0,0,100,0,0,0,0,0,12,5895,3,180000,0,0,0,8,0,0,0,417.05,1822.39,13.007,0.035, 'Brazier of Everfount - Action 2 - Summon');
diff --git a/src/server/game/Entities/Item/Item.cpp b/src/server/game/Entities/Item/Item.cpp
index dd54a3d39db..5be1bbf5290 100644
--- a/src/server/game/Entities/Item/Item.cpp
+++ b/src/server/game/Entities/Item/Item.cpp
@@ -1234,7 +1234,6 @@ void Item::ItemContainerSaveLootToDB()
// Save items
if (!loot.isLooted())
{
-
PreparedStatement* stmt_items = CharacterDatabase.GetPreparedStatement(CHAR_DEL_ITEMCONTAINER_ITEMS);
stmt_items->setUInt32(0, container_id);
trans->Append(stmt_items);
@@ -1300,7 +1299,6 @@ bool Item::ItemContainerLoadLootFromDB()
// Get a LootTemplate for the container item. This is where
// the saved loot was originally rolled from, we will copy conditions from it
LootTemplate const* lt = LootTemplates_Item.GetLootFor(GetEntry());
-
if (lt)
{
do
@@ -1351,7 +1349,6 @@ bool Item::ItemContainerLoadLootFromDB()
void Item::ItemContainerDeleteLootItemsFromDB()
{
// Deletes items associated with an openable item from the DB
-
uint32 containerId = GetGUIDLow();
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_ITEMCONTAINER_ITEMS);
stmt->setUInt32(0, containerId);
@@ -1363,7 +1360,6 @@ void Item::ItemContainerDeleteLootItemsFromDB()
void Item::ItemContainerDeleteLootItemFromDB(uint32 itemID)
{
// Deletes a single item associated with an openable item from the DB
-
uint32 containerId = GetGUIDLow();
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_ITEMCONTAINER_ITEM);
stmt->setUInt32(0, containerId);
@@ -1376,7 +1372,6 @@ void Item::ItemContainerDeleteLootItemFromDB(uint32 itemID)
void Item::ItemContainerDeleteLootMoneyFromDB()
{
// Deletes the money loot associated with an openable item from the DB
-
uint32 containerId = GetGUIDLow();
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_ITEMCONTAINER_MONEY);
stmt->setUInt32(0, containerId);
@@ -1388,8 +1383,6 @@ void Item::ItemContainerDeleteLootMoneyFromDB()
void Item::ItemContainerDeleteLootMoneyAndLootItemsFromDB()
{
// Deletes money and items associated with an openable item from the DB
-
ItemContainerDeleteLootMoneyFromDB();
ItemContainerDeleteLootItemsFromDB();
}
-
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 4252bf1cb1f..78123d2500c 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -5572,44 +5572,14 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
// Shadow's Fate (Shadowmourne questline)
case 71169:
{
- bool ok = false;
- if (GetMap()->GetDifficulty() == RAID_DIFFICULTY_25MAN_NORMAL || GetMap()->GetDifficulty() == RAID_DIFFICULTY_25MAN_HEROIC)
- {
- uint32 spellId = 0;
-
- switch (GetEntry())
- {
- case 36678: // NPC: Professor Putricide
- spellId = 71518; // Spell: Unholy Infusion Credit
- break;
- case 37955: // NPC: Blood-Queen Lana'thel
- spellId = 72934; // Spell: Quest Credit
- break;
- case 36853: // NPC: Sindragosa <Queen of the Frostbrood>
- spellId = 72289; // Spell: Frost Infusion Quest Credit
- break;
- default:
- break;
- }
-
- if (spellId)
- CastSpell((Unit*)NULL, spellId, true);
-
- ok = true;
- }
-
- // The spell usually only hits one target, but it should hit every player
- // which applied Shadows Fate at least once to the victim.
- if (target->GetTypeId() == TYPEID_PLAYER && target->ToPlayer()->GetQuestStatus(24547) == QUEST_STATUS_INCOMPLETE)
+ Unit* caster = triggeredByAura->GetCaster();
+ if (caster && caster->GetTypeId() == TYPEID_PLAYER && caster->ToPlayer()->GetQuestStatus(24547) == QUEST_STATUS_INCOMPLETE)
{
- triggered_spell_id = 71203;
- ok = true;
+ CastSpell(caster, 71203, true);
+ return true;
}
-
- if (!ok)
+ else
return false;
-
- break;
}
// Essence of the Blood Queen
case 70871:
@@ -9055,7 +9025,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
case 71169:
{
// Victim needs more checks so bugs, rats or summons can not be affected by the proc.
- if (GetTypeId() != TYPEID_PLAYER || victim->GetTypeId() != TYPEID_UNIT || victim->GetCreatureType() == CREATURE_TYPE_CRITTER)
+ if (GetTypeId() != TYPEID_PLAYER || !victim || victim->GetTypeId() != TYPEID_UNIT || victim->GetCreatureType() == CREATURE_TYPE_CRITTER)
return false;
Player* player = ToPlayer();
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index fcfa441455e..61b92ce6f81 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -1546,11 +1546,21 @@ SpellCastResult SpellInfo::CheckTarget(Unit const* caster, WorldObject const* ta
if (unitTarget->HasUnitState(UNIT_STATE_IN_FLIGHT))
return SPELL_FAILED_BAD_TARGETS;
- if (TargetAuraState && !unitTarget->HasAuraState(AuraStateType(TargetAuraState), this, caster))
- return SPELL_FAILED_TARGET_AURASTATE;
+ /* TARGET_UNIT_MASTER gets blocked here for passengers, because the whole idea of this check is to
+ not allow passengers to be implicitly hit by spells, however this target type should be an exception,
+ if this is left it kills spells that award kill credit from vehicle to master (few spells),
+ the use of these 2 covers passenger target check, logically, if vehicle cast this to master it should always hit
+ him, because it would be it's passenger, there's no such case where this gets to fail legitimacy, this problem
+ cannot be solved from within the check in other way since target type cannot be called for the spell currently
+ Spell examples: [ID - 52864 Devour Water, ID - 52862 Devour Wind, ID - 49370 Wyrmrest Defender: Destabilize Azure Dragonshrine Effect] */
+ if (!caster->IsVehicle() && !(caster->GetCharmerOrOwner() == target))
+ {
+ if (TargetAuraState && !unitTarget->HasAuraState(AuraStateType(TargetAuraState), this, caster))
+ return SPELL_FAILED_TARGET_AURASTATE;
- if (TargetAuraStateNot && unitTarget->HasAuraState(AuraStateType(TargetAuraStateNot), this, caster))
- return SPELL_FAILED_TARGET_AURASTATE;
+ if (TargetAuraStateNot && unitTarget->HasAuraState(AuraStateType(TargetAuraStateNot), this, caster))
+ return SPELL_FAILED_TARGET_AURASTATE;
+ }
if (TargetAuraSpell && !unitTarget->HasAura(sSpellMgr->GetSpellIdForDifficulty(TargetAuraSpell, caster)))
return SPELL_FAILED_TARGET_AURASTATE;
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index 3eefd969eed..d166c6f9ebf 100644
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -3413,6 +3413,9 @@ void SpellMgr::LoadDbcDataCorrections()
case 71123: // Decimate (Stinky & Precious)
spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_100_YARDS; // 100yd
break;
+ case 71169: // Shadow's Fate
+ spellInfo->AttributesEx3 |= SPELL_ATTR3_STACK_FOR_DIFF_CASTERS;
+ break;
case 72378: // Blood Nova (Deathbringer Saurfang)
case 73058: // Blood Nova (Deathbringer Saurfang)
spellInfo->EffectRadiusIndex[0] = EFFECT_RADIUS_200_YARDS;
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp
index c97fd40929a..14ea31a6518 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp
@@ -59,7 +59,7 @@ enum Emotes
EMOTE_SLOW = 0,
EMOTE_FREEZE = 1,
EMOTE_FROZEN = 2,
-
+
EMOTE_CRACK = 3,
EMOTE_SHATTER = 4,
EMOTE_EXPLODE = 5
diff --git a/src/server/scripts/Kalimdor/moonglade.cpp b/src/server/scripts/Kalimdor/moonglade.cpp
index f438275b82a..14a76cc153e 100644
--- a/src/server/scripts/Kalimdor/moonglade.cpp
+++ b/src/server/scripts/Kalimdor/moonglade.cpp
@@ -323,7 +323,7 @@ public:
}
void IsSummonedBy(Unit* /*summoner*/)
- {
+ {
std::list<Player*> playerOnQuestList;
Trinity::AnyPlayerInObjectRangeCheck checker(me, 5.0f);
Trinity::PlayerListSearcher<Trinity::AnyPlayerInObjectRangeCheck> searcher(me, playerOnQuestList, checker);
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp
index 2b240bc93d8..a246852c8ed 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp
@@ -62,6 +62,9 @@ enum Spells
SPELL_INCITE_TERROR = 73070,
SPELL_BLOODBOLT_WHIRL = 71772,
SPELL_ANNIHILATE = 71322,
+
+ // Blood Infusion
+ SPELL_BLOOD_INFUSION_CREDIT = 72934
};
enum Shadowmourne
@@ -182,6 +185,10 @@ class boss_blood_queen_lana_thel : public CreatureScript
{
_JustDied();
Talk(SAY_DEATH);
+
+ if (Is25ManRaid() && me->HasAura(SPELL_SHADOWS_FATE))
+ DoCastAOE(SPELL_BLOOD_INFUSION_CREDIT, true);
+
CleanAuras();
// Blah, credit the quest
if (_creditBloodQuickening)
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
index 4727504a4bd..d697be214c7 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
@@ -51,62 +51,65 @@ enum ScriptTexts
enum Spells
{
// Festergut
- SPELL_RELEASE_GAS_VISUAL = 69125,
- SPELL_GASEOUS_BLIGHT_LARGE = 69157,
- SPELL_GASEOUS_BLIGHT_MEDIUM = 69162,
- SPELL_GASEOUS_BLIGHT_SMALL = 69164,
- SPELL_MALLABLE_GOO_H = 70852,
+ SPELL_RELEASE_GAS_VISUAL = 69125,
+ SPELL_GASEOUS_BLIGHT_LARGE = 69157,
+ SPELL_GASEOUS_BLIGHT_MEDIUM = 69162,
+ SPELL_GASEOUS_BLIGHT_SMALL = 69164,
+ SPELL_MALLABLE_GOO_H = 70852,
// Rotface
- SPELL_VILE_GAS_H = 69240,
+ SPELL_VILE_GAS_H = 69240,
// Professor Putricide
- SPELL_SLIME_PUDDLE_TRIGGER = 70341,
- SPELL_MALLEABLE_GOO = 70852,
- SPELL_UNSTABLE_EXPERIMENT = 70351,
- SPELL_TEAR_GAS = 71617, // phase transition
- SPELL_TEAR_GAS_CREATURE = 71618,
- SPELL_TEAR_GAS_CANCEL = 71620,
- SPELL_TEAR_GAS_PERIODIC_TRIGGER = 73170,
- SPELL_CREATE_CONCOCTION = 71621,
- SPELL_GUZZLE_POTIONS = 71893,
- SPELL_OOZE_TANK_PROTECTION = 71770, // protects the tank
- SPELL_CHOKING_GAS_BOMB = 71255,
- SPELL_OOZE_VARIABLE = 74118,
- SPELL_GAS_VARIABLE = 74119,
- SPELL_UNBOUND_PLAGUE = 70911,
- SPELL_UNBOUND_PLAGUE_SEARCHER = 70917,
- SPELL_PLAGUE_SICKNESS = 70953,
- SPELL_UNBOUND_PLAGUE_PROTECTION = 70955,
- SPELL_MUTATED_PLAGUE = 72451,
- SPELL_MUTATED_PLAGUE_CLEAR = 72618,
+ SPELL_SLIME_PUDDLE_TRIGGER = 70341,
+ SPELL_MALLEABLE_GOO = 70852,
+ SPELL_UNSTABLE_EXPERIMENT = 70351,
+ SPELL_TEAR_GAS = 71617, // phase transition
+ SPELL_TEAR_GAS_CREATURE = 71618,
+ SPELL_TEAR_GAS_CANCEL = 71620,
+ SPELL_TEAR_GAS_PERIODIC_TRIGGER = 73170,
+ SPELL_CREATE_CONCOCTION = 71621,
+ SPELL_GUZZLE_POTIONS = 71893,
+ SPELL_OOZE_TANK_PROTECTION = 71770, // protects the tank
+ SPELL_CHOKING_GAS_BOMB = 71255,
+ SPELL_OOZE_VARIABLE = 74118,
+ SPELL_GAS_VARIABLE = 74119,
+ SPELL_UNBOUND_PLAGUE = 70911,
+ SPELL_UNBOUND_PLAGUE_SEARCHER = 70917,
+ SPELL_PLAGUE_SICKNESS = 70953,
+ SPELL_UNBOUND_PLAGUE_PROTECTION = 70955,
+ SPELL_MUTATED_PLAGUE = 72451,
+ SPELL_MUTATED_PLAGUE_CLEAR = 72618,
// Slime Puddle
- SPELL_GROW_STACKER = 70345,
- SPELL_GROW = 70347,
- SPELL_SLIME_PUDDLE_AURA = 70343,
+ SPELL_GROW_STACKER = 70345,
+ SPELL_GROW = 70347,
+ SPELL_SLIME_PUDDLE_AURA = 70343,
// Gas Cloud
- SPELL_GASEOUS_BLOAT_PROC = 70215,
- SPELL_GASEOUS_BLOAT = 70672,
- SPELL_GASEOUS_BLOAT_PROTECTION = 70812,
- SPELL_EXPUNGED_GAS = 70701,
+ SPELL_GASEOUS_BLOAT_PROC = 70215,
+ SPELL_GASEOUS_BLOAT = 70672,
+ SPELL_GASEOUS_BLOAT_PROTECTION = 70812,
+ SPELL_EXPUNGED_GAS = 70701,
// Volatile Ooze
- SPELL_OOZE_ERUPTION = 70492,
- SPELL_VOLATILE_OOZE_ADHESIVE = 70447,
- SPELL_OOZE_ERUPTION_SEARCH_PERIODIC = 70457,
- SPELL_VOLATILE_OOZE_PROTECTION = 70530,
+ SPELL_OOZE_ERUPTION = 70492,
+ SPELL_VOLATILE_OOZE_ADHESIVE = 70447,
+ SPELL_OOZE_ERUPTION_SEARCH_PERIODIC = 70457,
+ SPELL_VOLATILE_OOZE_PROTECTION = 70530,
// Choking Gas Bomb
- SPELL_CHOKING_GAS_BOMB_PERIODIC = 71259,
- SPELL_CHOKING_GAS_EXPLOSION_TRIGGER = 71280,
+ SPELL_CHOKING_GAS_BOMB_PERIODIC = 71259,
+ SPELL_CHOKING_GAS_EXPLOSION_TRIGGER = 71280,
// Mutated Abomination vehicle
- SPELL_ABOMINATION_VEHICLE_POWER_DRAIN = 70385,
- SPELL_MUTATED_TRANSFORMATION = 70311,
- SPELL_MUTATED_TRANSFORMATION_DAMAGE = 70405,
- SPELL_MUTATED_TRANSFORMATION_NAME = 72401,
+ SPELL_ABOMINATION_VEHICLE_POWER_DRAIN = 70385,
+ SPELL_MUTATED_TRANSFORMATION = 70311,
+ SPELL_MUTATED_TRANSFORMATION_DAMAGE = 70405,
+ SPELL_MUTATED_TRANSFORMATION_NAME = 72401,
+
+ // Unholy Infusion
+ SPELL_UNHOLY_INFUSION_CREDIT = 71518
};
#define SPELL_GASEOUS_BLOAT_HELPER RAID_MODE<uint32>(70672, 72455, 72832, 72833)
@@ -293,6 +296,10 @@ class boss_professor_putricide : public CreatureScript
{
_JustDied();
Talk(SAY_DEATH);
+
+ if (Is25ManRaid() && me->HasAura(SPELL_SHADOWS_FATE))
+ DoCastAOE(SPELL_UNHOLY_INFUSION_CREDIT, true);
+
DoCast(SPELL_MUTATED_PLAGUE_CLEAR);
}
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp
index 96cabfed918..8bdef30a711 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp
@@ -82,6 +82,9 @@ enum Spells
SPELL_FOCUS_FIRE = 71350,
SPELL_ORDER_WHELP = 71357,
SPELL_CONCUSSIVE_SHOCK = 71337,
+
+ // Frost Infusion
+ SPELL_FROST_INFUSION_CREDIT = 72289
};
enum Events
@@ -231,8 +234,12 @@ class boss_sindragosa : public CreatureScript
void JustDied(Unit* killer)
{
- BossAI::JustDied(killer);
+ _JustDied();
Talk(SAY_DEATH);
+
+ if (Is25ManRaid() && me->HasAura(SPELL_SHADOWS_FATE))
+ DoCastAOE(SPELL_FROST_INFUSION_CREDIT, true);
+
}
void EnterCombat(Unit* victim)
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h
index 4e117d9f3e3..8edaf1aa985 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h
+++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h
@@ -54,6 +54,9 @@ enum SharedSpells
// The Lich King
SPELL_ARTHAS_TELEPORTER_CEREMONY = 72915,
SPELL_FROSTMOURNE_TELEPORT_VISUAL = 73078,
+
+ // Shadowmourne questline
+ SPELL_SHADOWS_FATE = 71169
};
enum TeleporterSpells