forked from aly/qstbak
muffin v7.5.6
This commit is contained in:
parent
6266f9e6b7
commit
addf2d530f
619 changed files with 264792 additions and 446022 deletions
58
LLib/LLib.Gear/EquipmentSlots.cs
Normal file
58
LLib/LLib.Gear/EquipmentSlots.cs
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
|
||||
namespace LLib.Gear;
|
||||
|
||||
public static class EquipmentSlots
|
||||
{
|
||||
public const int Count = 13;
|
||||
|
||||
public const int BeltIndex = 5;
|
||||
|
||||
public unsafe static InventoryContainer* GetEquippedContainer()
|
||||
{
|
||||
InventoryManager* ptr = InventoryManager.Instance();
|
||||
int num = ((ptr != null) ? (-579848400) : (-579848397));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -579848398;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0049;
|
||||
case 1:
|
||||
return null;
|
||||
case 2:
|
||||
return ptr->GetInventoryContainer(InventoryType.EquippedItems);
|
||||
}
|
||||
continue;
|
||||
IL_0049:
|
||||
num = -579848397;
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe static bool TryGetEquippedItem(InventoryContainer* container, int slotIndex, out InventoryItem* item)
|
||||
{
|
||||
item = container->GetInventorySlot(slotIndex);
|
||||
int num = ((item == null) ? 365336456 : 365336459);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 365336458;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_004d;
|
||||
case 2:
|
||||
return false;
|
||||
case 1:
|
||||
return item->ItemId != 0;
|
||||
}
|
||||
continue;
|
||||
IL_004d:
|
||||
num = 365336459;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue