qstbak/LLib/LLib.Gear/GearsetHelper.cs
2026-08-17 20:29:32 +10:00

37 lines
872 B
C#

using FFXIVClientStructs.FFXIV.Client.UI.Misc;
namespace LLib.Gear;
public static class GearsetHelper
{
public unsafe static int GetCurrentGearsetIndex()
{
RaptureGearsetModule* ptr = RaptureGearsetModule.Instance();
if (ptr == null)
{
return -1;
}
return ptr->CurrentGearsetIndex;
}
public unsafe static bool TryEquipGearset(int gearsetIndex)
{
RaptureGearsetModule* ptr = RaptureGearsetModule.Instance();
if (ptr == null || gearsetIndex < 0 || !ptr->IsValidGearset(gearsetIndex))
{
return false;
}
ptr->EquipGearset(gearsetIndex, 0);
return true;
}
public unsafe static byte GetGearsetClassJob(int gearsetIndex)
{
RaptureGearsetModule* ptr = RaptureGearsetModule.Instance();
if (ptr == null || gearsetIndex < 0 || !ptr->IsValidGearset(gearsetIndex))
{
return 0;
}
return ptr->GetGearset(gearsetIndex)->ClassJob;
}
}