muffin v7.5.6
This commit is contained in:
parent
6266f9e6b7
commit
addf2d530f
619 changed files with 264792 additions and 446022 deletions
89
LLib/LLib.Gear/GearsetHelper.cs
Normal file
89
LLib/LLib.Gear/GearsetHelper.cs
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
using FFXIVClientStructs.FFXIV.Client.UI.Misc;
|
||||
|
||||
namespace LLib.Gear;
|
||||
|
||||
public static class GearsetHelper
|
||||
{
|
||||
public unsafe static int GetCurrentGearsetIndex()
|
||||
{
|
||||
RaptureGearsetModule* ptr = RaptureGearsetModule.Instance();
|
||||
int num = ((ptr != null) ? (-1692442216) : (-1692442213));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1692442214;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0049;
|
||||
case 1:
|
||||
return -1;
|
||||
case 2:
|
||||
return ptr->CurrentGearsetIndex;
|
||||
}
|
||||
continue;
|
||||
IL_0049:
|
||||
num = -1692442213;
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe static bool TryEquipGearset(int gearsetIndex)
|
||||
{
|
||||
RaptureGearsetModule* ptr = RaptureGearsetModule.Instance();
|
||||
int num = ((ptr == null) ? 231059237 : 231059236);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 231059239;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
ptr->EquipGearset(gearsetIndex, 0);
|
||||
return true;
|
||||
case 1:
|
||||
num = (ptr->IsValidGearset(gearsetIndex) ? 231059239 : 231059237);
|
||||
break;
|
||||
case 2:
|
||||
return false;
|
||||
case 3:
|
||||
num = ((gearsetIndex < 0) ? 231059237 : 231059238);
|
||||
break;
|
||||
case 4:
|
||||
num = 231059236;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe static byte GetGearsetClassJob(int gearsetIndex)
|
||||
{
|
||||
RaptureGearsetModule* ptr = RaptureGearsetModule.Instance();
|
||||
int num = ((ptr == null) ? (-76399401) : (-76399403));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -76399402;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 1:
|
||||
return 0;
|
||||
case 2:
|
||||
num = (ptr->IsValidGearset(gearsetIndex) ? (-76399406) : (-76399401));
|
||||
break;
|
||||
case 4:
|
||||
return ptr->GetGearset(gearsetIndex)->ClassJob;
|
||||
case 0:
|
||||
num = -76399403;
|
||||
break;
|
||||
case 3:
|
||||
num = ((gearsetIndex < 0) ? (-76399401) : (-76399404));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue