Core/Chat: Explicitly ignore disabling chat feature
Port From (https://github.com/TrinityCore/TrinityCore/commit/42c44bd787458a8a0c7a12bbab874388537d61ed)
This commit is contained in:
@@ -649,5 +649,17 @@ namespace Game
|
|||||||
canLocalWhisperTargetResponse.Status = status;
|
canLocalWhisperTargetResponse.Status = status;
|
||||||
SendPacket(canLocalWhisperTargetResponse);
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -498,6 +498,33 @@ namespace Game.Networking.Packets
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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 class ChatAddonMessageParams
|
||||||
{
|
{
|
||||||
public void Read(WorldPacket data)
|
public void Read(WorldPacket data)
|
||||||
|
|||||||
Reference in New Issue
Block a user