feat(chat): port retail client command families
Expand the typed client-command boundary across travel, character queries, local UI and layout controls, AFK and consent, emotes, friends, squelch and filters, and fill-components. Preserve retail packet layouts and queue ownership, import the confirmation dialog, and keep authoritative social state in Core. Co-Authored-By: Codex <codex@openai.com>
This commit is contained in:
parent
5a45a7ac7f
commit
9ea579bdd0
47 changed files with 6659 additions and 99 deletions
35
src/AcDream.Core/Social/SquelchState.cs
Normal file
35
src/AcDream.Core/Social/SquelchState.cs
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
namespace AcDream.Core.Social;
|
||||
|
||||
/// <summary>Authoritative copy of retail's server-supplied <c>SquelchDB</c>.</summary>
|
||||
public sealed class SquelchState
|
||||
{
|
||||
private readonly object _gate = new();
|
||||
private SquelchDatabase _database = SquelchDatabase.Empty;
|
||||
|
||||
public SquelchDatabase Snapshot()
|
||||
{
|
||||
lock (_gate) return _database;
|
||||
}
|
||||
|
||||
public void Replace(SquelchDatabase database)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(database);
|
||||
lock (_gate) _database = database;
|
||||
}
|
||||
}
|
||||
|
||||
public sealed record SquelchInfo(
|
||||
string Name,
|
||||
bool AccountWide,
|
||||
IReadOnlySet<uint> MessageTypes);
|
||||
|
||||
public sealed record SquelchDatabase(
|
||||
IReadOnlyDictionary<string, uint> Accounts,
|
||||
IReadOnlyDictionary<uint, SquelchInfo> Characters,
|
||||
SquelchInfo Global)
|
||||
{
|
||||
public static SquelchDatabase Empty { get; } = new(
|
||||
new Dictionary<string, uint>(StringComparer.OrdinalIgnoreCase),
|
||||
new Dictionary<uint, SquelchInfo>(),
|
||||
new SquelchInfo(string.Empty, false, new HashSet<uint>()));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue