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:
parent
eb6229394a
commit
05f6222865
11 changed files with 181 additions and 24 deletions
|
|
@ -68,14 +68,16 @@ public class ChatCommandRouterTests
|
|||
Assert.DoesNotContain(log.Snapshot(), e => e.Text.Contains("Unknown command"));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ServerCommandWithArgs_PublishesAtFormAsSay_EvenOnChannelDefault()
|
||||
[Theory]
|
||||
[InlineData("/ci 629 5")]
|
||||
[InlineData("@ci 629 5")]
|
||||
public void ServerCommandWithArgs_PublishesCanonicalAtFormAsSay_EvenOnChannelDefault(string command)
|
||||
{
|
||||
// Commands resolve before channel routing (retail behavior):
|
||||
// even with Fellowship as the active input channel, a command
|
||||
// goes out as Say/Talk — the only wire action ACE parses @ on.
|
||||
var (vm, _, bus) = Fixture();
|
||||
var outcome = ChatCommandRouter.Submit("/ci 629 5", vm, bus, ChatChannelKind.Fellowship);
|
||||
var outcome = ChatCommandRouter.Submit(command, vm, bus, ChatChannelKind.Fellowship);
|
||||
Assert.Equal(SubmitOutcome.Sent, outcome);
|
||||
Assert.Equal(ChatChannelKind.Say, bus.Last!.Channel);
|
||||
Assert.Equal("@ci 629 5", bus.Last.Text);
|
||||
|
|
|
|||
|
|
@ -19,6 +19,33 @@ public sealed class VitalsVMTests
|
|||
Assert.Equal(0.42f, vm.HealthPercent, precision: 3);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void HealthPercent_LocalPrivateVitalOverridesStaleCombatPercent()
|
||||
{
|
||||
var combat = new CombatState();
|
||||
uint guid = 0x5000_0042u;
|
||||
combat.OnUpdateHealth(guid, 1f);
|
||||
|
||||
var local = new LocalPlayerState();
|
||||
local.OnVitalUpdate(vitalId: 2u, ranks: 50u, start: 50u, xp: 0u, current: 1u);
|
||||
var vm = new VitalsVM(combat, local);
|
||||
vm.SetLocalPlayerGuid(guid);
|
||||
|
||||
Assert.Equal(0.01f, vm.HealthPercent, precision: 3);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void HealthPercent_ReadsCurrentOnlyPrivateVitalDeltaWithoutStaleCache()
|
||||
{
|
||||
var local = new LocalPlayerState();
|
||||
local.OnVitalUpdate(vitalId: 2u, ranks: 50u, start: 50u, xp: 0u, current: 100u);
|
||||
var vm = new VitalsVM(new CombatState(), local);
|
||||
|
||||
local.OnVitalCurrent(vitalId: 2u, current: 25u);
|
||||
|
||||
Assert.Equal(0.25f, vm.HealthPercent, precision: 3);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void HealthPercent_ReturnsOne_WhenGuidUnknown()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue