muffin v7.5.6
This commit is contained in:
parent
6266f9e6b7
commit
addf2d530f
619 changed files with 264792 additions and 446022 deletions
302
LLib/LLib.Shop/VendorPurchaseActions.cs
Normal file
302
LLib/LLib.Shop/VendorPurchaseActions.cs
Normal file
|
|
@ -0,0 +1,302 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using Dalamud.Plugin.Services;
|
||||
using FFXIVClientStructs.FFXIV.Component.GUI;
|
||||
using LLib.GameUI;
|
||||
|
||||
namespace LLib.Shop;
|
||||
|
||||
public static class VendorPurchaseActions
|
||||
{
|
||||
private const string ShopAddon = "Shop";
|
||||
|
||||
private const string SelectStringAddon = "SelectString";
|
||||
|
||||
private const string SelectIconStringAddon = "SelectIconString";
|
||||
|
||||
private const string SelectYesnoAddon = "SelectYesno";
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool IsDialogReady(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>(-1862554063), out addonPtr)) ? 148759857 : 148759862);
|
||||
AtkUnitBase* addonPtr2 = default(AtkUnitBase*);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 148759859;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 3:
|
||||
return true;
|
||||
case 5:
|
||||
num = ((!LAddon.IsAddonReady(addonPtr)) ? 148759857 : 148759858);
|
||||
break;
|
||||
case 0:
|
||||
return false;
|
||||
case 2:
|
||||
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>(-1204054181), out addonPtr2)) ? 148759859 : 148759863);
|
||||
break;
|
||||
case 6:
|
||||
num = 148759862;
|
||||
break;
|
||||
case 1:
|
||||
return true;
|
||||
case 4:
|
||||
num = ((!LAddon.IsAddonReady(addonPtr2)) ? 148759859 : 148759856);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TrySelectDialogOption(IGameGui gameGui, int index)
|
||||
{
|
||||
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>(-1862554063), out addonPtr)) ? (-479532860) : (-479532861));
|
||||
AtkUnitBase* addonPtr2 = default(AtkUnitBase*);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -479532858;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 3:
|
||||
num = -479532861;
|
||||
break;
|
||||
case 2:
|
||||
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>(-100229517), out addonPtr2)) ? (-479532857) : (-479532862));
|
||||
break;
|
||||
case 5:
|
||||
num = ((!LAddon.IsAddonReady(addonPtr)) ? (-479532860) : (-479532858));
|
||||
break;
|
||||
case 4:
|
||||
num = ((!LAddon.IsAddonReady(addonPtr2)) ? (-479532857) : (-479532864));
|
||||
break;
|
||||
case 6:
|
||||
AddonCallback.Fire(addonPtr2, index);
|
||||
return true;
|
||||
case 0:
|
||||
AddonCallback.Fire(addonPtr, index);
|
||||
return true;
|
||||
case 1:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool IsShopReady(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>(854458650), out addonPtr) ? 1690879529 : 1690879530);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1690879531;
|
||||
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 = 1690879530;
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static int FindItemDisplayIndex(IGameGui gameGui, uint itemId)
|
||||
{
|
||||
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>(-526765299), out addonPtr) ? 2111523499 : 2111523488);
|
||||
int num6 = default(int);
|
||||
int num5 = default(int);
|
||||
uint uInt = default(uint);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 2111523490;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 8:
|
||||
num = ((addonPtr->AtkValues == null) ? 2111523494 : 2111523490);
|
||||
break;
|
||||
case 7:
|
||||
{
|
||||
int num7 = num6;
|
||||
num3 = 1;
|
||||
num4 = num7;
|
||||
num6 = (num4 | num3) + (num4 & num3);
|
||||
num = 2111523502;
|
||||
break;
|
||||
}
|
||||
case 5:
|
||||
{
|
||||
num3 = num6;
|
||||
num4 = 441;
|
||||
int num8 = num4 ^ num3;
|
||||
int num9 = num4 & num3;
|
||||
num5 = num8 + (num9 + num9);
|
||||
num = ((num5 < addonPtr->AtkValuesCount) ? 2111523492 : 2111523503);
|
||||
break;
|
||||
}
|
||||
case 14:
|
||||
uInt = addonPtr->AtkValues[2].UInt;
|
||||
num6 = 0;
|
||||
num = 2111523502;
|
||||
break;
|
||||
case 12:
|
||||
num = ((num6 < uInt) ? 2111523495 : 2111523491);
|
||||
break;
|
||||
case 2:
|
||||
return -1;
|
||||
case 10:
|
||||
return -1;
|
||||
case 9:
|
||||
num = (LAddon.IsAddonReady(addonPtr) ? 2111523498 : 2111523496);
|
||||
break;
|
||||
case 3:
|
||||
return num6;
|
||||
case 0:
|
||||
num = ((addonPtr->AtkValuesCount > 2) ? 2111523500 : 2111523494);
|
||||
break;
|
||||
case 1:
|
||||
return -1;
|
||||
case 4:
|
||||
return -1;
|
||||
case 13:
|
||||
return -1;
|
||||
case 11:
|
||||
num = 2111523488;
|
||||
break;
|
||||
case 6:
|
||||
num = ((addonPtr->AtkValues[num5].UInt != itemId) ? 2111523493 : 2111523489);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TryBuyItem(IGameGui gameGui, int itemIndex, int quantity)
|
||||
{
|
||||
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>(-364498650), out addonPtr) ? (-705089016) : (-705089011));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -705089012;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 4:
|
||||
num = (LAddon.IsAddonReady(addonPtr) ? (-705089009) : (-705089012));
|
||||
break;
|
||||
case 0:
|
||||
return false;
|
||||
case 2:
|
||||
num = -705089011;
|
||||
break;
|
||||
case 1:
|
||||
return false;
|
||||
case 3:
|
||||
{
|
||||
AtkValue* values = stackalloc AtkValue[4]
|
||||
{
|
||||
new AtkValue
|
||||
{
|
||||
Type = AtkValueType.Int,
|
||||
Int = 0
|
||||
},
|
||||
new AtkValue
|
||||
{
|
||||
Type = AtkValueType.Int,
|
||||
Int = itemIndex
|
||||
},
|
||||
new AtkValue
|
||||
{
|
||||
Type = AtkValueType.Int,
|
||||
Int = quantity
|
||||
},
|
||||
new AtkValue
|
||||
{
|
||||
Type = AtkValueType.Undefined,
|
||||
Int = 0
|
||||
}
|
||||
};
|
||||
addonPtr->FireCallback(4u, values);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TryConfirmPurchase(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) ? 723548803 : 723548800);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 723548802;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 3:
|
||||
AddonCallback.ClickYes(addonPtr);
|
||||
return true;
|
||||
case 2:
|
||||
return false;
|
||||
case 4:
|
||||
num = 723548800;
|
||||
break;
|
||||
case 1:
|
||||
num = (LAddon.IsAddonReady(addonPtr) ? 723548801 : 723548802);
|
||||
break;
|
||||
case 0:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TryCloseShop(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>(-364498650), out addonPtr) ? 206614822 : 206614821);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 206614820;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 2:
|
||||
addonPtr->Close(fireCallback: true);
|
||||
return true;
|
||||
case 1:
|
||||
return false;
|
||||
case 0:
|
||||
goto IL_0060;
|
||||
}
|
||||
continue;
|
||||
IL_0060:
|
||||
num = 206614821;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue