Merge pull request #79 from Chuck5ta/develop21
(from cab's repo) Improved UpdateSpeed
This commit is contained in:
commit
8fba755e70
@ -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