fix(Core/Unit): Fix root/stun client freeze (#23521)

This commit is contained in:
killerwife 2025-11-03 07:01:09 +01:00 committed by GitHub
parent 3ecd52113c
commit 92c7ba73bf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 3 deletions

View File

@ -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);

View File

@ -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