[8934] Implement aura PELL_AURA_MOD_MINIMUM_SPEED (305) and it used for FORM_GHOSTWOLF.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
darkstalker 2009-12-06 23:05:25 +03:00 committed by VladimirMangos
parent 014f92870d
commit 486c628ce2
5 changed files with 14 additions and 3 deletions

View file

@ -10364,7 +10364,12 @@ void Unit::UpdateSpeed(UnitMoveType mtype, bool forced)
// Apply strongest slow aura mod to speed
int32 slow = GetMaxNegativeAuraModifier(SPELL_AURA_MOD_DECREASE_SPEED);
if (slow)
{
speed *=(100.0f + slow)/100.0f;
float min_speed = (float)GetMaxPositiveAuraModifier(SPELL_AURA_MOD_MINIMUM_SPEED) / 100.0f;
if (speed < min_speed)
speed = min_speed;
}
SetSpeed(mtype, speed, forced);
}