diff --git a/AetherBags/Nodes/Configuration/General/FunctionalConfigurationNode.cs b/AetherBags/Nodes/Configuration/General/FunctionalConfigurationNode.cs index 7124ce1..2fb89a9 100644 --- a/AetherBags/Nodes/Configuration/General/FunctionalConfigurationNode.cs +++ b/AetherBags/Nodes/Configuration/General/FunctionalConfigurationNode.cs @@ -2,6 +2,7 @@ using System; using System.Linq; using System.Numerics; using AetherBags.Configuration; +using AetherBags.Nodes.Input; using FFXIVClientStructs.FFXIV.Component.GUI; using KamiToolKit.Nodes; diff --git a/AetherBags/Nodes/Input/LabeledDropdownNode.cs b/AetherBags/Nodes/Input/LabeledDropdownNode.cs index 216eb58..e2149c5 100644 --- a/AetherBags/Nodes/Input/LabeledDropdownNode.cs +++ b/AetherBags/Nodes/Input/LabeledDropdownNode.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using FFXIVClientStructs.FFXIV.Component.GUI; using KamiToolKit.Nodes; -namespace AetherBags.Nodes; +namespace AetherBags.Nodes.Input; public class LabeledDropdownNode : SimpleComponentNode { private readonly GridNode _gridNode; diff --git a/AetherBags/Nodes/Inventory/InventoryCategoryNode.cs b/AetherBags/Nodes/Inventory/InventoryCategoryNode.cs index e2565fd..0be20cf 100644 --- a/AetherBags/Nodes/Inventory/InventoryCategoryNode.cs +++ b/AetherBags/Nodes/Inventory/InventoryCategoryNode.cs @@ -224,7 +224,10 @@ public class InventoryCategoryNode : SimpleComponentNode InventoryItem item = data.Item; InventoryMappedLocation visualLocation = data.VisualLocation; - bool useVisualLocation = item.Container.IsMainInventory; + int startIndex = item.Container.GetInventoryStartIndex; + int absoluteIndex = startIndex + visualLocation.Slot; + + bool useVisualLocation = true; bool isSlotBlocked = item.Container.IsMainInventory && data.IsSlotBlocked; float alpha = !isSlotBlocked && data.IsEligibleForContext ? 1.0f : 0.4f; @@ -241,6 +244,7 @@ public class InventoryCategoryNode : SimpleComponentNode Type = DragDropType.Item, Int1 = useVisualLocation ? visualLocation.Container : (int)item.Container, Int2 = useVisualLocation ? visualLocation.Slot : item.Slot, + ReferenceIndex = (short)absoluteIndex, }, IsClickable = true, OnDiscard = node => OnDiscard(node, data), @@ -271,7 +275,7 @@ public class InventoryCategoryNode : SimpleComponentNode private void OnPayloadAccepted(DragDropNode node, DragDropPayload payload, ItemInfo targetItemInfo) { InventoryItem item = targetItemInfo.Item; - if (! payload.IsValidInventoryPayload) + if (!payload.IsValidInventoryPayload) { Services.Logger.Warning($"[OnPayload] Invalid payload type: {payload.Type}"); return; @@ -282,7 +286,7 @@ public class InventoryCategoryNode : SimpleComponentNode InventoryLocation sourceLocation = payload.InventoryLocation; - if (! sourceLocation.IsValid) + if (!sourceLocation.IsValid) { Services.Logger. Warning($"[OnPayload] Could not resolve source from payload"); return;