From 0ee9bffd5a28933599addd146536e713a108cbba Mon Sep 17 00:00:00 2001 From: megamage Date: Fri, 21 Aug 2009 23:34:41 -0500 Subject: [PATCH] *Allow creature to cast on self when enterevademode. This fixes the bug that adding castspell in reset function does not work. --HG-- branch : trunk --- src/game/Unit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index b0c8262df0..f40eefe550 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -2835,7 +2835,7 @@ SpellMissInfo Unit::MagicSpellHitResult(Unit *pVictim, SpellEntry const *spell) SpellMissInfo Unit::SpellHitResult(Unit *pVictim, SpellEntry const *spell, bool CanReflect) { // 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; // Check for immune