Skip to content

Commit

Permalink
Core/Spells: Check SPELL_AURA_PREVENT_RESSURECTION on targets for res…
Browse files Browse the repository at this point in the history
…urrection spells
  • Loading branch information
Shauren committed Aug 21, 2011
1 parent d5fbd22 commit cb9985c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/server/game/Spells/SpellInfo.cpp
Expand Up @@ -1515,7 +1515,7 @@ SpellCastResult SpellInfo::CheckTarget(Unit const* caster, Unit const* target, b

if (!(AttributesEx6 & SPELL_ATTR6_CAN_TARGET_UNTARGETABLE) && target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE))
return SPELL_FAILED_BAD_TARGETS;

//if (!(AttributesEx6 & SPELL_ATTR6_CAN_TARGET_POSSESSED_FRIENDS)

if (!CheckTargetCreatureType(target))
Expand Down Expand Up @@ -1592,6 +1592,11 @@ SpellCastResult SpellInfo::CheckTarget(Unit const* caster, Unit const* target, b
}
}
}

if (target->HasAuraType(SPELL_AURA_PREVENT_RESSURECTION))
if (HasEffect(SPELL_EFFECT_SELF_RESURRECT) || HasEffect(SPELL_EFFECT_RESURRECT) || HasEffect(SPELL_EFFECT_RESURRECT_NEW))
return SPELL_FAILED_TARGET_CANNOT_BE_RESURRECTED;

return SPELL_CAST_OK;
}

Expand Down

2 comments on commit cb9985c

@Havenard
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are currently only two spells in the game with SPELL_AURA_PREVENT_RESURRECTION, one is a test spell not used anywhere and the other is supposed to prevent only self-resurrection. This patch need adjusts.

@Shauren
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i dont think so. looking at sniff of the lich king fight, this aura is explicitly removed before terenas casts mass resurrection

Please sign in to comment.