*Fix the bug that spirit of redemption can be killed.

--HG--
branch : trunk
This commit is contained in:
megamage
2008-12-27 15:28:30 -06:00
parent 536879150d
commit f3d0021ce8
+8
View File
@@ -1111,6 +1111,14 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask)
if( m_caster != unit )
{
if (unit->GetCharmerOrOwnerGUID() != m_caster->GetGUID())
{
if (unit->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
{
m_caster->SendSpellMiss(unit, m_spellInfo->Id, SPELL_MISS_EVADE);
return;
}
}
if( !m_caster->IsFriendlyTo(unit) )
{
// for delayed spells ignore not visible explicit target