fix(ui): complete live targeted healing flow

Route ACE server commands through the existing chat path, bind the retail paperdoll hit mask instead of its obscured viewport, and prefer authoritative private health vitals. Record the user-confirmed live gate and pin the production DAT widget type in tests.
This commit is contained in:
Erik 2026-07-11 07:58:59 +02:00
parent eb6229394a
commit 05f6222865
11 changed files with 181 additions and 24 deletions

View file

@ -73,6 +73,25 @@ public sealed class RetailUiInteractionFlowTests
Width = 56,
Height = 20,
};
var dollViewport = new UiViewport
{
DatElementId = PaperdollController.DollViewportId,
Left = 270,
Top = 80,
Width = 70,
Height = 90,
};
var dollDragMask = new UiButton(
new ElementInfo { Id = PaperdollController.DollDragMaskId, Type = 1 },
static _ => (0u, 0, 0))
{
DatElementId = PaperdollController.DollDragMaskId,
Left = 270,
Top = 80,
Width = 70,
Height = 90,
ZOrder = 1,
};
var meter = new UiMeter
{
DatElementId = InventoryController.BurdenMeterId,
@ -107,6 +126,8 @@ public sealed class RetailUiInteractionFlowTests
[InventoryController.ContentsScrollbarId] = scrollbar,
[ChestArmorSlotId] = chestArmor,
[SlotsButtonId] = slotsButton,
[PaperdollController.DollViewportId] = dollViewport,
[PaperdollController.DollDragMaskId] = dollDragMask,
};
layoutRoot.AddChild(grid);
@ -114,6 +135,8 @@ public sealed class RetailUiInteractionFlowTests
layoutRoot.AddChild(mainPack);
layoutRoot.AddChild(chestArmor);
layoutRoot.AddChild(slotsButton);
layoutRoot.AddChild(dollViewport);
layoutRoot.AddChild(dollDragMask);
layoutRoot.AddChild(meter);
layoutRoot.AddChild(titleText);
layoutRoot.AddChild(burdenText);
@ -260,6 +283,23 @@ public sealed class RetailUiInteractionFlowTests
Assert.False(interaction.IsTargetModeActive);
}
[Fact]
public void InventoryTargetUse_thenPaperdollBodyClick_selfTargetsThroughUiRoot()
{
var h = new Harness();
h.SeedHealthKit();
var interaction = h.BindInventoryInteraction();
h.BindPaperdoll(interaction);
var probe = h.Probe();
Assert.True(probe.DoubleClickItem(HealthKit, ItemDragSource.Inventory));
Assert.True(interaction.IsTargetModeActive);
Assert.True(probe.ClickElement(PaperdollController.DollDragMaskId));
Assert.Equal(new[] { (HealthKit, Player) }, h.UseWithTarget);
Assert.False(interaction.IsTargetModeActive);
}
[Fact]
public void InventoryTargetUse_invalidInventoryItem_isConsumedWithoutSelectionFallback()
{