aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/Spell.cpp8
1 files changed, 8 insertions, 0 deletions
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