aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQAston <none@none>2009-08-06 23:41:08 +0200
committerQAston <none@none>2009-08-06 23:41:08 +0200
commitb35e7ac28d4a48e1a8acf3dfc78c2e6ce031eb51 (patch)
tree7c57209b550df7853cee3b6ea98530d37f97f479
parentbefbae3a61c50252c1b56466dc23aa166167fc6b (diff)
*Correctly show npc root aura expire in client - by thenecromancer.
--HG-- branch : trunk
-rw-r--r--src/game/Unit.cpp25
1 files changed, 10 insertions, 15 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 918eb0fbbdc..5acaa58d8a3 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -14223,27 +14223,22 @@ void Unit::SetRooted(bool apply)
{
AddUnitMovementFlag(MOVEMENTFLAG_ROOT);
- if(GetTypeId() == TYPEID_PLAYER)
- {
- WorldPacket data(SMSG_FORCE_MOVE_ROOT, 10);
- data.append(GetPackGUID());
- data << (uint32)2;
- SendMessageToSet(&data,true);
- }
- else
+ WorldPacket data(SMSG_FORCE_MOVE_ROOT, 10);
+ data.append(GetPackGUID());
+ data << (uint32)2;
+ SendMessageToSet(&data,true);
+
+ if(GetTypeId() != TYPEID_PLAYER)
((Creature *)this)->StopMoving();
}
else
{
if(!hasUnitState(UNIT_STAT_STUNNED)) // prevent allow move if have also stun effect
{
- if(GetTypeId() == TYPEID_PLAYER)
- {
- WorldPacket data(SMSG_FORCE_MOVE_UNROOT, 10);
- data.append(GetPackGUID());
- data << (uint32)2;
- SendMessageToSet(&data,true);
- }
+ WorldPacket data(SMSG_FORCE_MOVE_UNROOT, 10);
+ data.append(GetPackGUID());
+ data << (uint32)2;
+ SendMessageToSet(&data,true);
RemoveUnitMovementFlag(MOVEMENTFLAG_ROOT);
}