*Correctly show npc root aura expire in client - by thenecromancer.

--HG--
branch : trunk
This commit is contained in:
QAston
2009-08-06 23:41:08 +02:00
parent befbae3a61
commit b35e7ac28d
+10 -15
View File
@@ -14223,27 +14223,22 @@ void Unit::SetRooted(bool apply)
{ {
AddUnitMovementFlag(MOVEMENTFLAG_ROOT); AddUnitMovementFlag(MOVEMENTFLAG_ROOT);
if(GetTypeId() == TYPEID_PLAYER) WorldPacket data(SMSG_FORCE_MOVE_ROOT, 10);
{ data.append(GetPackGUID());
WorldPacket data(SMSG_FORCE_MOVE_ROOT, 10); data << (uint32)2;
data.append(GetPackGUID()); SendMessageToSet(&data,true);
data << (uint32)2;
SendMessageToSet(&data,true); if(GetTypeId() != TYPEID_PLAYER)
}
else
((Creature *)this)->StopMoving(); ((Creature *)this)->StopMoving();
} }
else else
{ {
if(!hasUnitState(UNIT_STAT_STUNNED)) // prevent allow move if have also stun effect 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());
WorldPacket data(SMSG_FORCE_MOVE_UNROOT, 10); data << (uint32)2;
data.append(GetPackGUID()); SendMessageToSet(&data,true);
data << (uint32)2;
SendMessageToSet(&data,true);
}
RemoveUnitMovementFlag(MOVEMENTFLAG_ROOT); RemoveUnitMovementFlag(MOVEMENTFLAG_ROOT);
} }