Initial commit: AetherBags + KamiToolKit for FC Gitea
Debug Build and Test / Build against Latest Dalamud (push) Has been cancelled
Debug Build and Test / Build against Staging Dalamud (push) Has been cancelled

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-02-08 14:46:31 -05:00
commit 8db4ce6094
375 changed files with 34124 additions and 0 deletions
@@ -0,0 +1,40 @@
using System;
using FFXIVClientStructs.FFXIV.Client.UI;
namespace KamiToolKit.Controllers;
public abstract unsafe class AddonEventController<T> where T : unmanaged {
protected AddonEventController() {
if (typeof(T) == typeof(AddonNamePlate)) {
throw new NotSupportedException("Attaching to NamePlate is not supported. Use OverlayController.");
}
}
public delegate void AddonControllerEvent(T* addon);
public event AddonControllerEvent? OnAttach {
add => OnInnerAttach += value;
remove => throw new Exception("Do not remove events, on dispose addon state will be managed properly.");
}
public event AddonControllerEvent? OnDetach {
add => OnInnerDetach += value;
remove => throw new Exception("Do not remove events, on dispose addon state will be managed properly.");
}
public event AddonControllerEvent? OnRefresh {
add => OnInnerRefresh += value;
remove => throw new Exception("Do not remove events, on dispose addon state will be managed properly.");
}
public event AddonControllerEvent? OnUpdate {
add => OnInnerUpdate += value;
remove => throw new Exception("Do not remove events, on dispose addon state will be managed properly.");
}
protected AddonControllerEvent? OnInnerAttach;
protected AddonControllerEvent? OnInnerDetach;
protected AddonControllerEvent? OnInnerRefresh;
protected AddonControllerEvent? OnInnerUpdate;
}