*Correctl update speed rate of creatures - original patch by smellbee.
--HG-- branch : trunk
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user