fix(chat): CH3 review fixes — phantom UN-9, allegiance-broadcast echo, /a legacy fallback

Applies the Opus review of Campaign CH slice CH3 (614a1e05):

- B1: UN-9 was a phantom divergence — ACE's CharacterOptions1.cs:47
  OR-sum is 0x50C4A54A (its own comment confirms 1355064650), identical
  to acdream's literal. The wrong 0x50C48D4A existed only in the research
  doc. Row deleted, register §5 reverted to 4 rows, research doc corrected
  with dated notes.
- S1/S4: AllegianceBroadcast (0x02000000) is a server-echoing channel —
  ACE's GameActionChatChannel handler includes the sender in its real-name
  Allegiance.Members broadcast (retail's DoAllegianceBroadcast has no
  AddTextToScroll), so the client must skip its local optimistic echo, not
  keep it. ChatChannelInfo.Legacy.IsSelfEchoChannel() now returns true for
  it; RouteLegacyChannel's comment corrected; Turbine.IsSelfEchoChannel()'s
  backwards comment rewritten truthfully.
- S3: retail's /a stays on the legacy AllegianceBroadcast bitflag until
  StartupTurbineChatSystem successfully starts Turbine chat — "never
  started" (TurbineChatState.Enabled == false) now falls back to legacy in
  both LiveSessionCommandRouter.RouteChat and
  DirectGameRuntimeCommandAdapter.TrySendChannel, while "enabled but no
  allegiance room" still correctly refuses locally.
- S5: added a LiveSessionEventRouter test proving the Options.Replace ->
  OnCharacterOptionsChanged seeding order, and RuntimeSettingsTargets /
  GameWindowLiveSessionOwnershipTests tests proving the concrete
  ICommandBus.Publish wiring and the single LiveSessionCommandSurface
  construction site.
- S6: AP-181 rewritten to name both of retail's omitted pre-send checks
  (IsMessageSafe silent-drop, then IsMessageSpam) and stop misattributing
  either to RouteLegacyChannel, which has no such gates.
- N1-N7: CharacterOptionId moved below SocialActions so its doc comment
  re-attaches; TurbineChatMembershipGate reuses TurbineChatDisplayNames
  instead of a duplicate table; the gate-to-refusal-text mapping is now
  shared via TurbineChatMembershipGate.ResolveRefusalText instead of
  duplicated in both hosts; ChatSettings.Default now matches ACE's real
  CharacterOptions2.Default (Roleplay/Society start off); a doc-comment
  clarifies only the five Hear toggles are server-backed; the register's
  §3 header recounted 129 -> 128.

Suite: 11,964 passed / 4 skipped / 0 failed (baseline 11,957/4/0 + 7 new
tests). Campaign ledger CH3 review column updated to APPROVE-WITH-FIXES.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Erik 2026-08-09 20:24:29 +02:00
parent d3f1c21835
commit e07fba5731
21 changed files with 582 additions and 153 deletions

View file

@ -236,11 +236,19 @@ internal sealed class LiveSessionCommandRouter : ILiveSessionCommandRouting
/// (0xF7DE), mapped to the lighter <see cref="ChatChannelKindLite"/>
/// <see cref="TurbineChatMembershipGate"/> reads. Every OTHER channel
/// kind (Fellowship/Vassals/Patron/Monarch/CoVassals/AllegianceBroadcast)
/// is legacy-only (0x0147) — the two pipelines never overlap, so this
/// dispatch is exhaustive rather than "try Turbine, fall back to
/// legacy." That fallback was the bug (CH3 research doc §5.3): with no
/// allegiance, <c>/a</c> silently downgraded to the legacy
/// AllegianceBroadcast bitflag instead of retail's local refusal.
/// is legacy-only (0x0147) — those pipelines never overlap Turbine.
/// <see cref="ChatChannelKind.Allegiance"/> is the one exception, and
/// <see cref="RouteChat"/> special-cases it BEFORE this table is
/// consulted: S3 (CH3 Opus review, 2026-08-09) corrected the original
/// CH3 filing (research doc §5.3) — retail's <c>/a</c> is bound to the
/// LEGACY <c>AllegianceBroadcast</c> bitflag by default and is only
/// rebound to <c>DoTurbineChat_Allegiance</c> once
/// <c>StartupTurbineChatSystem</c> successfully starts Turbine chat
/// (research doc §4.3). So "Turbine never started" (<c>TurbineChat.
/// Enabled == false</c>) still falls back to legacy, while "Turbine is
/// up but this character has no allegiance room" (<c>Enabled == true</c>,
/// <c>AllegianceRoom == 0</c>) correctly keeps retail's local
/// "Turbine chat is not available." refusal at the membership gate.
/// </summary>
private static readonly Dictionary<ChatChannelKind, ChatChannelKindLite> TurbineChannelKinds = new()
{
@ -285,6 +293,18 @@ internal sealed class LiveSessionCommandRouter : ILiveSessionCommandRouting
return;
}
// S3 (CH3 Opus review, 2026-08-09): see the TurbineChannelKinds doc
// comment above — Turbine chat never having started (no 0x0295
// SetTurbineChatChannels received at all) still routes /a through
// the legacy AllegianceBroadcast bitflag, exactly like retail's
// default binding before StartupTurbineChatSystem runs.
if (command.Channel == ChatChannelKind.Allegiance
&& !bindings.TurbineChat.Enabled)
{
RouteLegacyChannel(bindings, ChatChannelKind.AllegianceBroadcast, command.Text);
return;
}
if (TurbineChannelKinds.TryGetValue(command.Channel, out ChatChannelKindLite liteKind))
{
RouteTurbineChat(bindings, liteKind, command.Text);
@ -312,21 +332,18 @@ internal sealed class LiveSessionCommandRouter : ILiveSessionCommandRouting
bindings.CharacterState.Options,
bindings.CharacterState.IsOlthoiPlayer);
switch (gate.Status)
// N3 (CH3 Opus review): the gate-result-to-refusal-text mapping is
// now shared with DirectGameRuntimeCommandAdapter.TrySendChannel via
// TurbineChatMembershipGate.ResolveRefusalText — this used to be an
// independent copy of the same switch.
if (gate.Status != TurbineChatGateStatus.Allowed)
{
case TurbineChatGateStatus.Unavailable:
bindings.Communication.AddText(
ClientTextRefusals.TurbineChatUnavailable,
RetailLogTextType.Default);
return;
case TurbineChatGateStatus.NotListening:
if (TurbineChatMembershipGate.ResolveRefusalText(gate) is
(string refusalText, RetailLogTextType refusalType))
{
(string? refusal, RetailLogTextType type) =
WeenieErrorMessages.Resolve(0x0551u, gate.DisplayName);
if (refusal is not null)
bindings.Communication.AddText(refusal, type);
return;
bindings.Communication.AddText(refusalText, refusalType);
}
return;
}
uint cookie = bindings.TurbineChat.NextContextId();
@ -366,10 +383,14 @@ internal sealed class LiveSessionCommandRouter : ILiveSessionCommandRouting
// Step 5: wire ChatChannelInfo.IsSelfEchoChannel() — ACE resends
// Fellow/Vassals/Patron/Monarch/CoVassals to the sender with an
// empty sender name, so a local optimistic echo double-prints.
// AllegianceBroadcast includes the sender in its real-name broadcast
// with no such server echo, so it keeps the local echo (research
// doc §3.7/§5.4).
// empty sender name, so a local optimistic echo double-prints. S1
// (CH3 Opus review, 2026-08-09) corrected AllegianceBroadcast into
// this SAME group: ACE's GameActionChatChannel handler iterates
// player.Allegiance.Members and the sender is one of them, so they
// get their own line back with their real name too — a different
// mechanism (no separate ""-sender resend) but the same
// double-print risk, so it must ALSO skip the local echo (research
// doc §3.7/§5.4, corrected).
bool serverEchoes = new ChatChannelInfo.Legacy(
legacy.Value.ChannelId,
legacy.Value.DisplayName).IsSelfEchoChannel();

View file

@ -313,8 +313,13 @@ internal sealed class LiveSessionRuntimeFactory
OnMovementStatsUpdated: () => _movementStats.Apply("stats"),
// Campaign CH slice CH3 (2026-08-09): reseed the Settings Chat
// draft from server truth every time a PlayerDescription lands
// (research doc §5.2/§6.4 — the local ChatSettings.Default lied
// relative to ACE's CharacterOptions2.Default).
// (research doc §5.2/§6.4). N4 (CH3 Opus review, 2026-08-09)
// aligned ChatSettings.Default itself to ACE's real
// CharacterOptions2.Default, but this reseed stays load-bearing
// regardless — a per-character persisted settings.json can
// still diverge from server truth (e.g. an older save, or a
// character whose allegiance/society changed), and the server
// is always authoritative.
OnCharacterOptionsChanged: (_, options2) =>
_interaction.Settings.SyncChatFromServerOptions(options2));
}

View file

@ -553,11 +553,15 @@ internal sealed class RuntimeSettingsController :
/// <summary>
/// CH3 (2026-08-09): reseed the persisted + draft Chat snapshot from the
/// server's own <c>CharacterOptions2</c> bitfield (already parsed out of
/// PlayerDescription) — called whenever a fresh description lands. The
/// local <see cref="ChatSettings.Default"/> lies relative to ACE's
/// default (Roleplay/Society start OFF server-side), so this is the only
/// way the checkbox ever reflects truth for a character that never
/// explicitly saved a Chat preference.
/// PlayerDescription) — called whenever a fresh description lands. N4
/// (CH3 Opus review, 2026-08-09) aligned <see cref="ChatSettings.Default"/>
/// to ACE's real default (Roleplay/Society start OFF server-side), but
/// this sync remains the only way the checkbox reflects truth for a
/// character whose PERSISTED settings.json diverges from the server —
/// an older save, or a character whose allegiance/society membership
/// changed since the file was last written. The server is always
/// authoritative, regardless of what the local default or a stale save
/// says.
/// </summary>
public void SyncChatFromServerOptions(uint options2)
{

View file

@ -270,7 +270,14 @@ internal sealed class RuntimeSettingsTargets : IRuntimeSettingsTargets
/// <see cref="LiveSessionCommandRouter"/> generation-gated route every
/// other outbound Settings/chat command uses — a no-op when no route is
/// currently attached (disconnected / reconnecting), exactly like every
/// other <c>ICommandBus.Publish</c> call site.
/// other <c>ICommandBus.Publish</c> call site. N6 (CH3 Opus review,
/// 2026-08-09): this silent drop is safe because
/// <c>RuntimeSettingsController.SaveChat</c> already wrote the toggle to
/// settings.json BEFORE calling here — the local preference is never
/// lost — and the next successful connect's PlayerDescription re-runs
/// <c>SyncChatFromServerOptions</c>, reconciling the draft/persisted
/// snapshot back to whatever the server actually has (which may or may
/// not match the dropped toggle, since the wire send never landed).
/// </summary>
public void SetSingleCharacterOption(uint optionId, bool value) =>
_commands.Publish(new SetSingleCharacterOptionRuntimeCmd(optionId, value));

View file

@ -23,24 +23,6 @@ namespace AcDream.Core.Net.Messages;
/// References: r08 §3 rows for each opcode.
/// </para>
/// </summary>
/// <summary>
/// ACE <c>CharacterOption</c> ids (a LINEAR enum, distinct from the
/// <c>CharacterOptions1</c>/<c>CharacterOptions2</c> BITFIELDS) — the first
/// <c>u32</c> of a <c>SetSingleCharacterOption (0x0005)</c> payload. Only
/// the six <c>ListenTo*Chat</c> ids Campaign CH slice CH3 (2026-08-09) needs
/// are modeled here; ACE <c>Source/ACE.Entity/Enum/CharacterOption.cs</c>
/// has the complete list.
/// </summary>
public enum CharacterOptionId : uint
{
ListenToAllegianceChat = 0x1B,
ListenToGeneralChat = 0x23,
ListenToTradeChat = 0x24,
ListenToLFGChat = 0x25,
ListenToRoleplayChat = 0x26,
ListenToSocietyChat = 0x2E,
}
public static class SocialActions
{
public const uint GameActionEnvelope = 0xF7B1u;
@ -205,3 +187,21 @@ public static class SocialActions
return result;
}
}
/// <summary>
/// ACE <c>CharacterOption</c> ids (a LINEAR enum, distinct from the
/// <c>CharacterOptions1</c>/<c>CharacterOptions2</c> BITFIELDS) — the first
/// <c>u32</c> of a <c>SetSingleCharacterOption (0x0005)</c> payload. Only
/// the six <c>ListenTo*Chat</c> ids Campaign CH slice CH3 (2026-08-09) needs
/// are modeled here; ACE <c>Source/ACE.Entity/Enum/CharacterOption.cs</c>
/// has the complete list.
/// </summary>
public enum CharacterOptionId : uint
{
ListenToAllegianceChat = 0x1B,
ListenToGeneralChat = 0x23,
ListenToTradeChat = 0x24,
ListenToLFGChat = 0x25,
ListenToRoleplayChat = 0x26,
ListenToSocietyChat = 0x2E,
}

View file

@ -33,9 +33,14 @@ public enum ChatChannelSource
/// echoes the client's own outgoing messages back on this channel
/// (so the client should suppress its optimistic local echo). Per
/// holtburger's predicate at <c>chat.rs::is_self_echo_channel</c>
/// (lines 492-507) this is true ONLY for the legacy fellowship/vassals/
/// patron/monarch/co-vassals channels — server resends those with
/// empty sender. Turbine and tells do not echo.
/// (lines 492-507) this is true for the legacy fellowship/vassals/
/// patron/monarch/co-vassals channels — server resends those with an
/// empty sender. S1 (CH3 Opus review, 2026-08-09) added
/// AllegianceBroadcast to this same group: ACE's GameActionChatChannel
/// handler includes the sender as an ordinary member of its real-name
/// broadcast — a different mechanism from the other five's empty-sender
/// resend, but the same consequence for the client (suppress the local
/// echo). Turbine and tells do not echo.
/// </para>
/// </summary>
public abstract record ChatChannelInfo(string DisplayName, ChatChannelSource Source)
@ -47,17 +52,22 @@ public abstract record ChatChannelInfo(string DisplayName, ChatChannelSource Sou
public override bool IsSelfEchoChannel()
{
// Per holtburger: the legacy fellowship + allegiance-tree
// channels are the ones the server echoes back to the sender
// with an empty sender field. Bitflag values from
// channels are the ones the server echoes back to the sender.
// Bitflag values from
// references/holtburger/.../messages/chat/types.rs::ChatChannel.
//
// CH3 (2026-08-09, research doc §3.7/§5.4): AllegianceBroadcast
// (0x02000000) deliberately falls to the `false` default below —
// ACE's GameActionChatChannel handler includes the sender in the
// normal real-name member broadcast for that channel (no
// separate "" -sender echo the way Fellow/Vassals/Patron/
// Monarch/CoVassals get), so the client must keep its own local
// optimistic echo or the sender never sees their own line.
// S1 (CH3 Opus review, 2026-08-09) — corrects the original CH3
// filing at research doc §3.7/§5.4: AllegianceBroadcast
// (0x02000000) belongs in the `true` group below, NOT the
// `false` default. ACE's GameActionChatChannel handler iterates
// player.Allegiance.Members, and the sender IS a member, so
// they receive their own line back with their REAL name — a
// different mechanism from Fellow/Vassals/Patron/Monarch/
// CoVassals' separate ""-sender resend, but the same
// consequence: keeping a local optimistic echo double-prints.
// Retail agrees: ClientCommunicationSystem::DoAllegianceBroadcast
// @0x005761F0 calls Event_ChannelBroadcast(0x2000000, &text)
// with no AddTextToScroll of its own.
return ChannelId switch
{
0x00000800u => true, // Fellow
@ -65,6 +75,7 @@ public abstract record ChatChannelInfo(string DisplayName, ChatChannelSource Sou
0x00002000u => true, // Patron
0x00004000u => true, // Monarch
0x01000000u => true, // CoVassals
0x02000000u => true, // AllegianceBroadcast
_ => false,
};
}
@ -86,9 +97,20 @@ public abstract record ChatChannelInfo(string DisplayName, ChatChannelSource Sou
{
public override bool IsSelfEchoChannel()
{
// Turbine rooms do NOT echo the sender's own messages back.
// The client must emit its own optimistic local echo to give
// the player feedback that the message was sent.
// S4 (CH3 Opus review, 2026-08-09): the comment this replaced
// was wrong in both directions. ACE's TurbineChatHandler
// resends via GetAllOnline() WITH the sender included — there
// is no sender exclusion, so the sender's own outgoing line
// comes back through the SAME broadcast every other member
// gets. Retail's SendTurbineChat @0x0057db10 emits no local
// AddTextToScroll on success either way. Production correctly
// shows no local optimistic echo for Turbine channels, but NOT
// because of this return value — RouteTurbineChat
// (LiveSessionCommandRouter / DirectGameRuntimeCommandAdapter)
// never calls OnSelfSent for a Turbine send at all, so this
// method is currently unread for the Turbine variant (only
// Legacy.IsSelfEchoChannel() has a caller). Kept `false` here
// since no caller depends on the value either way.
return false;
}
}

View file

@ -1,5 +1,6 @@
using AcDream.Core.Chat;
using AcDream.Core.Net.Messages;
using AcDream.Runtime.Session;
namespace AcDream.Runtime.Gameplay;
@ -64,38 +65,36 @@ public static class TurbineChatMembershipGate
ArgumentNullException.ThrowIfNull(turbineChat);
ArgumentNullException.ThrowIfNull(options);
(uint room, uint chatType, string name) = kind switch
// N2 (CH3 Opus review): reuse TurbineChatDisplayNames.Resolve — the
// SAME assembly already has this room/chatType-to-display-name
// table (LiveSessionEventRouter's inbound path uses it) rather than
// maintaining a second copy of the same seven strings here.
(uint room, uint chatType) = kind switch
{
ChatChannelKindLite.Allegiance => (
turbineChat.AllegianceRoom,
(uint)TurbineChat.ChatType.Allegiance,
"Allegiance"),
(uint)TurbineChat.ChatType.Allegiance),
ChatChannelKindLite.General => (
turbineChat.GeneralRoom,
(uint)TurbineChat.ChatType.General,
"General"),
(uint)TurbineChat.ChatType.General),
ChatChannelKindLite.Trade => (
turbineChat.TradeRoom,
(uint)TurbineChat.ChatType.Trade,
"Trade"),
(uint)TurbineChat.ChatType.Trade),
ChatChannelKindLite.Lfg => (
turbineChat.LfgRoom,
(uint)TurbineChat.ChatType.Lfg,
"LFG"),
(uint)TurbineChat.ChatType.Lfg),
ChatChannelKindLite.Roleplay => (
turbineChat.RoleplayRoom,
(uint)TurbineChat.ChatType.Roleplay,
"Roleplay"),
(uint)TurbineChat.ChatType.Roleplay),
ChatChannelKindLite.Society => (
turbineChat.SocietyRoom,
(uint)TurbineChat.ChatType.Society,
"Society"),
(uint)TurbineChat.ChatType.Society),
ChatChannelKindLite.Olthoi => (
turbineChat.OlthoiRoom,
(uint)TurbineChat.ChatType.Olthoi,
"Olthoi"),
_ => (0u, 0u, string.Empty),
(uint)TurbineChat.ChatType.Olthoi),
_ => (0u, 0u),
};
string name = TurbineChatDisplayNames.Resolve(room, chatType);
if (!turbineChat.Enabled || room == 0u)
{
@ -140,4 +139,31 @@ public static class TurbineChatMembershipGate
? new TurbineChatGateResult(TurbineChatGateStatus.Allowed, room, chatType, name)
: new TurbineChatGateResult(TurbineChatGateStatus.NotListening, room, chatType, name);
}
/// <summary>
/// N3 (CH3 Opus review): the single shared mapping from an evaluated
/// <see cref="TurbineChatGateResult"/> to the retail-exact local
/// refusal text/type an <c>AddText</c> caller should raise instead of
/// sending — collapses the identical
/// <c>switch (gate.Status) { case Unavailable: ...; case NotListening:
/// ...; }</c> block that used to live independently in both
/// <c>LiveSessionCommandRouter.RouteTurbineChat</c> and
/// <c>DirectGameRuntimeCommandAdapter.TrySendChannel</c>. Returns
/// <c>null</c> when the gate allows the send to proceed to the wire.
/// </summary>
public static (string Text, RetailLogTextType Type)? ResolveRefusalText(
TurbineChatGateResult gate)
{
switch (gate.Status)
{
case TurbineChatGateStatus.Unavailable:
return (ClientTextRefusals.TurbineChatUnavailable, RetailLogTextType.Default);
case TurbineChatGateStatus.NotListening:
(string? text, RetailLogTextType type) =
WeenieErrorMessages.Resolve(0x0551u, gate.DisplayName);
return text is not null ? (text, type) : null;
default:
return null;
}
}
}

View file

@ -952,6 +952,22 @@ public sealed class DirectGameRuntimeCommandAdapter
RuntimeChatChannel channel,
string text)
{
// S3 (CH3 Opus review): retail's @a stays bound to the legacy
// AllegianceBroadcast bitflag (0x02000000) until
// StartupTurbineChatSystem successfully starts Turbine chat (0x0295
// SetTurbineChatChannels received) and rebinds it to
// DoTurbineChat_Allegiance (research doc §4.3). "Turbine chat never
// started" is NOT the same case as "Turbine is up but this
// character has no allegiance room" (roomId == 0 with Enabled ==
// true), which keeps the "Turbine chat is not available." local
// refusal below at the membership gate's own Unavailable branch.
if (channel == RuntimeChatChannel.Allegiance
&& !_runtime.CommunicationOwner.TurbineChat.Enabled)
{
session.SendChannel(0x02000000u, text);
return true;
}
if (TryMapTurbine(channel, out ChatChannelKindLite turbineKind))
{
// CH3 (2026-08-09): the SAME membership gate the graphical host
@ -964,21 +980,16 @@ public sealed class DirectGameRuntimeCommandAdapter
_runtime.CharacterOwner.Options,
_runtime.CharacterOwner.IsOlthoiPlayer);
switch (gate.Status)
// N3 (CH3 Opus review): shared refusal-text mapping — see
// TurbineChatMembershipGate.ResolveRefusalText.
if (gate.Status != TurbineChatGateStatus.Allowed)
{
case TurbineChatGateStatus.Unavailable:
_runtime.CommunicationOwner.AddText(
ClientTextRefusals.TurbineChatUnavailable,
RetailLogTextType.Default);
return true;
case TurbineChatGateStatus.NotListening:
if (TurbineChatMembershipGate.ResolveRefusalText(gate) is
(string refusalText, RetailLogTextType refusalType))
{
(string? refusal, RetailLogTextType type) =
WeenieErrorMessages.Resolve(0x0551u, gate.DisplayName);
if (refusal is not null)
_runtime.CommunicationOwner.AddText(refusal, type);
return true;
_runtime.CommunicationOwner.AddText(refusalText, refusalType);
}
return true;
}
session.SendTurbineChatTo(

View file

@ -62,9 +62,11 @@ public sealed record LiveCharacterSessionBindings(
// (options1, options2) pair whenever a fresh PlayerDescription lands —
// AFTER Character.Options.Replace has already committed them. Lets the
// graphical host reseed its Settings "Hear * Chat" draft from server
// truth (research doc §5.2/§6.4: the local ChatSettings.Default lies
// relative to ACE's CharacterOptions2.Default). Optional/nullable so
// every existing caller compiles unchanged.
// truth (research doc §5.2/§6.4) so a per-character persisted
// settings.json that diverges from the server (an older save, or a
// changed allegiance/society) always converges back to what ACE
// actually has — the server, not any local default, is authoritative.
// Optional/nullable so every existing caller compiles unchanged.
Action<uint, uint>? OnCharacterOptionsChanged = null);
public sealed record LiveSocialSessionBindings(

View file

@ -21,6 +21,19 @@ namespace AcDream.UI.Abstractions.Panels.Settings;
/// Settings UI does not expose one either — Allegiance chat membership rides
/// allegiance membership, not a standalone preference.
/// </para>
///
/// <para>
/// N5 (CH3 Opus review, 2026-08-09): the server-backed sync/publish
/// wiring above covers ONLY the five Hear*Chat fields.
/// <see cref="AppearOffline"/>, <see cref="ShowTimestamps"/>, and
/// <see cref="FilterProfanity"/> each correspond to a real retail
/// <c>CharacterOptions2</c> bit (per the field comments below) but are
/// deliberately NOT wired to <c>SyncChatFromServerOptions</c> or
/// <c>SaveChat</c>'s <c>SetSingleCharacterOption</c> publish — they stay
/// local-only display preferences. Do not extend the sync/publish pair to
/// them without a corresponding design decision; today they are read and
/// written from <c>settings.json</c> alone.
/// </para>
/// </summary>
public sealed record ChatSettings(
// CharacterOptions2 (32-bit) channel filters.
@ -35,13 +48,23 @@ public sealed record ChatSettings(
// Visual / UX (no retail bitfield).
float FontSize) // chat panel font, 10..20 pt
{
/// <summary>Sensible starting values matching the retail "all on" stance.</summary>
/// <summary>
/// N4 (CH3 Opus review): matches ACE's ACTUAL
/// <c>CharacterOptions2.Default (0x00948700)</c> stance for the five
/// server-backed Hear*Chat bits — General/Trade/LFG are on, but
/// Roleplay (<c>0x800</c>) and Society (<c>0x80000</c>) are OFF (research
/// doc §5.2). The prior "matching the retail 'all on' stance" comment
/// here was wrong: two of the five synced flags are off by default. The
/// server reseed at login (<c>SyncChatFromServerOptions</c>) remains
/// authoritative regardless of this constant — this is only the
/// pre-login / never-connected starting value.
/// </summary>
public static ChatSettings Default { get; } = new(
HearGeneralChat: true,
HearTradeChat: true,
HearLFGChat: true,
HearRoleplayChat: true,
HearSocietyChat: true,
HearRoleplayChat: false,
HearSocietyChat: false,
AppearOffline: false,
ShowTimestamps: true,
FilterProfanity: true,