Core/Spells: use a better check for Desecration

This commit is contained in:
Ovahlord committed 2019-02-14 14:02:12 +01:00
1 parent 27fb9ad8dd
commit abfd9aba68
1 file changed
+5 -1
+5 -1
View File
@@ -1715,8 +1715,12 @@ class spell_dk_desecration : public AuraScript
bool CheckProc(ProcEventInfo& eventInfo)
{
SpellInfo const* triggerSpell = sSpellMgr->GetSpellInfo(GetSpellInfo()->Effects[EFFECT_0].TriggerSpell);
if (!triggerSpell)
return false;
if (Unit* target = eventInfo.GetActionTarget())
return (target->GetMechanicImmunityMask() & MECHANIC_SNARE) == 0;
return !target->IsImmunedToSpell(triggerSpell, GetTarget());
return false;
}