feat(ui): port retail selected-item mana
Parse and route the complete 0x0264 guid/fraction/valid response, send exact 0x0263 item-mana queries, and reproduce retail meter visibility plus guid-zero cancellation for mana and health selection changes. Keep the behavior in Core state and the retained selected-object controller with wire/state/UI conformance coverage. Co-Authored-By: Codex <codex@openai.com>
This commit is contained in:
parent
df460f94c3
commit
fa1da02783
21 changed files with 402 additions and 38 deletions
|
|
@ -69,7 +69,8 @@ public static class GameEventWiring
|
|||
// B-Wire: the local player's server guid. When provided, the PD handler upserts
|
||||
// the player's own PropertyBundle (EncumbranceVal etc.) into the player ClientObject.
|
||||
Func<uint>? playerGuid = null,
|
||||
Action<uint /*weenieError*/>? onUseDone = null)
|
||||
Action<uint /*weenieError*/>? onUseDone = null,
|
||||
ItemManaState? itemMana = null)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(dispatcher);
|
||||
ArgumentNullException.ThrowIfNull(items);
|
||||
|
|
@ -161,6 +162,16 @@ public static class GameEventWiring
|
|||
var p = GameEvents.ParseUpdateHealth(e.Payload.Span);
|
||||
if (p is not null) combat.OnUpdateHealth(p.Value.TargetGuid, p.Value.HealthPercent);
|
||||
});
|
||||
if (itemMana is not null)
|
||||
{
|
||||
dispatcher.Register(GameEventType.QueryItemManaResponse, e =>
|
||||
{
|
||||
var p = GameEvents.ParseQueryItemManaResponse(e.Payload.Span);
|
||||
if (p is not null)
|
||||
itemMana.OnQueryItemManaResponse(
|
||||
p.Value.ItemGuid, p.Value.ManaPercent, p.Value.Valid);
|
||||
});
|
||||
}
|
||||
dispatcher.Register(GameEventType.VictimNotification, e =>
|
||||
{
|
||||
var p = GameEvents.ParseVictimNotification(e.Payload.Span);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue