Fix KTK, set up Lifecycles
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using Dalamud.Game.Addon.Lifecycle;
|
||||
using Dalamud.Game.Addon.Lifecycle.AddonArgTypes;
|
||||
|
||||
namespace AetherBags.AddonLifecycles;
|
||||
|
||||
public class InventoryLifecycles : IDisposable
|
||||
{
|
||||
|
||||
public InventoryLifecycles()
|
||||
{
|
||||
Services.AddonLifecycle.RegisterListener(AddonEvent.PreOpen, ["Inventory", "InventoryLarge", "InventoryExpansion"], HandleInventorySetup);
|
||||
Services.Logger.Verbose("InventoryLifecycles initialized");
|
||||
}
|
||||
|
||||
private void HandleInventorySetup(AddonEvent type, AddonArgs args)
|
||||
{
|
||||
Services.Logger.Debug("HandleInventorySetup called");
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Services.AddonLifecycle.UnregisterListener(AddonEvent.PreOpen, ["Inventory", "InventoryLarge", "InventoryExpansion"]);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
using System;
|
||||
using Dalamud.Hooking;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
using FFXIVClientStructs.FFXIV.Client.UI;
|
||||
using FFXIVClientStructs.FFXIV.Client.UI.Agent;
|
||||
|
||||
namespace AetherBags.Hooks;
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
// FIX: Manually expose the pointers that are 'internal' in KamiToolKit
|
||||
// We access the raw AtkComponentNode* via 'this.ResNode' and cast from there.
|
||||
private new AtkComponentDragDrop* Component => (AtkComponentDragDrop*)this.InternalComponentNode->Component;
|
||||
private new AtkComponentDragDrop* Component => (AtkComponentDragDrop*)Node->Component;
|
||||
private new AtkUldComponentDataDragDrop* Data => (AtkUldComponentDataDragDrop*)Component->UldManager.ComponentData;
|
||||
|
||||
public readonly ImageNode DragDropBackgroundNode;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Numerics;
|
||||
using AetherBags.AddonLifecycles;
|
||||
using AetherBags.Addons;
|
||||
using AetherBags.Helpers;
|
||||
using AetherBags.Hooks;
|
||||
@@ -16,6 +17,7 @@ public unsafe class Plugin : IDalamudPlugin
|
||||
private static string HelpDescription => "Opens your inventory.";
|
||||
|
||||
private readonly InventoryHooks _inventoryHooks;
|
||||
private readonly InventoryLifecycles _inventoryLifecycles;
|
||||
|
||||
public Plugin(IDalamudPluginInterface pluginInterface)
|
||||
{
|
||||
@@ -64,6 +66,7 @@ public unsafe class Plugin : IDalamudPlugin
|
||||
}
|
||||
|
||||
_inventoryHooks = new InventoryHooks();
|
||||
_inventoryLifecycles = new InventoryLifecycles();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
@@ -82,6 +85,7 @@ public unsafe class Plugin : IDalamudPlugin
|
||||
KamiToolKitLibrary.Dispose();
|
||||
|
||||
_inventoryHooks.Dispose();
|
||||
_inventoryLifecycles.Dispose();
|
||||
}
|
||||
|
||||
private void OnCommand(string command, string args)
|
||||
|
||||
+1
-1
Submodule KamiToolKit updated: 9519b07c8d...2122482f0d
Reference in New Issue
Block a user