62 lines
1.2 KiB
C#
62 lines
1.2 KiB
C#
using FFXIVClientStructs.FFXIV.Client.Game.UI;
|
|
using FFXIVClientStructs.FFXIV.Client.UI.Agent;
|
|
|
|
namespace LLib.GameData;
|
|
|
|
public static class GrandCompanyHelper
|
|
{
|
|
public static GrandCompany GetGrandCompany()
|
|
{
|
|
return (GrandCompany)GetGrandCompanyId();
|
|
}
|
|
|
|
public unsafe static byte GetGrandCompanyId()
|
|
{
|
|
PlayerState* ptr = PlayerState.Instance();
|
|
int num = ((ptr != null) ? (-333040930) : (-333040931));
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = -333040929;
|
|
int num4 = num2;
|
|
int num5 = num4 + num3;
|
|
int num6 = num4 & num3;
|
|
switch (num5 - (num6 + num6))
|
|
{
|
|
case 0:
|
|
goto IL_004b;
|
|
case 1:
|
|
return ptr->GrandCompany;
|
|
case 2:
|
|
return 0;
|
|
}
|
|
continue;
|
|
IL_004b:
|
|
num = -333040931;
|
|
}
|
|
}
|
|
|
|
public unsafe static byte GetGrandCompanyRank()
|
|
{
|
|
PlayerState* ptr = PlayerState.Instance();
|
|
int num = ((ptr != null) ? 871865385 : 871865386);
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = 871865387;
|
|
int num4 = num2;
|
|
switch ((num4 | num3) - (num4 & num3))
|
|
{
|
|
case 0:
|
|
goto IL_0049;
|
|
case 2:
|
|
return ptr->GetGrandCompanyRank();
|
|
case 1:
|
|
return 0;
|
|
}
|
|
continue;
|
|
IL_0049:
|
|
num = 871865386;
|
|
}
|
|
}
|
|
}
|