From 9b0c73760559a2c98ce1fd6883e6d59493eacc39 Mon Sep 17 00:00:00 2001 From: Olion Date: Wed, 23 Sep 2015 22:31:28 +0300 Subject: [PATCH] [Pets] Allow pet motion speed change like other mobs --- src/game/Object/Unit.cpp | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/game/Object/Unit.cpp b/src/game/Object/Unit.cpp index aaf0f2d6..1f025c49 100644 --- a/src/game/Object/Unit.cpp +++ b/src/game/Object/Unit.cpp @@ -6889,23 +6889,23 @@ bool Unit::CanDetectInvisibilityOf(Unit const* u) const void Unit::UpdateSpeed(UnitMoveType mtype, bool forced, float ratio) { // not in combat pet have same speed as owner - switch (mtype) - { - case MOVE_RUN: - case MOVE_WALK: - case MOVE_SWIM: - if (GetTypeId() == TYPEID_UNIT && ((Creature*)this)->IsPet() && hasUnitState(UNIT_STAT_FOLLOW)) - { - if (Unit* owner = GetOwner()) - { - SetSpeedRate(mtype, owner->GetSpeedRate(mtype), forced); - return; - } - } - break; - default: - break; - } + //switch (mtype) + //{ + // case MOVE_RUN: + // case MOVE_WALK: + // case MOVE_SWIM: + // if (GetTypeId() == TYPEID_UNIT && ((Creature*)this)->IsPet() && hasUnitState(UNIT_STAT_FOLLOW)) + // { + // if (Unit* owner = GetOwner()) + // { + // SetSpeedRate(mtype, owner->GetSpeedRate(mtype), forced); + // return; + // } + // } + // break; + // default: + // break; + //} int32 main_speed_mod = 0; float stack_bonus = 1.0f;