aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeader <keader.android@gmail.com>2019-02-20 10:40:19 -0300
committerShauren <shauren.trinity@gmail.com>2021-11-23 23:16:43 +0100
commitdba7e2507fee3bb53cb4aa7140dee401d478a16f (patch)
tree2690759c9538589cca06f6106719c6db37240a73
parentef04a26bf4b4819aed714eb65ee509aa5d9a563f (diff)
Scripts/Illidan: Fixed Parasitic shadowfiends reproducing like rabbits
(cherry picked from commit a617cc40977b7b019f79a198daebede90c59f5c1)
-rw-r--r--sql/updates/world/master/2021_11_23_20_world_2019_02_20_00_world.sql3
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_illidan.cpp23
2 files changed, 26 insertions, 0 deletions
diff --git a/sql/updates/world/master/2021_11_23_20_world_2019_02_20_00_world.sql b/sql/updates/world/master/2021_11_23_20_world_2019_02_20_00_world.sql
new file mode 100644
index 00000000000..01147c6eab4
--- /dev/null
+++ b/sql/updates/world/master/2021_11_23_20_world_2019_02_20_00_world.sql
@@ -0,0 +1,3 @@
+DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_illidan_parasitic_shadowfiend_proc';
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(41913,'spell_illidan_parasitic_shadowfiend_proc');
diff --git a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
index 23eb5001cb0..640fe275c61 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
@@ -1937,6 +1937,28 @@ class spell_illidan_parasitic_shadowfiend : public AuraScript
}
};
+// 41913 - Parasitic Shadowfiend Passive
+class spell_illidan_parasitic_shadowfiend_proc : public AuraScript
+{
+ PrepareAuraScript(spell_illidan_parasitic_shadowfiend_proc);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_PARASITIC_SHADOWFIEND, SPELL_PARASITIC_SHADOWFIEND_2 });
+ }
+
+ bool CheckProc(ProcEventInfo& eventInfo)
+ {
+ Unit* target = eventInfo.GetProcTarget();
+ return target && !target->HasAura(SPELL_PARASITIC_SHADOWFIEND) && !target->HasAura(SPELL_PARASITIC_SHADOWFIEND_2);
+ }
+
+ void Register() override
+ {
+ DoCheckProc += AuraCheckProcFn(spell_illidan_parasitic_shadowfiend_proc::CheckProc);
+ }
+};
+
// 41923 - Remove Parasitic Shadowfiends (SERVERSIDE)
class spell_illidan_remove_parasitic_shadowfiend : public AuraScript
{
@@ -2349,6 +2371,7 @@ void AddSC_boss_illidan()
RegisterAuraScript(spell_illidan_akama_door_channel);
RegisterSpellScript(spell_illidan_draw_soul);
RegisterAuraScript(spell_illidan_parasitic_shadowfiend);
+ RegisterAuraScript(spell_illidan_parasitic_shadowfiend_proc);
RegisterAuraScript(spell_illidan_remove_parasitic_shadowfiend);
RegisterSpellScript(spell_illidan_throw_warglaive);
RegisterAuraScript(spell_illidan_tear_of_azzinoth_channel);