[Pets] The next Bestial Swiftness improvement
Looks like the only issue left: the pet returns to the master at normal "follow" speed after combat.
This commit is contained in:
parent
51828bdbba
commit
5982813b4e
@ -2073,11 +2073,11 @@ void Pet::UpdateSpeed(UnitMoveType mtype, bool forced, float ratio)
|
||||
case MOVE_WALK:
|
||||
break;
|
||||
case MOVE_RUN:
|
||||
if (hasUnitState(UNIT_STAT_FOLLOW) && HasSpell(19596)) // Bestial Swiftness: prevent while following
|
||||
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 aura influenced by Bestial Swiftness
|
||||
if ((*it)->GetId() != 19582) // exclude the aura influenced by Bestial Swiftness
|
||||
main_speed_mod = std::max((*it)->GetBasePoints(), main_speed_mod);
|
||||
}
|
||||
else
|
||||
|
@ -85,6 +85,7 @@ void PetAI::AttackStart(Unit* u)
|
||||
// thus with the following clear the original TMG gets invalidated and crash, doh
|
||||
// hope it doesn't start to leak memory without this :-/
|
||||
// i_pet->Clear();
|
||||
m_creature->UpdateSpeed(MOVE_RUN, false);
|
||||
HandleMovementOnAttackStart(u);
|
||||
inCombat = true;
|
||||
}
|
||||
@ -117,6 +118,7 @@ void PetAI::_stopAttack()
|
||||
if (owner && m_creature->GetCharmInfo() && m_creature->GetCharmInfo()->HasCommandState(COMMAND_FOLLOW))
|
||||
{
|
||||
m_creature->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
|
||||
m_creature->UpdateSpeed(MOVE_RUN, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user