From 5b7443505005bf4ac74428e7537f81a350cda2b3 Mon Sep 17 00:00:00 2001 From: goaaats Date: Sun, 30 Jan 2022 22:29:14 +0100 Subject: [PATCH] chore: some more context menu debug output --- Dalamud/Game/Gui/ContextMenus/ContextMenu.cs | 3 +++ .../SelfTest/AgingSteps/ContextMenuAgingStep.cs | 11 ++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Dalamud/Game/Gui/ContextMenus/ContextMenu.cs b/Dalamud/Game/Gui/ContextMenus/ContextMenu.cs index a46f46649..44307b48a 100644 --- a/Dalamud/Game/Gui/ContextMenus/ContextMenu.cs +++ b/Dalamud/Game/Gui/ContextMenus/ContextMenu.cs @@ -11,6 +11,7 @@ using Dalamud.Memory; using FFXIVClientStructs.FFXIV.Client.UI; using FFXIVClientStructs.FFXIV.Client.UI.Agent; using FFXIVClientStructs.FFXIV.Component.GUI; +using Serilog; using ValueType = FFXIVClientStructs.FFXIV.Component.GUI.ValueType; @@ -277,6 +278,8 @@ namespace Dalamud.Game.Gui.ContextMenus { var parentAddonName = this.GetParentAddonName(&addonContextMenu->AtkUnitBase); + Log.Warning($"AgentContextInterface at: {new IntPtr(agentContextInterface):X}"); + InventoryItemContext? inventoryItemContext = null; GameObjectContext? gameObjectContext = null; if (IsInventoryContext(agentContextInterface)) diff --git a/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/ContextMenuAgingStep.cs b/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/ContextMenuAgingStep.cs index 3752a09f5..2c6ea7a3c 100644 --- a/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/ContextMenuAgingStep.cs +++ b/Dalamud/Interface/Internal/Windows/SelfTest/AgingSteps/ContextMenuAgingStep.cs @@ -149,7 +149,16 @@ namespace Dalamud.Interface.Internal.Windows.SelfTest.AgingSteps private void ContextMenuOnContextMenuOpened(ContextMenuOpenedArgs args) { - Log.Information("Got context menu with parent addon: {ParentAddonName}", args.ParentAddonName); + Log.Information("Got context menu with parent addon: {ParentAddonName}, title:{Title}, itemcnt:{ItemCount}", args.ParentAddonName, args.Title, args.Items.Count); + if (args.GameObjectContext != null) + { + Log.Information(" => GameObject:{GameObjectName} world:{World} cid:{Cid} id:{Id}", args.GameObjectContext.Name, args.GameObjectContext.WorldId, args.GameObjectContext.ContentId, args.GameObjectContext.Id); + } + + if (args.InventoryItemContext != null) + { + Log.Information(" => Inventory:{ItemId} hq:{Hq} count:{Count}", args.InventoryItemContext.Id, args.InventoryItemContext.IsHighQuality, args.InventoryItemContext.Count); + } switch (this.currentSubStep) {