From f3d0021ce882a5fb3977bef53f3659823ac6f083 Mon Sep 17 00:00:00 2001 From: megamage Date: Sat, 27 Dec 2008 15:28:30 -0600 Subject: *Fix the bug that spirit of redemption can be killed. --HG-- branch : trunk --- src/game/Spell.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 7aeb0159e9d..15259bf1af0 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -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 -- cgit v1.2.3