mirror of
https://github.com/azerothcore/azerothcore-wotlk.git
synced 2025-11-10 20:34:53 +08:00
fix(Core/Unit): Fix root/stun client freeze (#23521)
This commit is contained in:
parent
3ecd52113c
commit
92c7ba73bf
@ -16709,6 +16709,13 @@ void Unit::StopMovingOnCurrentPos()
|
|||||||
|
|
||||||
void Unit::SendMovementFlagUpdate(bool self /* = false */)
|
void Unit::SendMovementFlagUpdate(bool self /* = false */)
|
||||||
{
|
{
|
||||||
|
if (IsRooted())
|
||||||
|
{
|
||||||
|
// each case where this occurs has to be examined and reported and dealt with.
|
||||||
|
LOG_ERROR("Unit", "Attempted sending heartbeat with root flag for guid {}", GetGUID().ToString());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
WorldPacket data;
|
WorldPacket data;
|
||||||
BuildHeartBeatMsg(&data);
|
BuildHeartBeatMsg(&data);
|
||||||
SendMessageToSet(&data, self);
|
SendMessageToSet(&data, self);
|
||||||
|
|||||||
@ -205,9 +205,7 @@ struct boss_volkhan : public BossAI
|
|||||||
me->SetOrientation(2.19f);
|
me->SetOrientation(2.19f);
|
||||||
|
|
||||||
// and client
|
// and client
|
||||||
WorldPacket data;
|
me->SendMovementFlagUpdate(false);
|
||||||
me->BuildHeartBeatMsg(&data);
|
|
||||||
me->SendMessageToSet(&data, false);
|
|
||||||
me->SetControlled(true, UNIT_STATE_ROOT);
|
me->SetControlled(true, UNIT_STATE_ROOT);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user