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).

This commit is contained in:
treeston
2017-06-06 19:24:14 +02:00
parent 17096ff08a
commit b983ec11bd

View File

@@ -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;