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:
@@ -0,0 +1,4 @@
|
|||||||
|
--
|
||||||
|
DELETE FROM `spell_script_names` WHERE `spell_id`=29341;
|
||||||
|
INSERT INTO `spell_script_names` VALUES
|
||||||
|
(29341,'spell_warl_shadowburn');
|
||||||
@@ -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()
|
void AddSC_warlock_spell_scripts()
|
||||||
{
|
{
|
||||||
RegisterSpellScript(spell_warl_eye_of_kilrogg);
|
RegisterSpellScript(spell_warl_eye_of_kilrogg);
|
||||||
@@ -1238,4 +1259,5 @@ void AddSC_warlock_spell_scripts()
|
|||||||
RegisterSpellScript(spell_warl_soulshatter);
|
RegisterSpellScript(spell_warl_soulshatter);
|
||||||
RegisterSpellScript(spell_warl_unstable_affliction);
|
RegisterSpellScript(spell_warl_unstable_affliction);
|
||||||
RegisterSpellScript(spell_warl_drain_soul);
|
RegisterSpellScript(spell_warl_drain_soul);
|
||||||
|
RegisterSpellScript(spell_warl_shadowburn);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user