[10977] Add ghost speed rate in config: Death.Ghost.RunSpeed.

Also clarify context for remove ghost auras place after set alive state.
This let get more expected results at remove ghost speed aura.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
Pat S 2011-01-07 05:28:27 +03:00 committed by VladimirMangos
parent 7aab4eecdf
commit af50b352b2
6 changed files with 17 additions and 3 deletions

View file

@ -8267,6 +8267,12 @@ void Unit::UpdateSpeed(UnitMoveType mtype, bool forced, float ratio)
if (((Creature*)this)->HasSearchedAssistance())
speed *= 0.66f; // best guessed value, so this will be 33% reduction. Based off initial speed, mob can then "run", "walk fast" or "walk".
}
// for player case, we look for some custom rates
else
{
if (getDeathState() == CORPSE)
speed *= sWorld.getConfig(CONFIG_FLOAT_GHOST_RUN_SPEED);
}
// Apply strongest slow aura mod to speed
int32 slow = GetMaxNegativeAuraModifier(SPELL_AURA_MOD_DECREASE_SPEED);