diff options
| author | QAston <none@none> | 2009-07-05 19:21:55 +0200 |
|---|---|---|
| committer | QAston <none@none> | 2009-07-05 19:21:55 +0200 |
| commit | 402a6354e0c004064de6ab524d3b2ae36e9732cb (patch) | |
| tree | d939ea2be809333eae7f642b36b189b61f8db0c2 /src | |
| parent | ea7ac26e72c0a5aefef651a14852de2bfe6342df (diff) | |
*Correctl update speed rate of creatures - original patch by smellbee.
--HG--
branch : trunk
Diffstat (limited to 'src')
| -rw-r--r-- | src/game/Unit.cpp | 5 |
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)) |
