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 System;
|
||||||
using Dalamud.Hooking;
|
using Dalamud.Hooking;
|
||||||
using FFXIVClientStructs.FFXIV.Client.Game;
|
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||||
|
using FFXIVClientStructs.FFXIV.Client.UI;
|
||||||
|
using FFXIVClientStructs.FFXIV.Client.UI.Agent;
|
||||||
|
|
||||||
namespace AetherBags.Hooks;
|
namespace AetherBags.Hooks;
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
// FIX: Manually expose the pointers that are 'internal' in KamiToolKit
|
// FIX: Manually expose the pointers that are 'internal' in KamiToolKit
|
||||||
// We access the raw AtkComponentNode* via 'this.ResNode' and cast from there.
|
// 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;
|
private new AtkUldComponentDataDragDrop* Data => (AtkUldComponentDataDragDrop*)Component->UldManager.ComponentData;
|
||||||
|
|
||||||
public readonly ImageNode DragDropBackgroundNode;
|
public readonly ImageNode DragDropBackgroundNode;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
|
using AetherBags.AddonLifecycles;
|
||||||
using AetherBags.Addons;
|
using AetherBags.Addons;
|
||||||
using AetherBags.Helpers;
|
using AetherBags.Helpers;
|
||||||
using AetherBags.Hooks;
|
using AetherBags.Hooks;
|
||||||
@@ -16,6 +17,7 @@ public unsafe class Plugin : IDalamudPlugin
|
|||||||
private static string HelpDescription => "Opens your inventory.";
|
private static string HelpDescription => "Opens your inventory.";
|
||||||
|
|
||||||
private readonly InventoryHooks _inventoryHooks;
|
private readonly InventoryHooks _inventoryHooks;
|
||||||
|
private readonly InventoryLifecycles _inventoryLifecycles;
|
||||||
|
|
||||||
public Plugin(IDalamudPluginInterface pluginInterface)
|
public Plugin(IDalamudPluginInterface pluginInterface)
|
||||||
{
|
{
|
||||||
@@ -64,6 +66,7 @@ public unsafe class Plugin : IDalamudPlugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
_inventoryHooks = new InventoryHooks();
|
_inventoryHooks = new InventoryHooks();
|
||||||
|
_inventoryLifecycles = new InventoryLifecycles();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
@@ -82,6 +85,7 @@ public unsafe class Plugin : IDalamudPlugin
|
|||||||
KamiToolKitLibrary.Dispose();
|
KamiToolKitLibrary.Dispose();
|
||||||
|
|
||||||
_inventoryHooks.Dispose();
|
_inventoryHooks.Dispose();
|
||||||
|
_inventoryLifecycles.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnCommand(string command, string args)
|
private void OnCommand(string command, string args)
|
||||||
|
|||||||
+1
-1
Submodule KamiToolKit updated: 9519b07c8d...2122482f0d
Reference in New Issue
Block a user