Core/Entities: don't allow client control if player is still affected by any lose of control state

Port From (https://github.com/TrinityCore/TrinityCore/commit/29bfa32fc39de1d93fbdb272d48689174c547725)
This commit is contained in:
hondacrx
2021-06-23 14:13:31 -04:00
parent 87cc42ee48
commit 0c527d206c
4 changed files with 34 additions and 22 deletions
+2 -1
View File
@@ -820,7 +820,8 @@ namespace Game.BattleGrounds
void BlockMovement(Player player)
{
player.SetClientControl(player, false); // movement disabled NOTE: the effect will be automatically removed by client when the player is teleported from the Battleground, so no need to send with byte(1) in RemovePlayerAtLeave()
// movement disabled NOTE: the effect will be automatically removed by client when the player is teleported from the battleground, so no need to send with uint8(1) in RemovePlayerAtLeave()
player.SetClientControl(player, false);
}
public virtual void RemovePlayerAtLeave(ObjectGuid guid, bool Transport, bool SendPacket)