aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2009-08-21 23:34:41 -0500
committermegamage <none@none>2009-08-21 23:34:41 -0500
commit0ee9bffd5a28933599addd146536e713a108cbba (patch)
treeb164d3d0274caebc1adf8c862b4a3bc60a438bcb /src
parenta36fdb26aa57ea071f86569ce2f12317d903eb1a (diff)
*Allow creature to cast on self when enterevademode. This fixes the bug that adding castspell in reset function does not work.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/Unit.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index b0c8262df0c..f40eefe550b 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