v1.0.3.0: Alliance frames fixes, PvP support, shared hotbar persistence, config save on teleport

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-01-31 20:35:25 -05:00
parent bda3762ac8
commit 11b4c268f0
17 changed files with 1145 additions and 77 deletions
+16 -3
View File
@@ -274,8 +274,8 @@ namespace HSUI.Helpers
slotPtrB->LoadIconId();
if (typeA == RaptureHotbarModule.HotbarSlotType.Item)
slotPtrB->LoadCostDataForSlot(true);
module->SetAndSaveSlot((uint)(barA - 1), (uint)a, typeB, idB);
module->SetAndSaveSlot((uint)(barB - 1), (uint)b, typeA, idA);
SetAndSaveSlotInternal(module, (uint)(barA - 1), (uint)a, typeB, idB, slotPtrA);
SetAndSaveSlotInternal(module, (uint)(barB - 1), (uint)b, typeA, idA, slotPtrB);
// Read back to verify
slotPtrA = module->GetSlotById((uint)(barA - 1), (uint)a);
@@ -509,8 +509,21 @@ namespace HSUI.Helpers
slotPtr->Set(RaptureHotbarModule.HotbarSlotType.Empty, 0);
slotPtr->LoadIconId();
}
module->SetAndSaveSlot((uint)barIdx, (uint)slot, RaptureHotbarModule.HotbarSlotType.Empty, 0);
SetAndSaveSlotInternal(module, (uint)barIdx, (uint)slot, RaptureHotbarModule.HotbarSlotType.Empty, 0, slotPtr);
return true;
}
/// <summary>Sets a slot and persists to disk. For shared hotbars, explicitly writes to classJobId 0 to ensure persistence across job changes and teleports.</summary>
public static unsafe void SetAndSaveSlotInternal(RaptureHotbarModule* module, uint barId, uint slotId, RaptureHotbarModule.HotbarSlotType slotType, uint commandId, RaptureHotbarModule.HotbarSlot* slotPtr = null)
{
var ptr = slotPtr != null ? slotPtr : module->GetSlotById(barId, slotId);
if (module->IsHotbarShared(barId) && ptr != null)
{
// Shared hotbars: explicitly write to classJobId 0 (shared storage) for correct persistence across teleports/job changes
module->WriteSavedSlot(0, barId, slotId, ptr, false, false);
}
// SetAndSaveSlot triggers file save; for shared bars also ensures save is queued (WriteSavedSlot may only update _savedHotbars)
module->SetAndSaveSlot(barId, slotId, slotType, commandId, ignoreSharedHotbars: false, allowSaveToPvP: true);
}
}
}