Merge pull request #14250 from xjose93/SPELL_AURA_USE_NORMAL_MOVEMENT_SPEED
Core/Unit: Fix snare/daze immunities versus SPELL_AURA_USE_NORMAL_MOVEMENT_SPEED Fix SPELL_AURA_USE_NORMAL_MOVEMENT_SPEED modifying speeds of bosses that are immune to changes of speeds. (cherry picked from commit 81cec13a586c1d7e84d0936b4a385934f5f91ef1)
This commit is contained in:
@@ -10403,6 +10403,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)
|
||||
|
||||
Reference in New Issue
Block a user