Core/Spells: Effect sanctuary should stop attackers without threatlist too

Closes issue 1943

--HG--
branch : trunk
This commit is contained in:
linencloth
2010-11-13 20:23:05 +01:00
parent 80694546a3
commit bb9336ca27

View File

@@ -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