diff --git a/HSUI.csproj b/HSUI.csproj index 87c6fbd..ac94287 100644 --- a/HSUI.csproj +++ b/HSUI.csproj @@ -9,9 +9,9 @@ HSUI - 1.0.8.8 - 1.0.8.8 - 1.0.8.8 + 1.0.8.9 + 1.0.8.9 + 1.0.8.9 diff --git a/HSUI.json b/HSUI.json index 8efb16b..1b685f1 100644 --- a/HSUI.json +++ b/HSUI.json @@ -2,7 +2,7 @@ "Author": "Knack117", "Name": "HSUI", "InternalName": "HSUI", - "AssemblyVersion": "1.0.8.8", + "AssemblyVersion": "1.0.8.9", "Description": "HSUI provides a highly configurable HUD replacement for FFXIV, recreated from DelvUI using KamiToolKit, FFXIVClientStructs, and Dalamud. Features unit frames, castbars, job gauges, nameplates, party frames, status effects, enemy list, configurable hotbars with drag-and-drop, and profiles.", "ApplicableVersion": "any", "RepoUrl": "https://github.com/Knack117/HSUI", diff --git a/Helpers/ActionBarsManager.cs b/Helpers/ActionBarsManager.cs index 456e9a7..4cdab47 100644 --- a/Helpers/ActionBarsManager.cs +++ b/Helpers/ActionBarsManager.cs @@ -116,22 +116,35 @@ namespace HSUI.Helpers continue; } - if (slot->IsEmpty) + // GearSet with id 0 is valid (first gearset); the game's IsEmpty (CommandId == 0) would wrongly treat it as empty. + bool isEmpty = slot->IsEmpty && slot->CommandType != RaptureHotbarModule.HotbarSlotType.GearSet; + if (isEmpty) { list.Add(new SlotInfo(0, true, false, 0, 0, 0, 0, keybind, 0, 0)); continue; } + // Use CommandType/CommandId for GearSet so we handle gearset 0 and slots not yet synced to Apparent*. + var slotType = slot->CommandType == RaptureHotbarModule.HotbarSlotType.GearSet + ? RaptureHotbarModule.HotbarSlotType.GearSet + : slot->ApparentSlotType; + uint actionId = slot->CommandType == RaptureHotbarModule.HotbarSlotType.GearSet + ? slot->CommandId + : slot->ApparentActionId; + // For GearSet slots, refresh IconId from the gearset (e.g. job icon from first equipment slot). - // Only call for already-synced GearSet slots: calling LoadIconId() on other types or before the - // game has synced a just-dropped slot can prevent the drop from sticking. - if (slot->ApparentSlotType == RaptureHotbarModule.HotbarSlotType.GearSet) + if (slotType == RaptureHotbarModule.HotbarSlotType.GearSet) slot->LoadIconId(); - bool usable = slot->IsSlotUsable(slot->ApparentSlotType, slot->ApparentActionId); + bool usable = slot->IsSlotUsable(slotType, actionId); uint iconId = slot->IconId; - uint actionId = slot->ApparentActionId; - var slotType = slot->ApparentSlotType; + // GearSet 0 or just-dropped: game may not have synced Apparent* so IconId can be 0; resolve for display. + if (slotType == RaptureHotbarModule.HotbarSlotType.GearSet && iconId == 0) + { + int resolved = slot->GetIconIdForSlot(slotType, actionId); + if (resolved > 0) + iconId = (uint)resolved; + } (int pct, int secsLeft) = GetSlotCooldown(slot); (int currentCharges, int maxCharges) = GetSlotCharges(slotType, actionId); diff --git a/changelog.md b/changelog.md index 79d792e..775dd3f 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,6 @@ +# 1.0.8.9 +- **Hotbars**: Gearset on slot now persists — do not treat slot as empty when CommandType is GearSet (gearset index 0 uses CommandId 0). Use CommandType/CommandId for GearSet display and resolve icon when IconId is still 0. + # 1.0.8.8 - **Hotbars**: Only refresh icon via LoadIconId() for GearSet slots so drag-and-drop of gearsets onto the bar works again. - **Hotbars**: Allow gearset index 0 (top-most gearset in list) — drop validation and icon lookup now accept id 0 for GearSet type. diff --git a/pluginmaster.json b/pluginmaster.json index 66a373a..7f52fc6 100644 --- a/pluginmaster.json +++ b/pluginmaster.json @@ -1 +1 @@ -[{"Author":"Knack117","Name":"HSUI","Punchline":"A modern HUD replacement built for customization.","Description":"HSUI provides a highly configurable HUD replacement for FFXIV, recreated from DelvUI using KamiToolKit, FFXIVClientStructs, and Dalamud. Features unit frames, castbars, job gauges, nameplates, party frames, status effects, enemy list, configurable hotbars with drag-and-drop, and profiles.","Changelog":"1.0.8.8: Gearset drag-drop fix; allow first gearset (index 0) on bar. 1.0.8.7: Fixed Gearset/Job Gear Set icon clearing when first equipment slot changes. 1.0.8.6: Crafting action tooltips now show full description instead of action name. 1.0.8.4: Alliance Frames 1 and 2 fix in raids; crafting action tooltips; Hide in duty no longer hides alliance frames. 1.0.8.3: Fix left-click staying broken after disable. 1.0.8.2: Charge icons stay lit until all charges spent.","InternalName":"HSUI","AssemblyVersion":"1.0.8.8","RepoUrl":"http://brassnet.ddns.net:33983/KnackAtNite/HSUI","ApplicableVersion":"any","Tags":["UI","HUD","Unit Frames","Nameplates","Party Frames","Hotbars"],"CategoryTags":["UI"],"DalamudApiLevel":14,"IconUrl":"http://brassnet.ddns.net:33983/KnackAtNite/HSUI/raw/branch/main/Media/Images/icon.png","ImageUrls":[],"DownloadLinkInstall":"http://brassnet.ddns.net:33983/KnackAtNite/HSUI/releases/download/v1.0.8.8/latest.zip","IsHide":false,"IsTestingExclusive":false,"DownloadLinkTesting":"http://brassnet.ddns.net:33983/KnackAtNite/HSUI/releases/download/v1.0.8.8/latest.zip","DownloadLinkUpdate":"http://brassnet.ddns.net:33983/KnackAtNite/HSUI/releases/download/v1.0.8.8/latest.zip","LastUpdate":"1739232000"}] +[{"Author":"Knack117","Name":"HSUI","Punchline":"A modern HUD replacement built for customization.","Description":"HSUI provides a highly configurable HUD replacement for FFXIV, recreated from DelvUI using KamiToolKit, FFXIVClientStructs, and Dalamud. Features unit frames, castbars, job gauges, nameplates, party frames, status effects, enemy list, configurable hotbars with drag-and-drop, and profiles.","Changelog":"1.0.8.9: Gearset persists on slot (fix CommandId 0 treated as empty). 1.0.8.8: Gearset drag-drop fix; allow first gearset (index 0) on bar. 1.0.8.7: Fixed Gearset/Job Gear Set icon clearing when first equipment slot changes. 1.0.8.6: Crafting action tooltips now show full description instead of action name. 1.0.8.4: Alliance Frames 1 and 2 fix in raids; crafting action tooltips; Hide in duty no longer hides alliance frames. 1.0.8.3: Fix left-click staying broken after disable. 1.0.8.2: Charge icons stay lit until all charges spent.","InternalName":"HSUI","AssemblyVersion":"1.0.8.9","RepoUrl":"http://brassnet.ddns.net:33983/KnackAtNite/HSUI","ApplicableVersion":"any","Tags":["UI","HUD","Unit Frames","Nameplates","Party Frames","Hotbars"],"CategoryTags":["UI"],"DalamudApiLevel":14,"IconUrl":"http://brassnet.ddns.net:33983/KnackAtNite/HSUI/raw/branch/main/Media/Images/icon.png","ImageUrls":[],"DownloadLinkInstall":"http://brassnet.ddns.net:33983/KnackAtNite/HSUI/releases/download/v1.0.8.9/latest.zip","IsHide":false,"IsTestingExclusive":false,"DownloadLinkTesting":"http://brassnet.ddns.net:33983/KnackAtNite/HSUI/releases/download/v1.0.8.9/latest.zip","DownloadLinkUpdate":"http://brassnet.ddns.net:33983/KnackAtNite/HSUI/releases/download/v1.0.8.9/latest.zip","LastUpdate":"1739318400"}]