Don't subscribe to atkarray

This commit is contained in:
Zeffuro
2026-01-11 06:06:59 +01:00
parent 6d15ee1b13
commit 82b9d96335
3 changed files with 10 additions and 2 deletions
+1 -1
View File
@@ -79,7 +79,7 @@ public unsafe class AddonInventoryWindow : InventoryAddonBase
LayoutContent(); LayoutContent();
addon->SubscribeAtkArrayData(1, (int)NumberArrayType.Inventory); //addon->SubscribeAtkArrayData(1, (int)NumberArrayType.Inventory);
System.LootedItemsTracker.OnLootedItemsChanged += OnLootedItemsChanged; System.LootedItemsTracker.OnLootedItemsChanged += OnLootedItemsChanged;
+2
View File
@@ -425,6 +425,7 @@ public abstract unsafe class InventoryAddonBase : NativeAddon, IInventoryWindow
} }
} }
/*
protected override void OnRequestedUpdate(AtkUnitBase* addon, NumberArrayData** numberArrayData, StringArrayData** stringArrayData) protected override void OnRequestedUpdate(AtkUnitBase* addon, NumberArrayData** numberArrayData, StringArrayData** stringArrayData)
{ {
_requestedUpdateCount++; _requestedUpdateCount++;
@@ -438,6 +439,7 @@ public abstract unsafe class InventoryAddonBase : NativeAddon, IInventoryWindow
InventoryState.RefreshFromGame(); InventoryState.RefreshFromGame();
RefreshCategoriesCore(autosize: true); RefreshCategoriesCore(autosize: true);
} }
*/
protected override void OnSetup(AtkUnitBase* addon) protected override void OnSetup(AtkUnitBase* addon)
{ {
@@ -69,7 +69,13 @@ public abstract class InventoryStateBase
bool allaganCategoriesEnabled = config.Categories.AllaganToolsCategoriesEnabled && categoriesEnabled; bool allaganCategoriesEnabled = config.Categories.AllaganToolsCategoriesEnabled && categoriesEnabled;
bool bisCategoriesEnabled = config.Categories.BisBuddyEnabled && categoriesEnabled; bool bisCategoriesEnabled = config.Categories.BisBuddyEnabled && categoriesEnabled;
// TODO: Cache this when config changes // TODO: Cache this when config changes
var userCategories = config.Categories.UserCategories.Where(c => c.Enabled).ToList(); UserCategoriesSortedScratch.Clear();
foreach (var cat in config.Categories. UserCategories)
{
if (cat.Enabled)
UserCategoriesSortedScratch.Add(cat);
}
var userCategories = UserCategoriesSortedScratch;
if (userCategoriesEnabled && userCategories.Count > 0) if (userCategoriesEnabled && userCategories.Count > 0)
{ {