aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index fbd9698f494..10867f501c1 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -10898,6 +10898,7 @@ void Unit::UpdateSpeed(UnitMoveType mtype, bool forced)
}
float bonus = non_stack_bonus > stack_bonus ? non_stack_bonus : stack_bonus;
+
// now we ready for speed calculation
float speed = main_speed_mod ? bonus*(100.0f + main_speed_mod)/100.0f : bonus;
@@ -10907,6 +10908,10 @@ void Unit::UpdateSpeed(UnitMoveType mtype, bool forced)
case MOVE_SWIM:
case MOVE_FLIGHT:
{
+ // Set creature speed rate from CreatureInfo
+ if (GetTypeId() == TYPEID_UNIT)
+ speed *= ((Creature*)this)->GetCreatureInfo()->speed;
+
// Normalize speed by 191 aura SPELL_AURA_USE_NORMAL_MOVEMENT_SPEED if need
// TODO: possible affect only on MOVE_RUN
if(int32 normalization = GetMaxPositiveAuraModifier(SPELL_AURA_USE_NORMAL_MOVEMENT_SPEED))