aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortreeston <treeston.mmoc@gmail.com>2017-06-06 19:24:14 +0200
committertreeston <treeston.mmoc@gmail.com>2017-06-06 19:24:14 +0200
commitb983ec11bd6e6f0fa80c739ddca2152759fb587e (patch)
tree8f31b8ed3049947b8c83bdca878dc327c7beaf2f /src
parent17096ff08a3d5213404fb7f2bc911617f4745dd4 (diff)
Re-check target evade state on projectile impact and adjust accordingly. This fixes the incorrect message ("Absorb" instead of "Evade"), and also removes the root cause of the original evade follow bug (that was prevented in 1945874).
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Spells/Spell.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 585f789ec24..83d19be8472 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -2482,6 +2482,11 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit* unit, uint32 effectMask, bool scaleA
if (!unit || !effectMask)
return SPELL_MISS_EVADE;
+ // Target may have begun evading between launch and hit phases - re-check now
+ if (Creature* creatureTarget = unit->ToCreature())
+ if (creatureTarget->IsEvadingAttacks())
+ return SPELL_MISS_EVADE;
+
// For delayed spells immunity may be applied between missile launch and hit - check immunity for that case
if (m_spellInfo->Speed && unit->IsImmunedToSpell(m_spellInfo, m_caster))
return SPELL_MISS_IMMUNE;