mirror of
https://github.com/azerothcore/azerothcore-wotlk.git
synced 2025-11-10 12:24:22 +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 */)
|
||||
{
|
||||
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;
|
||||
BuildHeartBeatMsg(&data);
|
||||
SendMessageToSet(&data, self);
|
||||
|
||||
@ -205,9 +205,7 @@ struct boss_volkhan : public BossAI
|
||||
me->SetOrientation(2.19f);
|
||||
|
||||
// and client
|
||||
WorldPacket data;
|
||||
me->BuildHeartBeatMsg(&data);
|
||||
me->SendMessageToSet(&data, false);
|
||||
me->SendMovementFlagUpdate(false);
|
||||
me->SetControlled(true, UNIT_STATE_ROOT);
|
||||
}
|
||||
else
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user