refactor(net): converge live session state reset
This commit is contained in:
parent
78a9223b65
commit
4f31a5085f
35 changed files with 1460 additions and 83 deletions
|
|
@ -62,14 +62,27 @@ public sealed class ChatLog
|
|||
|
||||
/// <summary>
|
||||
/// Push the authoritative local-player GUID from <c>WorldSession</c>.
|
||||
/// One-way setter — only <c>GameWindow</c> should call it, exactly
|
||||
/// once per live session. Used by <see cref="OnLocalSpeech"/> to
|
||||
/// The host sets it after character selection and resets it at session
|
||||
/// teardown. Used by <see cref="OnLocalSpeech"/> to
|
||||
/// recognize ACE's HearSpeech echo of our own /say (server's
|
||||
/// HandleActionTalk broadcasts to all in range INCLUDING the
|
||||
/// sender) and re-render it as <c>"You say, ..."</c>.
|
||||
/// </summary>
|
||||
public void SetLocalPlayerGuid(uint guid) => _localPlayerGuid = guid;
|
||||
|
||||
/// <summary>
|
||||
/// Reset per-session speaker classification and duplicate suppression
|
||||
/// while preserving the visible transcript. Retail has an explicit
|
||||
/// <c>ChatInterface::RecvNotice_ClearChatBuffer @ 0x004F2F60</c> path;
|
||||
/// character-session teardown does not use that clear-buffer notice.
|
||||
/// </summary>
|
||||
public void ResetSessionIdentity()
|
||||
{
|
||||
_localPlayerGuid = 0u;
|
||||
_lastSystemText = string.Empty;
|
||||
_lastSystemAt = DateTime.MinValue;
|
||||
}
|
||||
|
||||
// ── Inbound adapters ─────────────────────────────────────────────────────
|
||||
|
||||
/// <summary>Local or ranged HearSpeech (0x02BB / 0x02BC).</summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue