diff options
| author | xjose93 <xjose93@hotmail.com> | 2015-02-25 23:41:38 +0100 |
|---|---|---|
| committer | xjose93 <xjose93@hotmail.com> | 2015-06-14 13:45:29 +0200 |
| commit | 6f2b0860481390043a89702be4b1540f5c472dee (patch) | |
| tree | 4c4addc2258116c5fdb8d27cfa840f627a25ce1c /src | |
| parent | 37298bbc2f71a928c89e9e7f3b982b6afd8cdc0f (diff) | |
Core/Unit: Fix snare/daze immunities versus SPELL_AURA_USE_NORMAL_MOVEMENT_SPEED.
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index fdd91368704..be383922cb1 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -12307,6 +12307,13 @@ void Unit::UpdateSpeed(UnitMoveType mtype, bool forced) /// @todo possible affect only on MOVE_RUN if (int32 normalization = GetMaxPositiveAuraModifier(SPELL_AURA_USE_NORMAL_MOVEMENT_SPEED)) { + if (Creature* creature = ToCreature()) + { + uint32 immuneMask = creature->GetCreatureTemplate()->MechanicImmuneMask; + if (immuneMask & (1 << MECHANIC_SNARE) || immuneMask & (1 << MECHANIC_DAZE)) + break; + } + // Use speed from aura float max_speed = normalization / (IsControlledByPlayer() ? playerBaseMoveSpeed[mtype] : baseMoveSpeed[mtype]); if (speed > max_speed) |
