From 164fe1890e5970b0405c47ecc78b004fa406d027 Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Sat, 26 Sep 2020 15:11:36 +0200 Subject: [PATCH] Scripts/BWD: Lightning Conductor will now get removed when Lord Victor Nefarius transforms the target into a Shadow Conductor --- .../BlackwingDescent/boss_omnotron_defense_system.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/boss_omnotron_defense_system.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/boss_omnotron_defense_system.cpp index d1b806155b..9d4a6a5d92 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/boss_omnotron_defense_system.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/boss_omnotron_defense_system.cpp @@ -51,6 +51,7 @@ enum Spells SPELL_ELECTRICAL_DISCHARGE = 79879, SPELL_UNSTABLE_SHIELD = 79900, SPELL_STATIC_SHOCK = 79912, + SPELL_LIGHTNING_CONDUCTOR_10N = 79888, // Magmatron SPELL_INCINERATION_SECURITY_MEASURE = 79023, @@ -1490,12 +1491,18 @@ class spell_omnotron_shadow_infusion : public SpellScript { bool Validate(SpellInfo const* /*spellInfo*/) override { - return ValidateSpellInfo({ SPELL_SHADOW_CONDUCTOR }); + return ValidateSpellInfo( + { + SPELL_SHADOW_CONDUCTOR, + SPELL_LIGHTNING_CONDUCTOR_10N + }); } void HandleScriptEffect(SpellEffIndex /*effIndex*/) { - GetHitUnit()->CastSpell(GetHitUnit(), SPELL_SHADOW_CONDUCTOR, true); + Unit* target = GetHitUnit(); + target->RemoveAurasDueToSpell(sSpellMgr->GetSpellIdForDifficulty(SPELL_LIGHTNING_CONDUCTOR_10N, target)); + target->CastSpell(target, SPELL_SHADOW_CONDUCTOR, true); } void Register() override