[9212] Implement pet speed synchronization with owner only for follow mode.

* This allow pet use own speed (and all speed affects appiedto pet itself) in combat.
* Apply this speed synhronization to minipets/guardians also.
* Also rename Unit::SetSpeed to SetSpeedRate as more close to real functionality.
This commit is contained in:
VladimirMangos 2010-01-19 03:49:09 +03:00
parent a6a5935406
commit eaecc467d5
8 changed files with 73 additions and 22 deletions

View file

@ -263,9 +263,9 @@ bool Creature::InitEntry(uint32 Entry, uint32 team, const CreatureData *data )
SetFloatValue(UNIT_MOD_CAST_SPEED, 1.0f);
SetSpeed(MOVE_WALK, cinfo->speed );
SetSpeed(MOVE_RUN, cinfo->speed );
SetSpeed(MOVE_SWIM, cinfo->speed );
SetSpeedRate(MOVE_WALK, cinfo->speed );
SetSpeedRate(MOVE_RUN, cinfo->speed );
SetSpeedRate(MOVE_SWIM, cinfo->speed );
SetFloatValue(OBJECT_FIELD_SCALE_X, cinfo->scale);