Don't subscribe to atkarray
This commit is contained in:
@@ -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;
|
||||||
|
|
||||||
|
|||||||
@@ -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)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user