Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp
- index aa4f3cc..6d26b9e 100644
- --- a/src/server/scripts/Spells/spell_warlock.cpp
- +++ b/src/server/scripts/Spells/spell_warlock.cpp
- @@ -645,6 +645,12 @@ class spell_warl_haunt : public SpellScriptLoader
- void HandleAfterHit()
- {
- + if (Unit* target = GetExplTargetUnit())
- + {
- + if (!target->IsAlive())
- + GetCaster()->GetSpellHistory()->ResetCooldown(48181, true);
- + }
- +
- if (Aura* aura = GetHitAura())
- if (AuraEffect* aurEff = aura->GetEffect(EFFECT_1))
- aurEff->SetAmount(CalculatePct(aurEff->GetAmount(), GetHitDamage()));
- @@ -660,25 +666,21 @@ class spell_warl_haunt : public SpellScriptLoader
- {
- PrepareAuraScript(spell_warl_haunt_AuraScript);
- - bool Validate(SpellInfo const* /*spellInfo*/) override
- - {
- - if (!sSpellMgr->GetSpellInfo(SPELL_WARLOCK_HAUNT_HEAL))
- - return false;
- - return true;
- - }
- -
- void HandleRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
- {
- if (Unit* caster = GetCaster())
- {
- - int32 amount = aurEff->GetAmount();
- - GetTarget()->CastCustomSpell(caster, SPELL_WARLOCK_HAUNT_HEAL, &amount, NULL, NULL, true, NULL, aurEff, GetCasterGUID());
- + if (Unit* target = GetTarget())
- + {
- + if (!target->IsAlive())
- + caster->GetSpellHistory()->ResetCooldown(48181, true);
- + }
- }
- }
- void Register() override
- {
- - OnEffectRemove += AuraEffectApplyFn(spell_warl_haunt_AuraScript::HandleRemove, EFFECT_1, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
- + OnEffectRemove += AuraEffectApplyFn(spell_warl_haunt_AuraScript::HandleRemove, EFFECT_1, SPELL_AURA_MOD_SCHOOL_MASK_DAMAGE_FROM_CASTER, AURA_EFFECT_HANDLE_REAL);
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement