Core/Chat: Explicitly ignore disabling chat feature

Port From (https://github.com/TrinityCore/TrinityCore/commit/42c44bd787458a8a0c7a12bbab874388537d61ed)
This commit is contained in:
hondacrx
2024-02-03 10:52:16 -05:00
parent 4b669cfb5d
commit 4c92f0c26d
2 changed files with 40 additions and 1 deletions
+12
View File
@@ -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);
}
}
}
+28 -1
View File
@@ -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)