Core/Spells: Allow to explicitly target crowd controlled targets for spells with SPELL_ATTR6_CANT_TARGET_CROWD_CONTROLLED (Shield of Righteousness for example).

This commit is contained in:
QAston
2011-08-20 11:45:23 +02:00
parent 511db66297
commit 919a8ecf0e

View File

@@ -1504,7 +1504,8 @@ SpellCastResult SpellInfo::CheckTarget(Unit const* caster, Unit const* target, b
if (AttributesEx3 & SPELL_ATTR3_ONLY_TARGET_GHOSTS && !(!target->isAlive() && target->HasAuraType(SPELL_AURA_GHOST)))
return SPELL_FAILED_TARGET_NOT_GHOST;
if (AttributesEx6 & SPELL_ATTR6_CANT_TARGET_CROWD_CONTROLLED && !target->CanFreeMove())
// check this flag only for implicit targets (chain and area), allow to explicitly target units for spells like Shield of Righteousness
if (implicit && AttributesEx6 & SPELL_ATTR6_CANT_TARGET_CROWD_CONTROLLED && !target->CanFreeMove())
return SPELL_FAILED_BAD_TARGETS;
// check visibility - ignore stealth for implicit (area) targets