Core/Entities: unit states cleanup
Port From (https://github.com/TrinityCore/TrinityCore/commit/70c26d53cb94f0e78a57ecc2279c960370891aa4)
This commit is contained in:
@@ -7231,6 +7231,10 @@ namespace Game.Entities
|
||||
|
||||
public void SetClientControl(Unit target, bool allowMove)
|
||||
{
|
||||
// still affected by some aura that shouldn't allow control, only allow on last such aura to be removed
|
||||
if (allowMove && target.HasUnitState(UnitState.CantClientControl))
|
||||
return;
|
||||
|
||||
ControlUpdate packet = new();
|
||||
packet.Guid = target.GetGUID();
|
||||
packet.On = allowMove;
|
||||
@@ -7242,6 +7246,7 @@ namespace Game.Entities
|
||||
if (allowMove)
|
||||
SetMover(target);
|
||||
}
|
||||
|
||||
public void SetMover(Unit target)
|
||||
{
|
||||
m_unitMovedByMe.m_playerMovingMe = null;
|
||||
|
||||
Reference in New Issue
Block a user