diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index 290ad8bd4ae..a8207710ab0 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -2983,17 +2983,6 @@ void SpellMgr::LoadSpellInfoCorrections() spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_20_YARDS); }); - // Death and Decay - ApplySpellFix({ 43265 }, [](SpellInfo* spellInfo) - { - // We need access to the targets of the dynaura to correctly apply the damage spell - // Currently EFFECT_1 has PERIODIC_DUMMY aura but TARGET_UNIT_CASTER set - // This will leave the spell in the same state as it was in 335 DBC - spellInfo->Effects[EFFECT_0].ApplyAuraName = SPELL_AURA_PERIODIC_DUMMY; - spellInfo->Effects[EFFECT_0].Amplitude = spellInfo->Effects[EFFECT_1].Amplitude; - spellInfo->Effects[EFFECT_1].Effect = 0; // might as well save a few cpu cycles - }); - ApplySpellFix({ 31347, // Doom 36327, // Shoot Arcane Explosion Arrow diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp index c377b9e5a04..32aea086232 100644 --- a/src/server/scripts/Spells/spell_dk.cpp +++ b/src/server/scripts/Spells/spell_dk.cpp @@ -24,6 +24,7 @@ #include "ScriptMgr.h" #include "Containers.h" #include "Creature.h" +#include "GridNotifiers.h" #include "Pet.h" #include "Player.h" #include "Spell.h" @@ -398,13 +399,13 @@ class spell_dk_death_and_decay : public SpellScriptLoader void HandleDummyTick(AuraEffect const* aurEff) { - if (Unit* caster = GetCaster()) - caster->CastCustomSpell(SPELL_DK_DEATH_AND_DECAY_DAMAGE, SPELLVALUE_BASE_POINT0, aurEff->GetAmount(), GetTarget(), true, nullptr, aurEff); + if (DynamicObject* dyn = GetTarget()->GetDynObject(aurEff->GetId())) + GetTarget()->CastSpell(dyn->GetPositionX(), dyn->GetPositionY(), dyn->GetPositionZ(), SPELL_DK_DEATH_AND_DECAY_DAMAGE, true, nullptr, aurEff); } void Register() override { - OnEffectPeriodic += AuraEffectPeriodicFn(spell_dk_death_and_decay_AuraScript::HandleDummyTick, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY); + OnEffectPeriodic += AuraEffectPeriodicFn(spell_dk_death_and_decay_AuraScript::HandleDummyTick, EFFECT_1, SPELL_AURA_PERIODIC_DUMMY); } };