fix(chat): Campaign CH user-gate round 2 -- portal notice rerouted to SpewBox, verbatim /help extraction, jump-in-air evidence
Item 2: retail's portal-space "In Portal Space..." notice is the SpewBox (ECM_UI::SendNotice_DisplayStringInfo(0x1A,...) -> AddTextToScroll(str, 0x1A, 1, 0), hardcoded to the SpewBox per the decomp), not a dedicated centered overlay. PortalWaitNoticeController and its lease are deleted; PortalTunnelPresentation's per-rotation-segment cadence now writes straight into RuntimeCommunicationState.AddText(ClientLocal) -- the SpewBox's own dedupe-at-index-0 handles the repetition exactly as retail's does. Register row AP-184 records the surface fix and the AP-178 scope extension. Items 4+5: /help text was partially fabricated -- the user caught the "/help death" meta-message. Generalized tools/pdb-extract/sweep_weenie_strings.py to decode narrow PStringBase<char> literals (the ClientCommunicationSystem::Help* family's shape) alongside its original UTF-16LE support, then swept every HelpXxxGroup function's exact byte extent against the PDB-paired acclient.exe. 4 of 7 group topics (death/status/text/allegiances) are now complete verbatim listings; the other 3 (channels/chatting/commands) keep an honest UNVERIFIED note citing HelpStupidChannelHack @0x0056f290 (a genuinely undecodable BN-mislabeled-fragment mechanism) instead of the old fabricated sentinel. 7 of ~35 channel one-liners are also now verbatim. ISSUES.md #364 tracks the remainder; RetailCommandHelpTableTests.cs pins every result byte-exact. Item 1: jump-in-air refusal still silent live is NOT reproduced and NOT speculatively fixed. Exhaustive static re-audit found the mechanism correct by construction (single-writer OnWalkable, exactly-once-per-frame Update()/Capture(), no interfering edge-history resets). A live headless repro (new jump-probe bot policy, real ACE connect) was blocked -- probeaccount2 has no character, and the graphical client already owned testaccount this session so the task's own fallback rule forbade using it. Two temporary probes are left behind ACDREAM_PROBE_JUMP=1 (blocked entirely in Headless by the existing multi-session static-state guard -- graphical-only for the next round). Item 3 confirmed fixed, no regression. Item 6 (resize: no diagonal cursors, cannot grow Y from bottom-right) folded into CH6a's existing scope. Full Release suite: 12,267 passed / 4 skipped / 0 failed (up from 12,221/4/0). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
a485425743
commit
c1f1582576
14 changed files with 788 additions and 254 deletions
|
|
@ -1,45 +0,0 @@
|
|||
using System.Numerics;
|
||||
using AcDream.App.UI;
|
||||
|
||||
namespace AcDream.App.Tests.UI;
|
||||
|
||||
public sealed class PortalWaitNoticeControllerTests
|
||||
{
|
||||
// Campaign CH user-gate round 1 (item D): the user confirmed live,
|
||||
// side-by-side against retail, that this notice renders in the same
|
||||
// bright yellow as an incoming Tell (RetailChatColorTable.Yellow).
|
||||
private static readonly Vector4 RetailWaitCueColor = new(1f, 1f, 0.247f, 1f);
|
||||
|
||||
[Fact]
|
||||
public void Notice_IsCenteredOverlayAndDisposesFromRetainedRoot()
|
||||
{
|
||||
var root = new UiRoot
|
||||
{
|
||||
Width = 1280f,
|
||||
Height = 720f,
|
||||
};
|
||||
|
||||
using (var controller = new PortalWaitNoticeController(root))
|
||||
{
|
||||
UiText text = Assert.IsType<UiText>(Assert.Single(root.Children));
|
||||
Assert.False(text.Visible);
|
||||
Assert.True(text.Centered);
|
||||
Assert.True(text.ClickThrough);
|
||||
Assert.Equal(root.Width, text.Width);
|
||||
Assert.Equal(root.Height, text.Height);
|
||||
Assert.Equal(RetailWaitCueColor, text.DefaultColor);
|
||||
|
||||
controller.Set("In Portal Space - Please Wait...");
|
||||
|
||||
Assert.True(text.Visible);
|
||||
UiText.Line line = Assert.Single(text.LinesProvider!());
|
||||
Assert.Equal("In Portal Space - Please Wait...", line.Text);
|
||||
Assert.Equal(RetailWaitCueColor, line.Color);
|
||||
|
||||
controller.Set(null);
|
||||
Assert.False(text.Visible);
|
||||
}
|
||||
|
||||
Assert.Empty(root.Children);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,168 @@
|
|||
using AcDream.UI.Abstractions.Panels.Chat;
|
||||
using Xunit;
|
||||
|
||||
namespace AcDream.UI.Abstractions.Tests.Panels.Chat;
|
||||
|
||||
/// <summary>
|
||||
/// Campaign CH user-gate round 2, item 3 (2026-08-09): pins a sample of
|
||||
/// <see cref="RetailCommandHelpTable"/>'s extracted strings byte-exact
|
||||
/// against the values recovered from the PDB-paired
|
||||
/// <c>C:\Users\erikn\Downloads\acclient.exe</c> via
|
||||
/// <c>tools/pdb-extract/sweep_weenie_strings.py --ascii-only</c> (generalized
|
||||
/// this round for narrow <c>PStringBase<char></c> literals — see the
|
||||
/// script's own docstring). Covers all four COMPLETE group listings
|
||||
/// (death/status/text/allegiances — <c>/help death</c> was the user's own
|
||||
/// example of the fabricated meta-message this round replaces), the three
|
||||
/// PARTIAL groups' honest UNVERIFIED fallback, and a sample of the newly
|
||||
/// verbatim channel one-liners.
|
||||
/// </summary>
|
||||
public sealed class RetailCommandHelpTableTests
|
||||
{
|
||||
[Fact]
|
||||
public void DeathGroup_IsCompleteVerbatimListing_NoLeadingSummaryLine()
|
||||
{
|
||||
// acclient_2013_pseudo_c.txt:391365-391436 (HelpDeathGroup Detail
|
||||
// branch) -- straight-line concatenation, no "@help death - ..."
|
||||
// prefix (that string is exclusive to the Summary_HelpType branch).
|
||||
Assert.Equal(
|
||||
"@permit - Commands to give or revoke permission for others to loot your corpse.\n"
|
||||
+ "@consent - Commands to help you manage the corpse-looting permissions that others give you.\n"
|
||||
+ "@corpse - Displays the location of your last outdoor death.\n"
|
||||
+ "@die - Kills your character and leaves a corpse, returning you to your lifestone.\n"
|
||||
+ "@lifestone - Returns you to the last lifestone you used without killing you.\n"
|
||||
+ "@marketplace - Teleports you to the Marketplace of Dereth.\n"
|
||||
+ "@pkarena - Teleports you to the PK Arena. You must be PK to use this command.\n"
|
||||
+ "@pklarena - Teleports you to the PKL Arena. You must be PKL to use this command.\n",
|
||||
RetailCommandHelpTable.DeathGroupDetail);
|
||||
|
||||
Assert.True(RetailCommandHelpTable.TryGetHelpText("death", out string viaLookup));
|
||||
Assert.Equal(RetailCommandHelpTable.DeathGroupDetail, viaLookup);
|
||||
Assert.DoesNotContain("has not yet extracted", viaLookup);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void StatusGroup_IsCompleteVerbatimListing_PreservesRetailTrailingSpace()
|
||||
{
|
||||
// The trailing space before "\n" on the @day line is retail's own
|
||||
// byte content (data_0x7de280) -- not an acdream typo.
|
||||
Assert.Equal(
|
||||
"@age - Displays your total gameplay time.\n"
|
||||
+ "@birth - Displays when your character was created.\n"
|
||||
+ "@day - A toggle that lightens the outdoor landscape. Note that this command may take several seconds to take effect. \n"
|
||||
+ "@endurance - Explains how endurance affects your character.\n"
|
||||
+ "@framerate - Toggles the framerate display.\n"
|
||||
+ "@loc - Displays your current position.\n"
|
||||
+ "@pklite - Sets your status to Player Killer Lite. Type @help pklite for more details.\n"
|
||||
+ "@version - Tells you what version of the software you are using.\n",
|
||||
RetailCommandHelpTable.StatusGroupDetail);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TextGroup_IsCompleteVerbatimListing()
|
||||
{
|
||||
Assert.Equal(
|
||||
"@clear - Clears the chat box of all text.\n"
|
||||
+ "@filter - Commands to filter out incoming messages.\n"
|
||||
+ "@unfilter - Commands to remove filters from incoming messages.\n"
|
||||
+ "@loadfile - Reads in the given text file and executes each line in the chat entry field.\n"
|
||||
+ "@log - Commands to echo chat text to a logfile.\n"
|
||||
+ "@title <new title> - Sets the title of the popup chat window.\n",
|
||||
RetailCommandHelpTable.TextGroupDetail);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void AllegiancesGroup_IsCompleteVerbatimListing_TwoLines()
|
||||
{
|
||||
Assert.Equal(
|
||||
"@allegiance - Commands to help manage your allegiance.\n"
|
||||
+ "@allegiance motd - Displays or sets the message of the day for your allegiance, see @help motd for more information.\n",
|
||||
RetailCommandHelpTable.AllegiancesGroupDetail);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("channels")]
|
||||
[InlineData("commands")]
|
||||
public void UnresolvedGroups_ContainVerbatimSummaryPlusHonestUnverifiedNote_NoMetaFabrication(
|
||||
string verb)
|
||||
{
|
||||
Assert.True(RetailCommandHelpTable.TryGetHelpText(verb, out string text));
|
||||
// The old sentinel this round retired -- must never come back.
|
||||
Assert.DoesNotContain("has not yet extracted", text);
|
||||
Assert.Contains("UNVERIFIED", text);
|
||||
Assert.Contains("HelpStupidChannelHack @0x0056f290", text);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ChannelsGroup_SummaryLineIsVerbatim()
|
||||
{
|
||||
Assert.True(RetailCommandHelpTable.TryGetHelpText("channels", out string text));
|
||||
Assert.StartsWith(
|
||||
"@help channels - How to communicate with people in your allegiance or fellowship.",
|
||||
text);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ChattingGroup_SevenOfEightEntriesAreVerbatim_FifthEntryMarkedUnverified()
|
||||
{
|
||||
Assert.True(RetailCommandHelpTable.TryGetHelpText("chatting", out string text));
|
||||
Assert.Contains(
|
||||
"@chat - Sets whether or not you receive normal chat.\n",
|
||||
text);
|
||||
Assert.Contains(
|
||||
"@notell - Sets whether or not you receive @tell's.\n",
|
||||
text);
|
||||
Assert.Contains(
|
||||
"@reply - Sends some text to the last person who @tell'd you.\n",
|
||||
text);
|
||||
Assert.Contains(
|
||||
"@retell - Sends some text to the last person you @tell'd.\n",
|
||||
text);
|
||||
Assert.Contains(
|
||||
"@say - Says some text to everyone around you.\n",
|
||||
text);
|
||||
Assert.Contains(
|
||||
"@tell - Sends a private message to another character.\n",
|
||||
text);
|
||||
Assert.Contains(
|
||||
"@afk - Set your away-from-keyboard status.\n",
|
||||
text);
|
||||
Assert.Contains("HelpStupidChannelHack @0x0056f290", text);
|
||||
}
|
||||
|
||||
// Campaign CH user-gate round 2, item 3: 7 of the ~35 channel
|
||||
// one-liners are now verbatim retail text (HelpTurbineChat_Xxx,
|
||||
// acclient_2013_pseudo_c.txt:387294-387411, addresses
|
||||
// 0x577620-0x577850) -- the "Also: @alias" suffix is retail's own text.
|
||||
[Theory]
|
||||
[InlineData("a", "@a - Sends a message to your Allegiance. Also: @guild, @gu")]
|
||||
[InlineData("guild", "@a - Sends a message to your Allegiance. Also: @guild, @gu")]
|
||||
[InlineData("general", "@general - Sends a message to the global General chat channel. Also: @cg")]
|
||||
[InlineData("trade", "@trade - Sends a message to the global Trade chat channel. Also: @ct")]
|
||||
[InlineData("lfg", "@lfg - Sends a message to the global Looking For Group (LFG) chat channel. Also: @clfg")]
|
||||
[InlineData("roleplay", "@roleplay - Sends a message to the global Roleplay chat channel. Also: @crp")]
|
||||
[InlineData("society", "@society - Sends a message to the your Society chat channel. Also: @soc")]
|
||||
[InlineData("olthoi", "@olthoi - If you are an Olthoi, sends a message to the global Olthoi chat channel. Also: @o")]
|
||||
public void ChannelVerb_VerbatimOneLiner_MatchesExactly(string verb, string expected)
|
||||
{
|
||||
Assert.True(RetailCommandHelpTable.TryGetHelpText(verb, out string text));
|
||||
Assert.Equal(expected, text);
|
||||
}
|
||||
|
||||
// The fellowship/monarch/patron/vassals/covassal family still routes
|
||||
// through the unresolved HelpStupidChannelHack pooled-string mechanism
|
||||
// (the "fvpca" BN artifact) and remains an honest acdream summary, not
|
||||
// a claimed-verbatim string. Pinned so a future accidental "upgrade" to
|
||||
// a fabricated retail-looking string doesn't slip in unnoticed.
|
||||
[Theory]
|
||||
[InlineData("f", "Sends text to your Fellowship channel.")]
|
||||
[InlineData("monarch", "Sends text to your Monarch.")]
|
||||
[InlineData("patron", "Sends text to your Patron.")]
|
||||
[InlineData("vassal", "Sends text to your Vassals.")]
|
||||
[InlineData("covassal", "Sends text to your Co-vassals.")]
|
||||
public void ChannelVerb_StillAcdreamSummary_UnresolvedChannelHackFamily(
|
||||
string verb, string expected)
|
||||
{
|
||||
Assert.True(RetailCommandHelpTable.TryGetHelpText(verb, out string text));
|
||||
Assert.Equal(expected, text);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue