diff --git a/Source/Game/Handlers/ChatHandler.cs b/Source/Game/Handlers/ChatHandler.cs index 459409abf..06b53ce70 100644 --- a/Source/Game/Handlers/ChatHandler.cs +++ b/Source/Game/Handlers/ChatHandler.cs @@ -649,5 +649,17 @@ namespace Game canLocalWhisperTargetResponse.Status = status; SendPacket(canLocalWhisperTargetResponse); } + + [WorldPacketHandler(ClientOpcodes.UpdateAadcStatus, Processing = PacketProcessing.Inplace)] + void HandleChatUpdateAADCStatus(UpdateAADCStatus updateAADCStatus) + { + // disabling chat not supported + // send Sueccess and force chat disabled to false instead of sending that change failed + // this makes client change the cvar back to false instead of just printing error message in console + UpdateAADCStatusResponse response = new(); + response.Success = true; + response.ChatDisabled = false; + SendPacket(response); + } } } diff --git a/Source/Game/Networking/Packets/ChatPackets.cs b/Source/Game/Networking/Packets/ChatPackets.cs index 7ece0e1f3..2e675a1b2 100644 --- a/Source/Game/Networking/Packets/ChatPackets.cs +++ b/Source/Game/Networking/Packets/ChatPackets.cs @@ -497,7 +497,34 @@ namespace Game.Networking.Packets _worldPacket.WriteInt32((int)Status); } } - + + class UpdateAADCStatus : ClientPacket + { + public bool ChatDisabled; + + public UpdateAADCStatus(WorldPacket packet) : base(packet) { } + + public override void Read() + { + ChatDisabled = _worldPacket.HasBit(); + } + } + + class UpdateAADCStatusResponse : ServerPacket + { + public bool Success; + public bool ChatDisabled; + + public UpdateAADCStatusResponse() : base(ServerOpcodes.UpdateAadcStatusResponse) { } + + public override void Write() + { + _worldPacket.WriteBit(Success); + _worldPacket.WriteBit(ChatDisabled); + _worldPacket.FlushBits(); + } + } + public class ChatAddonMessageParams { public void Read(WorldPacket data)