aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/master/2022_09_05_23_world_2022_07_18_00_world.sql36
-rw-r--r--src/server/scripts/Outland/zone_hellfire_peninsula.cpp57
2 files changed, 93 insertions, 0 deletions
diff --git a/sql/updates/world/master/2022_09_05_23_world_2022_07_18_00_world.sql b/sql/updates/world/master/2022_09_05_23_world_2022_07_18_00_world.sql
new file mode 100644
index 00000000000..3abd99707fc
--- /dev/null
+++ b/sql/updates/world/master/2022_09_05_23_world_2022_07_18_00_world.sql
@@ -0,0 +1,36 @@
+--
+-- UPDATE `creature_template` SET `minlevel` = 1, `maxlevel` = 1, `exp` = 0 WHERE `entry` = 22444;
+UPDATE `creature_template` SET `unit_flags` = 33024 WHERE `entry` = 22454;
+
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (22444,16878,22454) AND `source_type` = 0;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (2245400) 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_param4`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(22444,0,0,0,60,0,100,0,5000,5000,5000,5000,0,11,39184,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Anchorite Relic Bunny - On Update - Cast 'Anchorite Contrition'"),
+
+(16878,0,0,0,4,0,100,0,0,0,0,0,0,11,35570,0,0,0,0,0,7,0,0,0,0,0,0,0,0,"Shattered Hand Berserker - On Aggro - Cast 'Charge'"),
+(16878,0,1,2,2,0,100,1,0,30,0,0,0,11,8599,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Shattered Hand Berserker - Between 0-30% Health - Cast 'Enrage' (No Repeat)"),
+(16878,0,2,0,61,0,100,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Shattered Hand Berserker - Between 0-30% Health - Say Line 0 (No Repeat)"),
+(16878,0,3,0,6,0,100,0,0,0,0,0,0,11,39190,2,0,0,0,0,1,0,0,0,0,0,0,0,0,"Shattered Hand Berserker - On Death - Cast 'Send Vengeance'"),
+
+(22454,0,0,0,11,0,100,0,0,0,0,0,0,80,2245400,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Fel Spirit - On Spawn - Run Script"),
+
+(2245400,9,0,0,0,0,100,0,0,0,0,0,0,1,0,0,0,0,0,0,23,0,0,0,0,0,0,0,0,"Fel Spirit - On Script - Say Line 0"),
+(2245400,9,1,0,0,0,100,0,0,0,0,0,0,66,0,0,0,0,0,0,23,0,0,0,0,0,0,0,0,"Fel Spirit - On Script - Set Orientation (Summoner)"),
+(2245400,9,2,0,0,0,100,0,3000,3000,0,0,0,144,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Fel Spirit - On Script - Set ImmunePC Off"),
+(2245400,9,3,0,0,0,100,0,0,0,0,0,0,49,0,0,0,0,0,0,23,0,0,0,0,0,0,0,0,"Fel Spirit - On Script - Start Attack Summoner");
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 22 AND `SourceEntry` = 16878 AND `SourceId` = 0;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 13 AND `SourceEntry` = 39190;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+-- Channeled aura is removed on death > condition always is false, this should be a bit better than previous SpellHit > Phase
+(22,4,16878,0,0,29,1,22444,30,0,0,0,0,"","Group 0: Execute Event (Action 3) if creature 'Anchorite Relic Bunny' is within 30 yards"),
+(13,1,39190,0,0,31,0,3,22444,0,0,0,0,"","Group 0: Spell 'Send Vengeance' (Effect 0) targets creature 'Anchorite Relic Bunny'");
+
+DELETE FROM `spell_script_names` WHERE `ScriptName` IN (
+'spell_hellfire_peninsula_send_vengeance',
+'spell_hellfire_peninsula_send_vengeance_to_player');
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+(39190,'spell_hellfire_peninsula_send_vengeance'),
+(39202,'spell_hellfire_peninsula_send_vengeance_to_player');
+
+UPDATE `gameobject_template_addon` SET `flags` = 0 WHERE `entry` = 185298;
diff --git a/src/server/scripts/Outland/zone_hellfire_peninsula.cpp b/src/server/scripts/Outland/zone_hellfire_peninsula.cpp
index 8f4b432c8c1..09335a4340f 100644
--- a/src/server/scripts/Outland/zone_hellfire_peninsula.cpp
+++ b/src/server/scripts/Outland/zone_hellfire_peninsula.cpp
@@ -24,6 +24,7 @@
#include "Player.h"
#include "ScriptedEscortAI.h"
#include "ScriptedGossip.h"
+#include "SpellScript.h"
#include "TemporarySummon.h"
enum ExorcismSpells
@@ -794,6 +795,60 @@ struct npc_fear_controller : public ScriptedAI
EventMap _events;
};
+/*######
+## Quest 10909: Fel Spirits
+######*/
+
+enum FelSpirits
+{
+ SPELL_SEND_VENGEANCE_TO_PLAYER = 39202,
+ SPELL_SUMMON_FEL_SPIRIT = 39206
+};
+
+// 39190 - Send Vengeance
+class spell_hellfire_peninsula_send_vengeance : public SpellScript
+{
+ PrepareSpellScript(spell_hellfire_peninsula_send_vengeance);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_SEND_VENGEANCE_TO_PLAYER });
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ if (TempSummon* target = GetHitUnit()->ToTempSummon())
+ if (Unit* summoner = target->GetSummonerUnit())
+ target->CastSpell(summoner, SPELL_SEND_VENGEANCE_TO_PLAYER, true);
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_hellfire_peninsula_send_vengeance::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
+// 39202 - Send Vengeance to Player
+class spell_hellfire_peninsula_send_vengeance_to_player : public SpellScript
+{
+ PrepareSpellScript(spell_hellfire_peninsula_send_vengeance_to_player);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_SUMMON_FEL_SPIRIT });
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ GetHitUnit()->CastSpell(GetHitUnit(), SPELL_SUMMON_FEL_SPIRIT, true);
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_hellfire_peninsula_send_vengeance_to_player::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
void AddSC_hellfire_peninsula()
{
new npc_colonel_jules();
@@ -802,4 +857,6 @@ void AddSC_hellfire_peninsula()
RegisterCreatureAI(npc_watch_commander_leonus);
RegisterCreatureAI(npc_infernal_rain_hellfire);
RegisterCreatureAI(npc_fear_controller);
+ RegisterSpellScript(spell_hellfire_peninsula_send_vengeance);
+ RegisterSpellScript(spell_hellfire_peninsula_send_vengeance_to_player);
}