aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2019-06-17 21:17:14 +0200
committerShauren <shauren.trinity@gmail.com>2019-06-17 21:17:14 +0200
commit357e0ec394af33b9764ff9ac6eb9b8f7c16dce97 (patch)
tree1de085e7ea11eb2a9500f0f969d59786518f31c1
parenteef87a9cc06bea80b9867491e126c6500dc608a9 (diff)
Scripts/Quests: Fix Quest 14386 Leader of the Pack
By Malcrom
-rw-r--r--sql/updates/world/master/2019_06_17_00_world.sql64
-rw-r--r--src/server/scripts/Spells/spell_quest.cpp34
2 files changed, 98 insertions, 0 deletions
diff --git a/sql/updates/world/master/2019_06_17_00_world.sql b/sql/updates/world/master/2019_06_17_00_world.sql
new file mode 100644
index 00000000000..520d4e37910
--- /dev/null
+++ b/sql/updates/world/master/2019_06_17_00_world.sql
@@ -0,0 +1,64 @@
+-- **** Fix quest 14386 "Leader of the Pack" ****
+
+DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_q14386_call_attack_mastiffs';
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+(68682, 'spell_q14386_call_attack_mastiffs');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceGroup` IN (1,4) AND `SourceEntry` IN (68682) AND `SourceId`=0;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(13, 1, 68682, 0, 0, 31, 0, 3, 36312, 0, 0, 0, 0, '', 'Call Attack Mastiffs Effect 0 will hit Dark Ranger Thyala'),
+(13, 4, 68682, 0, 0, 31, 1, 3, 36198, 0, 0, 0, 0, '', 'Call Attack Mastiffs Effect 2 will hit Generic Trigger LAB - Multiphase (Ground)');
+
+UPDATE `creature` SET `spawntimesecs`=120 WHERE id=36312;
+UPDATE `creature_template` SET `mingold`=4,`maxgold`=10 WHERE `entry` IN (36312);
+
+-- Dark Ranger Thyala SAI
+SET @ENTRY := 36312;
+UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry` IN (@ENTRY);
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY) 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`,`event_param5`,`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,4,0,100,0,0,0,0,0,0,11,6660,0,0,0,0,0,2,0,0,0,0,0,0,0,"Dark Ranger Thyala - On Aggro - Cast 'Shoot'"),
+(@ENTRY,0,1,0,9,0,100,0,0,5,10000,10000,0,11,68683,0,0,0,0,0,1,0,0,0,0,0,0,0,"Dark Ranger Thyala - On Range 0-5 - Cast 'Knockback'"),
+(@ENTRY,0,2,0,8,0,100,0,68682,0,0,0,0,49,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Dark Ranger Thyala - On Spellhit - Attack Start Invoker");
+
+-- Attack Mastiff SAI
+SET @ENTRY := 36405;
+UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry` IN (@ENTRY);
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY) 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`,`event_param5`,`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,9,0,50,1,8,25,0,0,0,11,68687,0,0,0,0,0,2,0,0,0,0,0,0,0,"Attack Mastiff - Combat - Cast 'Leap' (No Repeat)"),
+(@ENTRY,0,1,0,0,0,100,0,5000,9000,10000,10000,0,11,26281,0,0,0,0,0,2,0,0,0,0,0,0,0,"Attack Mastiff - Combat - Cast 'Taunt'"),
+(@ENTRY,0,2,0,9,0,50,0,0,3,15000,15000,0,11,15971,0,0,0,0,0,1,0,0,0,0,0,0,0,"Attack Mastiff - On Range 0-5 - Cast 'Demoralizing Roar'"),
+(@ENTRY,0,4,0,60,0,100,1,200,200,0,0,0,49,0,0,0,0,0,0,10,255706,36312,0,0,0,0,0,"Attack Mastiff - Update Event - Attack Dark Ranger Thyala (No Repeat)");
+
+-- Attack Mastiff SAI
+SET @ENTRY := 36409;
+UPDATE `creature_template` SET `AIName`="SmartAI", `faction`=2203 WHERE `entry` IN (@ENTRY);
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY) 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`,`event_param5`,`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,9,0,50,1,8,25,0,0,0,11,68687,0,0,0,0,0,2,0,0,0,0,0,0,0,"Attack Mastiff - Combat - Cast 'Leap' (No Repeat)"),
+(@ENTRY,0,1,0,0,0,100,0,5000,9000,10000,10000,0,11,26281,0,0,0,0,0,2,0,0,0,0,0,0,0,"Attack Mastiff - Combat - Cast 'Taunt'"),
+(@ENTRY,0,2,0,9,0,50,0,0,3,15000,15000,0,11,15971,0,0,0,0,0,1,0,0,0,0,0,0,0,"Attack Mastiff - On Range 0-5 - Cast 'Demoralizing Roar'"),
+(@ENTRY,0,3,0,1,0,100,1,0,0,0,0,0,49,0,0,0,0,0,0,10,255706,36312,0,0,0,0,0,"Attack Mastiff - OOC - Attack Dark Ranger Thyala (No Repeat)");
+
+-- Lord Godfrey SAI
+SET @ENTRY := 36290;
+UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry` IN (@ENTRY);
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY) AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (3629000) 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`,`event_param5`,`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,20,0,100,0,14386,0,0,0,0,80,3629000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Lord Godfrey - quest complete - Run Script"),
+(3629000,9,0,0,0,0,100,0,0,0,0,0,0,85,68483,0,0,0,0,0,7,0,0,0,0,0,0,0,"Lord Godfrey - Script - Cast 'Phase - Quest Zone-Specific 08'"),
+(3629000,9,1,0,0,0,100,0,0,0,0,0,0,28,68482,0,0,0,0,0,7,0,0,0,0,0,0,0,"Lord Godfrey - Script - Unaura 'Phase - Quest Zone-Specific 07'"),
+(3629000,9,2,0,0,0,100,0,500,500,0,0,0,85,69027,0,0,0,0,0,7,0,0,0,0,0,0,0,"Lord Godfrey - Script - Cast 'Forcecast Cataclysm I'"),
+(3629000,9,3,0,0,0,100,0,100,100,0,0,0,1,0,1,0,0,0,0,10,255676,36291,0,0,0,0,0,"Lord Godfrey - Script - Melinda Hammond Say 0"),
+(3629000,9,4,0,0,0,100,0,0,0,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Lord Godfrey - Script - Say 0");
+
+DELETE FROM `creature_text` WHERE `CreatureID` IN (36290,36291);
+INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `comment`) VALUES
+(36290, 0, 0, 'Hold your positions, men!', 14, 0, 100, 0, 0, 0, 36632, 'Lord Godfrey'),
+(36291, 0, 0, 'What''s happening?!', 12, 0, 100, 0, 0, 0, 36633, 'Melinda Hammond');
+
+-- 471 Phases 182,183
+UPDATE `creature` SET `PhaseId`=0, `PhaseGroup`=471 WHERE `guid` IN
+(255676,255677,255678,255679,255680,255681);
diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp
index 01d1c1f45e5..709ee46bc33 100644
--- a/src/server/scripts/Spells/spell_quest.cpp
+++ b/src/server/scripts/Spells/spell_quest.cpp
@@ -2754,6 +2754,39 @@ public:
}
};
+/*######
+## Quest 14386 Leader of the Pack
+######*/
+
+enum CallAttackMastiffs
+{
+ NPC_ATTACK_MASTIFF = 36405
+};
+
+// 68682 Call Attack Mastiffs
+class spell_q14386_call_attack_mastiffs : public SpellScript
+{
+ PrepareSpellScript(spell_q14386_call_attack_mastiffs);
+
+ void HandleEffect(SpellEffIndex /*eff*/)
+ {
+ Unit* caster = GetCaster();
+ caster->SummonCreature(NPC_ATTACK_MASTIFF, -1944.573f, 2657.402f, 0.994939f, 1.691919f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
+ caster->SummonCreature(NPC_ATTACK_MASTIFF, -2005.65f, 2663.526f, -2.086935f, 0.5942355f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
+ caster->SummonCreature(NPC_ATTACK_MASTIFF, -1996.506f, 2651.347f, -1.011707f, 0.8185352f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
+ caster->SummonCreature(NPC_ATTACK_MASTIFF, -1972.352f, 2640.07f, 1.080288f, 1.217854f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
+ caster->SummonCreature(NPC_ATTACK_MASTIFF, -1949.322f, 2642.76f, 1.242482f, 1.58074f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
+ caster->SummonCreature(NPC_ATTACK_MASTIFF, -1993.94f, 2672.535f, -2.322549f, 0.5766209f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
+ caster->SummonCreature(NPC_ATTACK_MASTIFF, -1982.724f, 2662.8f, -1.773986f, 0.8628055f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
+ caster->SummonCreature(NPC_ATTACK_MASTIFF, -1973.301f, 2655.475f, -0.7831049f, 1.098415f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
+ caster->SummonCreature(NPC_ATTACK_MASTIFF, -1956.509f, 2650.655f, 1.350571f, 1.441473f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
+ }
+
+ void Register() override
+ {
+ OnEffectHit += SpellEffectFn(spell_q14386_call_attack_mastiffs::HandleEffect, EFFECT_1, SPELL_EFFECT_SEND_EVENT);
+ }
+};
void AddSC_quest_spell_scripts()
{
new spell_q55_sacred_cleansing();
@@ -2823,4 +2856,5 @@ void AddSC_quest_spell_scripts()
new spell_q11306_mixing_vrykul_blood();
new spell_q11306_failed_mix_43376();
new spell_q11306_failed_mix_43378();
+ RegisterSpellScript(spell_q14386_call_attack_mastiffs);
}