aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlinencloth <none@none>2010-11-13 20:23:05 +0100
committerlinencloth <none@none>2010-11-13 20:23:05 +0100
commitbb9336ca27020d4e50a5f6da07d85327fd11b4c3 (patch)
treeecd82701af3e3a208d1db817893fca39dbc556cc
parent80694546a3f0de653769f07548fda7c3c16b4db2 (diff)
Core/Spells: Effect sanctuary should stop attackers without threatlist too
Closes issue 1943 --HG-- branch : trunk
-rwxr-xr-xsrc/server/game/Spells/SpellEffects.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 1d30b69588d..edde26eaea2 100755
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -5327,6 +5327,16 @@ void Spell::EffectSanctuary(SpellEffIndex /*effIndex*/)
return;
unitTarget->getHostileRefManager().UpdateVisibility();
+
+ Unit::AttackerSet const& attackers = unitTarget->getAttackers();
+ for (Unit::AttackerSet::const_iterator itr = attackers.begin(); itr != attackers.end();)
+ {
+ if (!(*itr)->canSeeOrDetect(unitTarget))
+ (*(itr++))->AttackStop();
+ else
+ ++itr;
+ }
+
unitTarget->m_lastSanctuaryTime = getMSTime();
// Vanish allows to remove all threat and cast regular stealth so other spells can be used