mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 18:40:28 +00:00
fix(Scripts/Spells): Shadowburn should give Sould Shard only if targe… (#12030)
...t yields experience/honor to the player. Fixes #12021
This commit is contained in:
@@ -1208,6 +1208,27 @@ class spell_warl_drain_soul : public AuraScript
|
||||
}
|
||||
};
|
||||
|
||||
// 29341 - Shadowburn
|
||||
class spell_warl_shadowburn : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_warl_shadowburn);
|
||||
|
||||
void RemoveEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
Unit* target = GetTarget();
|
||||
if (!(GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_DEATH && caster && target && caster->IsPlayer() && caster->ToPlayer()->isHonorOrXPTarget(target)))
|
||||
{
|
||||
PreventDefaultAction();
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectRemove += AuraEffectRemoveFn(spell_warl_shadowburn::RemoveEffect, EFFECT_0, SPELL_AURA_CHANNEL_DEATH_ITEM, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_warlock_spell_scripts()
|
||||
{
|
||||
RegisterSpellScript(spell_warl_eye_of_kilrogg);
|
||||
@@ -1238,4 +1259,5 @@ void AddSC_warlock_spell_scripts()
|
||||
RegisterSpellScript(spell_warl_soulshatter);
|
||||
RegisterSpellScript(spell_warl_unstable_affliction);
|
||||
RegisterSpellScript(spell_warl_drain_soul);
|
||||
RegisterSpellScript(spell_warl_shadowburn);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user