aboutsummaryrefslogtreecommitdiff
path: root/src/game/Spell.cpp
diff options
context:
space:
mode:
authorBlaymoira <none@none>2008-12-27 22:47:19 +0100
committerBlaymoira <none@none>2008-12-27 22:47:19 +0100
commit46bc9c343e04bf42ce7ae6073f862f30cdd7c02d (patch)
tree33b82f4c3086371cb4d8f798e5d8c861f5e4d753 /src/game/Spell.cpp
parent27f770a40a72cb1d4e269a142e854e921c88e2bc (diff)
parentf3d0021ce882a5fb3977bef53f3659823ac6f083 (diff)
*Merge
--HG-- branch : trunk
Diffstat (limited to 'src/game/Spell.cpp')
-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