fix(D.5.1): toolbar use-item gates on in-world + logs; store controller field (review)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
3b6f293dc8
commit
b3e5e8b0f7
1 changed files with 7 additions and 2 deletions
|
|
@ -617,6 +617,8 @@ public sealed class GameWindow : IDisposable
|
||||||
private AcDream.UI.Abstractions.Panels.Vitals.VitalsVM? _vitalsVm;
|
private AcDream.UI.Abstractions.Panels.Vitals.VitalsVM? _vitalsVm;
|
||||||
// Phase D.2b — retail-look UI tree (dormant UiHost wired here). Null unless ACDREAM_RETAIL_UI=1.
|
// Phase D.2b — retail-look UI tree (dormant UiHost wired here). Null unless ACDREAM_RETAIL_UI=1.
|
||||||
private AcDream.App.UI.UiHost? _uiHost;
|
private AcDream.App.UI.UiHost? _uiHost;
|
||||||
|
// Phase D.5.1 — toolbar controller (kept for lifetime clarity; mirrors _chatWindowController pattern).
|
||||||
|
private AcDream.App.UI.Layout.ToolbarController? _toolbarController;
|
||||||
// Phase D.2b Task 9 — plugin UI registrations buffered before OnLoad; drained in OnLoad.
|
// Phase D.2b Task 9 — plugin UI registrations buffered before OnLoad; drained in OnLoad.
|
||||||
private readonly AcDream.App.Plugins.BufferedUiRegistry? _uiRegistry;
|
private readonly AcDream.App.Plugins.BufferedUiRegistry? _uiRegistry;
|
||||||
// Phase I.2: ImGui debug panel ViewModel. Lives for as long as
|
// Phase I.2: ImGui debug panel ViewModel. Lives for as long as
|
||||||
|
|
@ -1915,7 +1917,7 @@ public sealed class GameWindow : IDisposable
|
||||||
_dats!, 0x21000016u, ResolveChrome, vitalsDatFont);
|
_dats!, 0x21000016u, ResolveChrome, vitalsDatFont);
|
||||||
if (toolbarLayout is not null)
|
if (toolbarLayout is not null)
|
||||||
{
|
{
|
||||||
AcDream.App.UI.Layout.ToolbarController.Bind(
|
_toolbarController = AcDream.App.UI.Layout.ToolbarController.Bind(
|
||||||
toolbarLayout, Items,
|
toolbarLayout, Items,
|
||||||
() => Shortcuts,
|
() => Shortcuts,
|
||||||
iconIds: (icon, under, over) => iconComposer.GetIcon(icon, under, over),
|
iconIds: (icon, under, over) => iconComposer.GetIcon(icon, under, over),
|
||||||
|
|
@ -11627,10 +11629,13 @@ public sealed class GameWindow : IDisposable
|
||||||
// for items already in the player's inventory.
|
// for items already in the player's inventory.
|
||||||
private void UseItemByGuid(uint guid)
|
private void UseItemByGuid(uint guid)
|
||||||
{
|
{
|
||||||
if (_liveSession is null) return;
|
if (_liveSession is null
|
||||||
|
|| _liveSession.CurrentState != AcDream.Core.Net.WorldSession.State.InWorld)
|
||||||
|
return;
|
||||||
var seq = _liveSession.NextGameActionSequence();
|
var seq = _liveSession.NextGameActionSequence();
|
||||||
var body = AcDream.Core.Net.Messages.InteractRequests.BuildUse(seq, guid);
|
var body = AcDream.Core.Net.Messages.InteractRequests.BuildUse(seq, guid);
|
||||||
_liveSession.SendGameAction(body);
|
_liveSession.SendGameAction(body);
|
||||||
|
Console.WriteLine($"[D.5.1] toolbar use-item guid=0x{guid:X8} seq={seq}");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SendPickUp(uint itemGuid)
|
private void SendPickUp(uint itemGuid)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue