[10819] Fixed creature's speed recalculation, forgotten DB speed mods are used now

Also properly update speeds at creature entry change(in case there are aura speed bonuses), thanks to Vladimir for pointing
This commit is contained in:
SilverIce 2010-12-03 04:11:52 +02:00
parent 49881d4215
commit d560503a03
3 changed files with 20 additions and 5 deletions

View file

@ -283,10 +283,9 @@ bool Creature::InitEntry(uint32 Entry, const CreatureData *data )
SetFloatValue(UNIT_MOD_CAST_SPEED, 1.0f);
SetSpeedRate(MOVE_WALK, cinfo->speed_walk);
SetSpeedRate(MOVE_RUN, cinfo->speed_run);
SetSpeedRate(MOVE_SWIM, 1.0f); // using 1.0 rate
SetSpeedRate(MOVE_FLIGHT, 1.0f); // using 1.0 rate
// update speed for the new CreatureInfo base speed mods
UpdateSpeed(MOVE_WALK, false);
UpdateSpeed(MOVE_RUN, false);
// checked at loading
m_defaultMovementType = MovementGeneratorType(cinfo->MovementType);