*Allow creature to cast on self when enterevademode. This fixes the bug that adding castspell in reset function does not work.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-08-21 23:34:41 -05:00
parent a36fdb26aa
commit 0ee9bffd5a
+1 -1
View File
@@ -2835,7 +2835,7 @@ SpellMissInfo Unit::MagicSpellHitResult(Unit *pVictim, SpellEntry const *spell)
SpellMissInfo Unit::SpellHitResult(Unit *pVictim, SpellEntry const *spell, bool CanReflect) SpellMissInfo Unit::SpellHitResult(Unit *pVictim, SpellEntry const *spell, bool CanReflect)
{ {
// Return evade for units in evade mode // Return evade for units in evade mode
if (pVictim->GetTypeId()==TYPEID_UNIT && ((Creature*)pVictim)->IsInEvadeMode()) if (pVictim->GetTypeId()==TYPEID_UNIT && ((Creature*)pVictim)->IsInEvadeMode() && this != pVictim)
return SPELL_MISS_EVADE; return SPELL_MISS_EVADE;
// Check for immune // Check for immune