aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/3.3.5/2021_09_11_00_world.sql4
-rw-r--r--src/server/scripts/Spells/spell_dk.cpp21
2 files changed, 25 insertions, 0 deletions
diff --git a/sql/updates/world/3.3.5/2021_09_11_00_world.sql b/sql/updates/world/3.3.5/2021_09_11_00_world.sql
new file mode 100644
index 00000000000..39a5097bfa3
--- /dev/null
+++ b/sql/updates/world/3.3.5/2021_09_11_00_world.sql
@@ -0,0 +1,4 @@
+--
+DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_dk_wandering_plague_damage';
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(50526, 'spell_dk_wandering_plague_damage');
diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp
index 5e134b45f57..70842d399ab 100644
--- a/src/server/scripts/Spells/spell_dk.cpp
+++ b/src/server/scripts/Spells/spell_dk.cpp
@@ -2104,6 +2104,26 @@ class spell_dk_wandering_plague : public AuraScript
}
};
+// 50526 - Wandering Plague (Damage)
+class spell_dk_wandering_plague_damage : public SpellScript
+{
+ PrepareSpellScript(spell_dk_wandering_plague_damage);
+
+ void FilterTargets(std::list<WorldObject*>& targets)
+ {
+ targets.remove_if([](WorldObject* object) -> bool
+ {
+ Unit* target = object->ToUnit();
+ return target && target->HasBreakableByDamageCrowdControlAura();
+ });
+ }
+
+ void Register() override
+ {
+ OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_dk_wandering_plague_damage::FilterTargets, EFFECT_0, TARGET_UNIT_DEST_AREA_ENEMY);
+ }
+};
+
// -52284 - Will of the Necropolis
class spell_dk_will_of_the_necropolis : public AuraScript
{
@@ -2758,6 +2778,7 @@ void AddSC_deathknight_spell_scripts()
RegisterSpellScript(spell_dk_vampiric_blood);
RegisterSpellScript(spell_dk_vendetta);
RegisterSpellScript(spell_dk_wandering_plague);
+ RegisterSpellScript(spell_dk_wandering_plague_damage);
RegisterSpellScript(spell_dk_will_of_the_necropolis);
RegisterSpellScript(spell_dk_death_grip_initial);
RegisterSpellScript(spell_dk_raise_ally_initial);