mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-03 15:47:04 +01:00
Core/Spells: removed Death and Decay hack and updated spellscript for proper handling
This commit is contained in:
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user