aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQAston <qaston@gmail.com>2011-08-20 11:45:23 +0200
committerQAston <qaston@gmail.com>2011-08-20 11:45:23 +0200
commit919a8ecf0e383a8cebda895a6da9307fa5058415 (patch)
treea75910e18b016e66944756f95ef7ee4faf28e501
parent511db662978dbd267f964e987a08737e57750e5d (diff)
Core/Spells: Allow to explicitly target crowd controlled targets for spells with SPELL_ATTR6_CANT_TARGET_CROWD_CONTROLLED (Shield of Righteousness for example).
-rw-r--r--src/server/game/Spells/SpellInfo.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index b4719dfa59b..eebf93597f5 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -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