(from cab's repo) Improved UpdateSpeed
Improved UpdateSpeed Author: probably Olion, but not certain.
This commit is contained in:
parent
1d6407caec
commit
46f0d69e1a
@ -2074,8 +2074,17 @@ void Pet::UpdateSpeed(UnitMoveType mtype, bool forced, float ratio)
|
||||
break;
|
||||
case MOVE_RUN:
|
||||
{
|
||||
main_speed_mod = GetMaxPositiveAuraModifier(SPELL_AURA_MOD_INCREASE_SPEED);
|
||||
stack_bonus = GetTotalAuraMultiplier(SPELL_AURA_MOD_SPEED_ALWAYS);
|
||||
if (!m_attacking && owner->HasAura(19596)) // Bestial Swiftness: prevent while following
|
||||
{
|
||||
AuraList const& auras = GetAurasByType(SPELL_AURA_MOD_INCREASE_SPEED);
|
||||
for (AuraList::const_iterator it = auras.begin(); it != auras.end(); ++it)
|
||||
if ((*it)->GetId() != 19582) // exclude the aura influenced by Bestial Swiftness
|
||||
main_speed_mod = std::max((*it)->GetBasePoints(), main_speed_mod);
|
||||
}
|
||||
else
|
||||
main_speed_mod = GetMaxPositiveAuraModifier(SPELL_AURA_MOD_INCREASE_SPEED);
|
||||
|
||||
stack_bonus = GetTotalAuraMultiplier(SPELL_AURA_MOD_SPEED_ALWAYS);
|
||||
non_stack_bonus = (100.0f + GetMaxPositiveAuraModifier(SPELL_AURA_MOD_SPEED_NOT_STACK)) / 100.0f;
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user