750 lines
20 KiB
C#
750 lines
20 KiB
C#
using System.Runtime.CompilerServices;
|
|
using Dalamud.Plugin.Services;
|
|
using FFXIVClientStructs.FFXIV.Component.GUI;
|
|
using LLib.GameData;
|
|
using LLib.GameUI;
|
|
using Lumina.Excel.Sheets;
|
|
|
|
namespace LLib.Shop;
|
|
|
|
public static class GcSupplyActions
|
|
{
|
|
private const string SelectStringAddon = "SelectString";
|
|
|
|
private const string SupplyListAddon = "GrandCompanySupplyList";
|
|
|
|
private const string SupplyRewardAddon = "GrandCompanySupplyReward";
|
|
|
|
private const string SelectYesnoAddon = "SelectYesno";
|
|
|
|
private const int ListRowSealRewardBase = 265;
|
|
|
|
private const int ListRowItemIdBase = 425;
|
|
|
|
public const int MaxListRows = 40;
|
|
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
public unsafe static bool IsSelectStringReady(IGameGui gameGui)
|
|
{
|
|
AtkUnitBase* addonPtr;
|
|
int num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(1633169237), out addonPtr) ? 1661521836 : 1661521839);
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = 1661521838;
|
|
int num4 = num2;
|
|
int num5 = num4 + num3;
|
|
int num6 = num4 & num3;
|
|
switch (num5 - (num6 + num6))
|
|
{
|
|
case 0:
|
|
goto IL_0054;
|
|
case 1:
|
|
return false;
|
|
case 2:
|
|
return LAddon.IsAddonReady(addonPtr);
|
|
}
|
|
continue;
|
|
IL_0054:
|
|
num = 1661521839;
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
public unsafe static bool TrySelectStringOption(IGameGui gameGui, int index)
|
|
{
|
|
AtkUnitBase* addonPtr;
|
|
int num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(-223032717), out addonPtr) ? (-1381192086) : (-1381192087));
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = -1381192088;
|
|
int num4 = num2;
|
|
int num5 = num4 + num3;
|
|
int num6 = num4 & num3;
|
|
switch (num5 - (num6 + num6))
|
|
{
|
|
case 2:
|
|
num = (LAddon.IsAddonReady(addonPtr) ? (-1381192088) : (-1381192085));
|
|
break;
|
|
case 1:
|
|
return false;
|
|
case 0:
|
|
AddonCallback.Fire(addonPtr, index);
|
|
return true;
|
|
case 3:
|
|
return false;
|
|
case 4:
|
|
num = -1381192087;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
public unsafe static bool TryCloseSelectString(IGameGui gameGui)
|
|
{
|
|
AtkUnitBase* addonPtr;
|
|
int num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(-223032717), out addonPtr) ? (-378189346) : (-378189345));
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = -378189346;
|
|
int num4 = num2;
|
|
int num5 = num4 + num3;
|
|
int num6 = num4 & num3;
|
|
switch (num5 - (num6 + num6))
|
|
{
|
|
case 0:
|
|
AddonCallback.Fire(addonPtr, -1);
|
|
return true;
|
|
case 1:
|
|
return false;
|
|
case 2:
|
|
goto IL_0068;
|
|
}
|
|
continue;
|
|
IL_0068:
|
|
num = -378189345;
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
public unsafe static bool IsSupplyListReady(IGameGui gameGui)
|
|
{
|
|
AtkUnitBase* addonPtr;
|
|
int num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-1021783127), out addonPtr) ? 1360876237 : 1360876238);
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = 1360876236;
|
|
int num4 = num2;
|
|
switch ((num4 | num3) - (num4 & num3))
|
|
{
|
|
case 1:
|
|
return LAddon.IsAddonReady(addonPtr);
|
|
case 2:
|
|
return false;
|
|
case 0:
|
|
goto IL_005b;
|
|
}
|
|
continue;
|
|
IL_005b:
|
|
num = 1360876238;
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
public unsafe static bool TrySwitchToExpertTab(IGameGui gameGui)
|
|
{
|
|
AtkUnitBase* addonPtr;
|
|
int num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-1021783127), out addonPtr) ? (-1935915101) : (-1935915100));
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = -1935915097;
|
|
int num4 = num2;
|
|
switch ((num4 | num3) - (num4 & num3))
|
|
{
|
|
case 0:
|
|
AddonCallback.Fire(addonPtr, 0, 2, 0);
|
|
return true;
|
|
case 4:
|
|
num = (LAddon.IsAddonReady(addonPtr) ? (-1935915097) : (-1935915098));
|
|
break;
|
|
case 3:
|
|
return false;
|
|
case 2:
|
|
num = -1935915100;
|
|
break;
|
|
case 1:
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
|
|
private unsafe static bool IsListLoaded(AtkUnitBase* addon)
|
|
{
|
|
AtkValue atkValues = *addon->AtkValues;
|
|
AtkValueType type = atkValues.Type;
|
|
int num = ((type == AtkValueType.Int) ? 440834222 : 440834223);
|
|
bool result = default(bool);
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = 440834218;
|
|
int num4 = num2;
|
|
switch ((num4 | num3) - (num4 & num3))
|
|
{
|
|
case 0:
|
|
num = 440834223;
|
|
break;
|
|
case 4:
|
|
result = atkValues.Int == 2;
|
|
num = 440834217;
|
|
break;
|
|
case 1:
|
|
result = atkValues.UInt == 2;
|
|
num = 440834217;
|
|
break;
|
|
case 2:
|
|
result = false;
|
|
num = 440834217;
|
|
break;
|
|
case 3:
|
|
return result;
|
|
case 5:
|
|
num = ((type != AtkValueType.UInt) ? 440834216 : 440834219);
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
private unsafe static bool IsExpertTab(AtkUnitBase* addon)
|
|
{
|
|
AtkValue atkValue = addon->AtkValues[5];
|
|
AtkValueType type = atkValue.Type;
|
|
int num = ((type == AtkValueType.Int) ? (-1706563251) : (-1706563253));
|
|
bool result = default(bool);
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = -1706563256;
|
|
int num4 = num2;
|
|
switch ((num4 | num3) - (num4 & num3))
|
|
{
|
|
case 4:
|
|
result = atkValue.UInt == 2;
|
|
num = -1706563255;
|
|
break;
|
|
case 1:
|
|
return result;
|
|
case 0:
|
|
result = false;
|
|
num = -1706563255;
|
|
break;
|
|
case 2:
|
|
num = -1706563253;
|
|
break;
|
|
case 5:
|
|
result = atkValue.Int == 2;
|
|
num = -1706563255;
|
|
break;
|
|
case 3:
|
|
num = ((type != AtkValueType.UInt) ? (-1706563256) : (-1706563252));
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
public unsafe static bool IsExpertTabActive(IGameGui gameGui)
|
|
{
|
|
AtkUnitBase* addonPtr;
|
|
int num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(-56578548), out addonPtr) ? (-429976172) : (-429976171));
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = -429976175;
|
|
int num4 = num2;
|
|
int num5 = num4 + num3;
|
|
int num6 = num4 & num3;
|
|
switch (num5 - (num6 + num6))
|
|
{
|
|
case 6:
|
|
num = ((addonPtr->AtkValuesCount >= 7) ? (-429976174) : (-429976173));
|
|
break;
|
|
case 4:
|
|
return false;
|
|
case 5:
|
|
num = (LAddon.IsAddonReady(addonPtr) ? (-429976176) : (-429976170));
|
|
break;
|
|
case 7:
|
|
return false;
|
|
case 3:
|
|
return IsExpertTab(addonPtr);
|
|
case 2:
|
|
return false;
|
|
case 0:
|
|
num = -429976171;
|
|
break;
|
|
case 1:
|
|
num = ((addonPtr->AtkValues == null) ? (-429976173) : (-429976169));
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
public unsafe static int GetListItemCount(IGameGui gameGui)
|
|
{
|
|
AtkUnitBase* addonPtr;
|
|
int num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(-791024633), out addonPtr) ? (-2072162579) : (-2072162586));
|
|
AtkValue atkValue = default(AtkValue);
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = -2072162587;
|
|
int num4 = num2;
|
|
switch ((num4 | num3) - (num4 & num3))
|
|
{
|
|
case 8:
|
|
num = (LAddon.IsAddonReady(addonPtr) ? (-2072162581) : (-2072162590));
|
|
break;
|
|
case 9:
|
|
num = ((addonPtr->AtkValuesCount >= 7) ? (-2072162589) : (-2072162577));
|
|
break;
|
|
case 0:
|
|
num = -2072162586;
|
|
break;
|
|
case 7:
|
|
return -1;
|
|
case 5:
|
|
return atkValue.Int;
|
|
case 10:
|
|
return -1;
|
|
case 11:
|
|
num = ((atkValue.Type != AtkValueType.UInt) ? (-2072162583) : (-2072162591));
|
|
break;
|
|
case 12:
|
|
return -1;
|
|
case 4:
|
|
return (int)atkValue.UInt;
|
|
case 14:
|
|
num = ((addonPtr->AtkValues == null) ? (-2072162577) : (-2072162580));
|
|
break;
|
|
case 3:
|
|
return -1;
|
|
case 13:
|
|
num = (IsExpertTab(addonPtr) ? (-2072162588) : (-2072162585));
|
|
break;
|
|
case 2:
|
|
return -1;
|
|
case 6:
|
|
num = ((!IsListLoaded(addonPtr)) ? (-2072162585) : (-2072162584));
|
|
break;
|
|
case 1:
|
|
atkValue = addonPtr->AtkValues[6];
|
|
num = ((atkValue.Type != AtkValueType.Int) ? (-2072162578) : (-2072162592));
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
public unsafe static uint GetListItemId(IGameGui gameGui, int itemIndex)
|
|
{
|
|
int num = ((itemIndex < 0) ? 157882237 : 157882223);
|
|
AtkValue atkValue = default(AtkValue);
|
|
AtkUnitBase* addonPtr = default(AtkUnitBase*);
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = 157882237;
|
|
int num4 = num2;
|
|
switch ((num4 | num3) - (num4 & num3))
|
|
{
|
|
case 12:
|
|
num = ((atkValue.Int <= 0) ? 157882235 : 157882226);
|
|
break;
|
|
case 3:
|
|
return atkValue.UInt;
|
|
case 5:
|
|
num = ((atkValue.Type != AtkValueType.Int) ? 157882235 : 157882225);
|
|
break;
|
|
case 14:
|
|
{
|
|
ushort atkValuesCount = addonPtr->AtkValuesCount;
|
|
num3 = itemIndex;
|
|
num4 = 425;
|
|
int num5 = num4 ^ num3;
|
|
int num6 = num4 & num3;
|
|
num = ((atkValuesCount > num5 + (num6 + num6)) ? 157882233 : 157882228);
|
|
break;
|
|
}
|
|
case 0:
|
|
return 0u;
|
|
case 15:
|
|
return (uint)atkValue.Int;
|
|
case 17:
|
|
return 0u;
|
|
case 18:
|
|
num = ((itemIndex < 40) ? 157882221 : 157882237);
|
|
break;
|
|
case 8:
|
|
num = 157882223;
|
|
break;
|
|
case 1:
|
|
num = ((addonPtr->AtkValues == null) ? 157882228 : 157882227);
|
|
break;
|
|
case 9:
|
|
return 0u;
|
|
case 13:
|
|
return 0u;
|
|
case 16:
|
|
num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(2078745431), out addonPtr) ? 157882239 : 157882231);
|
|
break;
|
|
case 2:
|
|
num = (LAddon.IsAddonReady(addonPtr) ? 157882236 : 157882224);
|
|
break;
|
|
case 6:
|
|
return 0u;
|
|
case 7:
|
|
num = (IsExpertTab(addonPtr) ? 157882230 : 157882220);
|
|
break;
|
|
case 11:
|
|
{
|
|
AtkValue* atkValues = addonPtr->AtkValues;
|
|
num3 = itemIndex;
|
|
num4 = 425;
|
|
int num7 = num4 ^ num3;
|
|
int num8 = num4 & num3;
|
|
atkValue = atkValues[num7 + (num8 + num8)];
|
|
num = ((atkValue.Type != AtkValueType.UInt) ? 157882232 : 157882238);
|
|
break;
|
|
}
|
|
case 10:
|
|
return 0u;
|
|
case 4:
|
|
num = ((!IsListLoaded(addonPtr)) ? 157882220 : 157882234);
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
public unsafe static int GetListItemSealReward(IGameGui gameGui, int itemIndex)
|
|
{
|
|
int num = ((itemIndex < 0) ? 942417142 : 942417140);
|
|
AtkUnitBase* addonPtr = default(AtkUnitBase*);
|
|
AtkValue atkValue = default(AtkValue);
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = 942417143;
|
|
int num4 = num2;
|
|
int num5 = num4 + num3;
|
|
int num6 = num4 & num3;
|
|
switch (num5 - (num6 + num6))
|
|
{
|
|
case 11:
|
|
return -1;
|
|
case 17:
|
|
num = ((!IsListLoaded(addonPtr)) ? 942417138 : 942417143);
|
|
break;
|
|
case 9:
|
|
{
|
|
ushort atkValuesCount = addonPtr->AtkValuesCount;
|
|
num3 = itemIndex;
|
|
num4 = 265;
|
|
num = ((atkValuesCount > (num4 | num3) + (num4 & num3)) ? 942417126 : 942417144);
|
|
break;
|
|
}
|
|
case 14:
|
|
return -1;
|
|
case 12:
|
|
num = 942417140;
|
|
break;
|
|
case 4:
|
|
num = ((addonPtr->AtkValues == null) ? 942417144 : 942417150);
|
|
break;
|
|
case 2:
|
|
return (int)atkValue.UInt;
|
|
case 3:
|
|
num = ((itemIndex < 40) ? 942417137 : 942417142);
|
|
break;
|
|
case 0:
|
|
num = (IsExpertTab(addonPtr) ? 942417151 : 942417138);
|
|
break;
|
|
case 16:
|
|
num = ((atkValue.Type != AtkValueType.UInt) ? 942417149 : 942417141);
|
|
break;
|
|
case 1:
|
|
return -1;
|
|
case 13:
|
|
return atkValue.Int;
|
|
case 7:
|
|
num = (LAddon.IsAddonReady(addonPtr) ? 942417139 : 942417145);
|
|
break;
|
|
case 5:
|
|
return -1;
|
|
case 15:
|
|
return -1;
|
|
case 6:
|
|
num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(2078745431), out addonPtr) ? 942417136 : 942417148);
|
|
break;
|
|
case 10:
|
|
return -1;
|
|
case 8:
|
|
{
|
|
AtkValue* atkValues = addonPtr->AtkValues;
|
|
num3 = itemIndex;
|
|
num4 = 265;
|
|
atkValue = atkValues[(num4 | num3) + (num4 & num3)];
|
|
num = ((atkValue.Type != AtkValueType.Int) ? 942417127 : 942417146);
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
public unsafe static bool TrySelectItem(IGameGui gameGui, int itemIndex)
|
|
{
|
|
AtkUnitBase* addonPtr;
|
|
int num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(2047037119), out addonPtr) ? 83215981 : 83215979);
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = 83215977;
|
|
int num4 = num2;
|
|
int num5 = num4 + num3;
|
|
int num6 = num4 & num3;
|
|
switch (num5 - (num6 + num6))
|
|
{
|
|
case 0:
|
|
num = 83215979;
|
|
break;
|
|
case 4:
|
|
num = (LAddon.IsAddonReady(addonPtr) ? 83215976 : 83215978);
|
|
break;
|
|
case 3:
|
|
return false;
|
|
case 1:
|
|
AddonCallback.Fire(addonPtr, 1, itemIndex, 0);
|
|
return true;
|
|
case 2:
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
public unsafe static bool TryForceRefresh(IGameGui gameGui)
|
|
{
|
|
AtkUnitBase* addonPtr;
|
|
int num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(2078745431), out addonPtr) ? 1468289263 : 1468289256);
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = 1468289259;
|
|
int num4 = num2;
|
|
switch ((num4 | num3) - (num4 & num3))
|
|
{
|
|
case 0:
|
|
num = 1468289256;
|
|
break;
|
|
case 3:
|
|
return false;
|
|
case 4:
|
|
num = (LAddon.IsAddonReady(addonPtr) ? 1468289258 : 1468289257);
|
|
break;
|
|
case 1:
|
|
AddonCallback.Fire(addonPtr, 2);
|
|
return true;
|
|
case 2:
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
public unsafe static bool TryCloseSupplyList(IGameGui gameGui)
|
|
{
|
|
AtkUnitBase* addonPtr;
|
|
int num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(-56578548), out addonPtr) ? (-131329648) : (-131329645));
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = -131329647;
|
|
int num4 = num2;
|
|
switch ((num4 | num3) - (num4 & num3))
|
|
{
|
|
case 0:
|
|
goto IL_0052;
|
|
case 2:
|
|
return false;
|
|
case 1:
|
|
AddonCallback.Fire(addonPtr, -1);
|
|
return true;
|
|
}
|
|
continue;
|
|
IL_0052:
|
|
num = -131329645;
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
public unsafe static bool IsRewardDialogReady(IGameGui gameGui)
|
|
{
|
|
AtkUnitBase* addonPtr;
|
|
int num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(-1608495528), out addonPtr) ? 578433628 : 578433629);
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = 578433628;
|
|
int num4 = num2;
|
|
switch ((num4 | num3) - (num4 & num3))
|
|
{
|
|
case 2:
|
|
goto IL_0052;
|
|
case 0:
|
|
return LAddon.IsAddonReady(addonPtr);
|
|
case 1:
|
|
return false;
|
|
}
|
|
continue;
|
|
IL_0052:
|
|
num = 578433629;
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
public unsafe static bool TryConfirmTurnIn(IGameGui gameGui)
|
|
{
|
|
AtkUnitBase* addonPtr;
|
|
int num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(275890163), out addonPtr) ? 799150129 : 799150135);
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = 799150131;
|
|
int num4 = num2;
|
|
switch ((num4 | num3) - (num4 & num3))
|
|
{
|
|
case 3:
|
|
num = 799150135;
|
|
break;
|
|
case 4:
|
|
return false;
|
|
case 1:
|
|
AddonCallback.Fire(addonPtr, default(int));
|
|
return true;
|
|
case 2:
|
|
num = (LAddon.IsAddonReady(addonPtr) ? 799150130 : 799150131);
|
|
break;
|
|
case 0:
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
public unsafe static bool IsHqConfirmReady(IGameGui gameGui)
|
|
{
|
|
AtkUnitBase* addonPtr;
|
|
int num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(1402346953), out addonPtr) ? 140237471 : 140237470);
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = 140237471;
|
|
int num4 = num2;
|
|
int num5 = num4 + num3;
|
|
int num6 = num4 & num3;
|
|
switch (num5 - (num6 + num6))
|
|
{
|
|
case 2:
|
|
goto IL_0054;
|
|
case 1:
|
|
return false;
|
|
case 0:
|
|
return LAddon.IsAddonReady(addonPtr);
|
|
}
|
|
continue;
|
|
IL_0054:
|
|
num = 140237470;
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
public unsafe static bool TryConfirmHqTrade(IGameGui gameGui)
|
|
{
|
|
AtkUnitBase* addonPtr;
|
|
int num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(-502173951), out addonPtr) ? 1659793375 : 1659793372);
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = 1659793374;
|
|
int num4 = num2;
|
|
switch ((num4 | num3) - (num4 & num3))
|
|
{
|
|
case 3:
|
|
return false;
|
|
case 0:
|
|
AddonCallback.ClickYes(addonPtr);
|
|
return true;
|
|
case 4:
|
|
num = 1659793372;
|
|
break;
|
|
case 1:
|
|
num = (LAddon.IsAddonReady(addonPtr) ? 1659793374 : 1659793373);
|
|
break;
|
|
case 2:
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
|
|
public static int GetCurrentSeals()
|
|
{
|
|
return GrandCompanyShop.GetCompanySeals();
|
|
}
|
|
|
|
public static int GetMaxSeals(IDataManager dataManager)
|
|
{
|
|
byte grandCompanyRank = GrandCompanyHelper.GetGrandCompanyRank();
|
|
int num = ((grandCompanyRank != 0) ? 1262186934 : 1262186932);
|
|
GrandCompanyRank row = default(GrandCompanyRank);
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = 1262186933;
|
|
int num4 = num2;
|
|
int num5 = num4 + num3;
|
|
int num6 = num4 & num3;
|
|
switch (num5 - (num6 + num6))
|
|
{
|
|
case 0:
|
|
num = 1262186932;
|
|
break;
|
|
case 1:
|
|
return 0;
|
|
case 4:
|
|
return (int)row.MaxSeals;
|
|
case 2:
|
|
return 0;
|
|
case 3:
|
|
num = (dataManager.GetExcelSheet<GrandCompanyRank>().TryGetRow(grandCompanyRank, out row) ? 1262186929 : 1262186935);
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
public static bool IsItemExpertDeliverable(IDataManager dataManager, uint itemId)
|
|
{
|
|
Item row;
|
|
int num = (dataManager.GetExcelSheet<Item>().TryGetRow(itemId, out row) ? (-1763780714) : (-1763780716));
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = -1763780715;
|
|
int num4 = num2;
|
|
int num5 = num4 + num3;
|
|
int num6 = num4 & num3;
|
|
switch (num5 - (num6 + num6))
|
|
{
|
|
case 2:
|
|
num = -1763780716;
|
|
break;
|
|
case 0:
|
|
return false;
|
|
case 3:
|
|
num = ((row.Rarity >= 2) ? (-1763780719) : (-1763780715));
|
|
break;
|
|
case 1:
|
|
return false;
|
|
case 4:
|
|
return row.Desynth > 0;
|
|
}
|
|
}
|
|
}
|
|
}
|