diff options
author | Shauren <shauren.trinity@gmail.com> | 2013-06-23 20:15:02 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2013-06-23 20:15:02 +0200 |
commit | ab601de6af21cb10b34a472076ea427440241b5b (patch) | |
tree | 59ec2d27f7a609af28aefce517326d51f431da17 /src | |
parent | 9d9a92a56db2b22f61e54fdb33eb1f0954f218ab (diff) |
Core/PacketIO: Send proper SPLINE_ROOT packets for stunned creatures
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 8fa176923f2..923030bde00 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -14428,19 +14428,13 @@ void Unit::SetStunned(bool apply) SetTarget(0); SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED); - // MOVEMENTFLAG_ROOT cannot be used in conjunction with MOVEMENTFLAG_MASK_MOVING (tested 3.3.5a) - // this will freeze clients. That's why we remove MOVEMENTFLAG_MASK_MOVING before - // setting MOVEMENTFLAG_ROOT - RemoveUnitMovementFlag(MOVEMENTFLAG_MASK_MOVING); - AddUnitMovementFlag(MOVEMENTFLAG_ROOT); - // Creature specific if (GetTypeId() != TYPEID_PLAYER) ToCreature()->StopMoving(); else SetStandState(UNIT_STAND_STATE_STAND); - SendMoveRoot(0); + SetRooted(true); CastStop(); } @@ -14455,10 +14449,7 @@ void Unit::SetStunned(bool apply) RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED); if (!HasUnitState(UNIT_STATE_ROOT)) // prevent moving if it also has root effect - { - SendMoveUnroot(0); - RemoveUnitMovementFlag(MOVEMENTFLAG_ROOT); - } + SetRooted(false); } } |