aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/2012_12_25_01_world_sai.sql28
-rw-r--r--sql/updates/world/2012_12_25_02_world_sai.sql32
-rw-r--r--sql/updates/world/2012_12_25_03_world_sai.sql70
-rw-r--r--sql/updates/world/2012_12_25_04_world_sai.sql6
-rw-r--r--src/server/game/Quests/QuestDef.h1
5 files changed, 137 insertions, 0 deletions
diff --git a/sql/updates/world/2012_12_25_01_world_sai.sql b/sql/updates/world/2012_12_25_01_world_sai.sql
new file mode 100644
index 00000000000..cad0ce2aec3
--- /dev/null
+++ b/sql/updates/world/2012_12_25_01_world_sai.sql
@@ -0,0 +1,28 @@
+-- //1// Prevent Whitebark dying before awarding quest - http://old.wowhead.com/quest=10166
+-- Closes: https://github.com/TrinityCore/TrinityCore/issues/4840
+SET @WHITEBARK := 19456;
+
+-- SAI support
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@WHITEBARK 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
+(@WHITEBARK,0,0,0,54,0,100,0,0,0,0,0,42,0,25,0,0,0,0,1,0,0,0,0,0,0,0,'Whitebark\'s Spirit - On summon - Set invincibility HP at 25%'),
+(@WHITEBARK,0,1,0,4,0,100,1,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Whitebark\'s Spirit - On aggro (not repeatable) - Say 0'),
+(@WHITEBARK,0,2,3,2,0,100,0,24,26,120000,120000,102,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Whitebark\'s Spirit - 24-26% HP - Disable HP reg /video/'),
+(@WHITEBARK,0,3,4,61,0,100,0,0,0,0,0,101,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Whitebark\'s Spirit - Linked - Set home position'),
+(@WHITEBARK,0,4,5,61,0,100,0,0,0,0,0,2,35,0,0,0,0,0,1,0,0,0,0,0,0,0,'Whitebark\'s Spirit - Linked - Change faction to friendly'),
+(@WHITEBARK,0,6,7,61,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Whitebark\'s Spirit - Linked - Say 1'),
+(@WHITEBARK,0,7,0,61,0,100,0,0,0,0,0,24,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Whitebark\'s Spirit - Linked - evade'),
+(@WHITEBARK,0,8,0,0,0,100,0,2500,5500,12000,14500,11,31287,0,0,0,0,0,2,0,0,0,0,0,0,0,'Whitebark\'s Spirit - IC - Casts Entangling Roots'),
+(@WHITEBARK,0,9,0,0,0,100,0,7500,7500,9500,16000,11,11442,0,0,0,0,0,2,0,0,0,0,0,0,0,'Whitebark\'s Spirit - IC - Casts Withered Touch'),
+(@WHITEBARK,0,10,0,1,0,100,0,60000,60000,60000,60000,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Whitebark\'s Spirit - After 60sec OOC - Despawn');
+
+-- Assign creature_text correctly
+DELETE FROM `creature_text` WHERE `entry`=@WHITEBARK;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(@WHITEBARK,0,0,'Haven\'t you done enough harm? Must you also disturb my slumber?',12,0,100,0,2000,0,'Whitebark\'s Spirit - 19456'),
+(@WHITEBARK,1,0,'What good does this violence serve? What is done is done. I have failed my people.',12,0,100,0,1000,0,'Whitebark\'s Spirit - 19456');
+
+-- //2// Change quest end npc for http://www.wowhead.com/quest=24872/respite-for-a-tormented-soul
+-- Closes: https://github.com/TrinityCore/TrinityCore/issues/6478
+UPDATE `creature_involvedrelation` SET `id`=38017 WHERE `id`=38589 AND `quest`=24872;
+UPDATE `creature_template` SET `npcflag`=0x00000002 WHERE `entry`=38017; -- add quest giver flag
diff --git a/sql/updates/world/2012_12_25_02_world_sai.sql b/sql/updates/world/2012_12_25_02_world_sai.sql
new file mode 100644
index 00000000000..35ac4ebb97b
--- /dev/null
+++ b/sql/updates/world/2012_12_25_02_world_sai.sql
@@ -0,0 +1,32 @@
+-- SAI for Crusader Lamoof
+SET @ENTRY := 28141;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+DELETE FROM `creature_template_addon` WHERE `entry`=@ENTRY;
+INSERT INTO `creature_template_addon` (`entry`,`bytes1`) VALUES (@ENTRY,7);
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
+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
+(@ENTRY,0,0,1,8,0,100,0,50662,0,0,0,11,50673,4,0,0,0,0,7,0,0,0,0,0,0,0, 'Crusader Lamoof - On spell hit - cast Force Summon Crusader Lamoof'),
+(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,11,50679,4,0,0,0,0,7,0,0,0,0,0,0,0, 'Crusader Lamoof - On spell hit - cast Lamoof Dying'),
+(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,41,1000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Crusader Lamoof - On spell hit - despawn');
+
+-- SAI for Crusader Jonothan
+SET @ENTRY := 28133;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+DELETE FROM `creature_template_addon` WHERE `entry`=@ENTRY;
+INSERT INTO `creature_template_addon` (`entry`,`bytes1`) VALUES (@ENTRY,7);
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
+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
+(@ENTRY,0,0,1,8,0,100,0,50662,0,0,0,11,50663,4,0,0,0,0,7,0,0,0,0,0,0,0, 'Crusader Jonothan - On spell hit - cast Force Summon Crusader LeCraft'),
+(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,11,50666,4,0,0,0,0,7,0,0,0,0,0,0,0, 'Crusader Jonothan - On spell hit - cast Jonothan Dying'),
+(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,41,1000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Crusader Jonothan - On spell hit - despawn');
+
+-- SAI for Crusader Josephine
+SET @ENTRY := 28143;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+DELETE FROM `creature_template_addon` WHERE `entry`=@ENTRY;
+INSERT INTO `creature_template_addon` (`entry`,`bytes1`) VALUES (@ENTRY,7);
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
+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
+(@ENTRY,0,0,1,8,0,100,0,50662,0,0,0,11,50691,4,0,0,0,0,7,0,0,0,0,0,0,0, 'Crusader Josephine - On spell hit - cast Force Summon Crusader Josephine'),
+(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,11,50693,4,0,0,0,0,7,0,0,0,0,0,0,0, 'Crusader Josephine - On spell hit - cast Josephine Dying'),
+(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,41,1000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Crusader Josephine - On spell hit - despawn');
diff --git a/sql/updates/world/2012_12_25_03_world_sai.sql b/sql/updates/world/2012_12_25_03_world_sai.sql
new file mode 100644
index 00000000000..2a7553aabb3
--- /dev/null
+++ b/sql/updates/world/2012_12_25_03_world_sai.sql
@@ -0,0 +1,70 @@
+-- Quest 12512 "Leave No One Behind"
+-- Fix Leave No One Behind Bunny
+UPDATE `creature` SET `modelid`=0,`spawndist`=0,`MovementType`=0 WHERE `guid`=117936;
+UPDATE `creature_template` SET `flags_extra`=`flags_extra`|128 WHERE `entry`=28137;
+
+-- SAI for Leave No One Behind Bunny
+SET @ENTRY := 28137;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
+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
+(@ENTRY,0,0,0,1,0,100,0,2000,2000,2000,2000,11,50669,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Leave No One Behind Bunny - OOC - Cast Quest Credit');
+
+-- Add condition for Spell 50669 "Quest Credit"
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=50669;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(13,1,50669,0,31,3,28142,0,0,'','Spell Quest Credit targets Crusader Lamoof'),
+(13,1,50669,1,31,3,28136,0,0,'','Spell Quest Credit targets Crusader Jonothan'),
+(13,1,50669,2,31,3,28148,0,0,'','Spell Quest Credit targets Crusader Josephine');
+
+-- NPC talk text insert from sniff
+DELETE FROM `creature_text` WHERE `entry` IN (28142,28136,28148);
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(28142,0,0, '<sigh>... Well, I suppose it could be worse.',12,0,100,0,0,0, 'Crusader Lamoof'),
+(28136,0,0, 'Thank you, friend. Were it not for your aid I would be no more.',12,0,100,0,0,0, 'Crusader Jonothan'),
+(28148,0,0, 'I am in your debt, friend. Thank you for my life.',12,0,100,0,0,0, 'Crusader Josephine');
+
+-- SAI for Crusader Lamoof
+SET @ENTRY := 28142;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
+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
+(@ENTRY,0,0,1,54,0,100,0,0,0,0,0,11,50681,4,0,0,0,0,1,0,0,0,0,0,0,0, 'Crusader Lamoof - On Spawn - cast Bleeding Out'),
+(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,29,0,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Crusader Lamoof - On Spawn - follow envoker'),
+(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Crusader Lamoof - On Spawn - Set Phase 1'),
+(@ENTRY,0,3,0,23,0,100,0,50681,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Crusader Lamoof - Aura missing - despawn'),
+(@ENTRY,0,4,0,8,1,100,0,50669,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Crusader Lamoof - On spell hit - Set Phase 2'),
+(@ENTRY,0,5,0,1,2,100,1,0,0,0,0,11,50683,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Crusader Lamoof - OOC - Cast Kill Credit Lamoof 01 (Phase 2)'),
+(@ENTRY,0,6,0,1,2,100,1,100,100,0,0,11,50723,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Crusader Lamoof - OOC - Cast Strip Aura Lamoof 01 (Phase 2)'),
+(@ENTRY,0,7,0,1,2,100,1,200,200,0,0,29,1,0,0,0,0,0,19,28137,20,0,0,0,0,0, 'Crusader Lamoof - OOC - follow bunny (Phase 2)'),
+(@ENTRY,0,8,0,1,2,100,1,400,400,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Crusader Lamoof - OOC - Say text (Phase 2)');
+
+-- SAI for Crusader Jonothan
+SET @ENTRY := 28136;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
+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
+(@ENTRY,0,0,1,54,0,100,0,0,0,0,0,11,50665,4,0,0,0,0,1,0,0,0,0,0,0,0, 'Crusader Jonothan - On Spawn - cast Bleeding Out'),
+(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,29,0,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Crusader Jonothan - On Spawn - follow envoker'),
+(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Crusader Jonothan - On Spawn - Set Phase 1'),
+(@ENTRY,0,3,0,23,0,100,0,50665,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Crusader Jonothan - Aura missing - despawn'),
+(@ENTRY,0,4,0,8,1,100,0,50669,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Crusader Jonothan - On spell hit - Set Phase 2'),
+(@ENTRY,0,5,0,1,2,100,1,0,0,0,0,11,50671,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Crusader Jonothan - OOC - Cast Kill Credit Jonothan 01 (Phase 2)'),
+(@ENTRY,0,6,0,1,2,100,1,100,100,0,0,11,50709,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Crusader Jonothan - OOC - Cast Strip Aura Jonothan 01 (Phase 2)'),
+(@ENTRY,0,7,0,1,2,100,1,200,200,0,0,29,1,0,0,0,0,0,19,28137,20,0,0,0,0,0, 'Crusader Jonothan - OOC - follow bunny (Phase 2)'),
+(@ENTRY,0,8,0,1,2,100,1,400,400,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Crusader Jonothan - OOC - Say text (Phase 2)');
+
+-- SAI for Crusader Josephine
+SET @ENTRY := 28148;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
+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
+(@ENTRY,0,0,1,54,0,100,0,0,0,0,0,11,50695,4,0,0,0,0,1,0,0,0,0,0,0,0, 'Crusader Josephine - On Spawn - cast Bleeding Out'),
+(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,29,0,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Crusader Josephine - On Spawn - follow envoker'),
+(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Crusader Josephine - On Spawn - Set Phase 1'),
+(@ENTRY,0,3,0,23,0,100,0,50695,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Crusader Josephine - Aura missing - despawn'),
+(@ENTRY,0,4,0,8,1,100,0,50669,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Crusader Josephine - On spell hit - Set Phase 2'),
+(@ENTRY,0,5,0,1,2,100,1,0,0,0,0,11,50698,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Crusader Josephine - OOC - Cast Kill Credit Josephine 01 (Phase 2)'),
+(@ENTRY,0,6,0,1,2,100,1,100,100,0,0,11,50711,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Crusader Josephine - OOC - Cast Strip Aura Josephine 01 (Phase 2)'),
+(@ENTRY,0,7,0,1,2,100,1,200,200,0,0,29,1,0,0,0,0,0,19,28137,20,0,0,0,0,0, 'Crusader Josephine - OOC - follow bunny (Phase 2)'),
+(@ENTRY,0,8,0,1,2,100,1,400,400,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Crusader Josephine - OOC - Say text (Phase 2)');
diff --git a/sql/updates/world/2012_12_25_04_world_sai.sql b/sql/updates/world/2012_12_25_04_world_sai.sql
new file mode 100644
index 00000000000..46b2c4c2fd1
--- /dev/null
+++ b/sql/updates/world/2012_12_25_04_world_sai.sql
@@ -0,0 +1,6 @@
+-- Fix SAI for Crusader Jonothan
+UPDATE `smart_scripts` SET `action_param1`=50665 WHERE `entryorguid`=28136 AND `id`=0;
+UPDATE `smart_scripts` SET `event_param1`=50665 WHERE `entryorguid`=28136 AND `id`=3;
+-- Fix SAI for Crusader Josephine
+UPDATE `smart_scripts` SET `action_param1`=50695 WHERE `entryorguid`=28148 AND `id`=0;
+UPDATE `smart_scripts` SET `event_param1`=50695 WHERE `entryorguid`=28148 AND `id`=3;
diff --git a/src/server/game/Quests/QuestDef.h b/src/server/game/Quests/QuestDef.h
index b0a1bc60f7c..d8cb8cdbb4e 100644
--- a/src/server/game/Quests/QuestDef.h
+++ b/src/server/game/Quests/QuestDef.h
@@ -23,6 +23,7 @@
#include "DatabaseEnv.h"
#include "SharedDefines.h"
#include "WorldPacket.h"
+#include "DBCEnums.h"
#include <string>
#include <vector>