1
0
Fork 0
forked from aly/qstbak

muffin v7.5.6

This commit is contained in:
alydev 2026-08-17 20:27:25 +10:00
parent 6266f9e6b7
commit addf2d530f
619 changed files with 264792 additions and 446022 deletions

View file

@ -1,12 +1,15 @@
using System;
using System.Runtime.CompilerServices;
using Dalamud.Game.ClientState.Objects.Types;
using Dalamud.Plugin.Services;
using FFXIVClientStructs.FFXIV.Client.Game;
using FFXIVClientStructs.FFXIV.Client.Game.UI;
using LLib.GameData;
using Lumina.Excel.Sheets;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Questionable.Model.Common;
using Questionable.Model.Questing;
using SmartNav.Model;
namespace Questionable.Functions;
@ -24,7 +27,7 @@ internal sealed class AetheryteFunctions
private readonly IObjectTable _objectTable;
public DateTime ReturnRequestedAt { get; set; } = DateTime.MinValue;
public long ReturnRequestedAt { get; set; }
public AetheryteFunctions(IServiceProvider serviceProvider, ILogger<AetheryteFunctions> logger, IDataManager dataManager, IObjectTable objectTable)
{
@ -38,59 +41,156 @@ internal sealed class AetheryteFunctions
{
subIndex = 0;
UIState* ptr = UIState.Instance();
if (ptr != null)
int num = ((ptr == null) ? 1947729333 : 1947729332);
while (true)
{
return ptr->IsAetheryteUnlocked(aetheryteId);
int num2 = num;
int num3 = 1947729333;
int num4 = num2;
int num5 = num4 + num3;
int num6 = num4 & num3;
switch (num5 - (num6 + num6))
{
case 0:
return false;
case 1:
return ptr->IsAetheryteUnlocked(aetheryteId);
case 2:
goto IL_0058;
}
continue;
IL_0058:
num = 1947729332;
}
return false;
}
public bool IsAetheryteUnlocked(EAetheryteLocation aetheryteLocation)
{
if (aetheryteLocation.IsFirmamentAetheryte())
int num = ((!_206E_206D_200F_200B_200E_202C_206B_206B_202E_200C_200B_200E_206B_206D_206C_200B_200C_206C_202C_202B_202C_206D_206C_200E_200B_202B_206E_206D_202B_206E_200B_206F_200B_206E_202E_206B_200B_200F_202D_202B_202E(aetheryteLocation)) ? (-1602388833) : (-1602388834));
while (true)
{
return _serviceProvider.GetRequiredService<QuestFunctions>().IsQuestComplete(new QuestId(3672));
int num2 = num;
int num3 = -1602388833;
int num4 = num2;
int num5 = num4 + num3;
int num6 = num4 & num3;
switch (num5 - (num6 + num6))
{
case 2:
goto IL_0048;
case 0:
{
byte subIndex;
return IsAetheryteUnlocked((uint)aetheryteLocation, out subIndex);
}
case 1:
return _serviceProvider.GetRequiredService<QuestFunctions>().IsQuestComplete(_206B_206E_206B_206B_206D_200D_200E_200B_202B_206D_202E_202C_200B_202D_202A_206D_206C_206E_200D_206C_200C_206A_200C_206E_202D_200C_200D_200F_202A_202D_200F_206D_202A_206D_206E_200B_206F_206F_202D_202E_202E((ushort)3672));
}
continue;
IL_0048:
num = -1602388834;
}
byte subIndex;
return IsAetheryteUnlocked((uint)aetheryteLocation, out subIndex);
}
public unsafe bool CanTeleport(EAetheryteLocation aetheryteLocation)
{
if ((ushort)aetheryteLocation == PlayerState.Instance()->HomeAetheryteId && ActionManager.Instance()->GetActionStatus(ActionType.Action, 6u, 3758096384uL, checkRecastActive: true, checkCastingActive: true, null) == 0)
int num = (((ushort)aetheryteLocation != _200E_202E_200F_206B_206A_206D_200D_206F_206F_206A_206B_206C_200E_202E_206D_200C_202C_206F_206E_200E_206B_206E_206A_200E_202E_200D_200C_200C_202B_200B_206D_206E_206D_200D_202B_206E_206C_200E_206B_202E_202E()) ? 508143747 : 508143745);
while (true)
{
return true;
int num2 = num;
int num3 = 508143746;
int num4 = num2;
int num5 = num4 + num3;
int num6 = num4 & num3;
switch (num5 - (num6 + num6))
{
case 1:
return ActionManager.Instance()->GetActionStatus(ActionType.Action, 5u, 3758096384uL, checkRecastActive: true, checkCastingActive: true, null) == 0;
case 3:
num = ((ActionManager.Instance()->GetActionStatus(ActionType.Action, 6u, 3758096384uL, checkRecastActive: true, checkCastingActive: true, null) != 0) ? 508143747 : 508143746);
break;
case 0:
return true;
case 2:
num = 508143745;
break;
}
}
return ActionManager.Instance()->GetActionStatus(ActionType.Action, 5u, 3758096384uL, checkRecastActive: true, checkCastingActive: true, null) == 0;
}
public unsafe bool IsTeleportUnlocked()
{
uint rowId = _dataManager.GetExcelSheet<Lumina.Excel.Sheets.Action>().GetRow(5u).UnlockLink.RowId;
return UIState.Instance()->IsUnlockLinkUnlocked(rowId);
UIState* ptr = UIState.Instance();
int num = ((ptr == null) ? 126078724 : 126078727);
while (true)
{
int num2 = num;
int num3 = 126078725;
int num4 = num2;
int num5 = num4 + num3;
int num6 = num4 & num3;
switch (num5 - (num6 + num6))
{
case 1:
return false;
case 2:
return ptr->IsUnlockLinkUnlocked(rowId);
case 0:
goto IL_008b;
}
continue;
IL_008b:
num = 126078727;
}
}
public unsafe bool IsReturnAvailable()
{
return ActionManager.Instance()->GetActionStatus(ActionType.Action, 6u, 3758096384uL, checkRecastActive: true, checkCastingActive: true, null) == 0;
}
[MethodImpl(MethodImplOptions.NoInlining)]
public unsafe bool TeleportAetheryte(uint aetheryteId)
{
_logger.LogDebug("Attempting to teleport to aetheryte {AetheryteId}", aetheryteId);
if (IsAetheryteUnlocked(aetheryteId, out var subIndex))
_202A_206C_206B_200C_200F_202D_206A_200D_200C_202A_200D_206E_206B_206B_202D_202D_200C_206A_202C_206B_206D_206B_202A_202C_200E_200C_206B_200E_206D_206C_200C_202A_206F_200E_200B_202E_206B_202B_200B_202D_202E((ILogger)_logger, global::_003CModule_003E._206C_202A_206D_206A_206E_202A_202B_206F_206D_200F_202D_200F_202D_206A_202C_202B_206D_206A_200E_200E_202D_202D_200D_200C_200D_200D_206D_206E_202A_200F_206E_206C_206D_206A_206D_202B_200F_200D_206E_200C_202E<string>(762406754), new object[1] { aetheryteId });
byte subIndex;
int num = ((!IsAetheryteUnlocked(aetheryteId, out subIndex)) ? 1620747025 : 1620747027);
while (true)
{
if (aetheryteId == PlayerState.Instance()->HomeAetheryteId && ActionManager.Instance()->GetActionStatus(ActionType.Action, 6u, 3758096384uL, checkRecastActive: true, checkCastingActive: true, null) == 0)
int num2 = num;
int num3 = 1620747030;
int num4 = num2;
int num5 = num4 + num3;
int num6 = num4 & num3;
switch (num5 - (num6 + num6))
{
ReturnRequestedAt = DateTime.Now;
if (ActionManager.Instance()->UseAction(ActionType.Action, 6u, 3758096384uL, 0u, ActionManager.UseActionMode.None, 0u, null))
{
_logger.LogInformation("Using 'return' for home aetheryte");
return true;
}
}
if (ActionManager.Instance()->GetActionStatus(ActionType.Action, 5u, 3758096384uL, checkRecastActive: true, checkCastingActive: true, null) == 0)
{
_logger.LogInformation("Teleporting to aetheryte {AetheryteId}", aetheryteId);
case 7:
return false;
case 6:
ReturnRequestedAt = _206C_200F_206F_206E_206C_200D_206F_202A_202C_202B_206F_202C_200F_200D_202B_202E_206B_200E_200E_206A_206E_200F_206A_202C_202D_206B_202C_200F_206C_200D_200B_206B_202A_206A_206D_200D_200C_202D_206B_206D_202E();
num = ((!ActionManager.Instance()->UseAction(ActionType.Action, 6u, 3758096384uL, 0u, ActionManager.UseActionMode.None, 0u, null)) ? 1620747031 : 1620747029);
break;
case 5:
num = ((aetheryteId != _200E_202E_200F_206B_206A_206D_200D_206F_206F_206A_206B_206C_200E_202E_206D_200C_202C_206F_206E_200E_206B_206E_206A_200E_202E_200D_200C_200C_202B_200B_206D_206E_206D_200D_202B_206E_206C_200E_206B_202E_202E()) ? 1620747031 : 1620747030);
break;
case 0:
num = ((ActionManager.Instance()->GetActionStatus(ActionType.Action, 6u, 3758096384uL, checkRecastActive: true, checkCastingActive: true, null) != 0) ? 1620747031 : 1620747024);
break;
case 2:
num = 1620747027;
break;
case 1:
num = ((ActionManager.Instance()->GetActionStatus(ActionType.Action, 5u, 3758096384uL, checkRecastActive: true, checkCastingActive: true, null) != 0) ? 1620747025 : 1620747026);
break;
case 4:
_206F_202E_206E_206B_200E_202D_206B_200B_200E_206B_206C_202B_202D_206C_206A_202B_202A_202D_202D_206B_200C_200D_206F_202D_202A_206B_202A_202A_202D_200F_206A_206B_200B_206C_200F_202A_200B_202E_202A_202E_202E((ILogger)_logger, global::_003CModule_003E._200B_206B_206B_200E_200B_206A_206D_206B_206E_200F_206A_206F_206E_202B_200F_206C_202B_206D_206E_200F_200C_200E_206F_200D_200F_200B_202B_202B_202B_202B_206D_202C_206A_206D_200B_206E_200D_206A_206F_200F_202E<string>(265904157), new object[1] { aetheryteId });
return Telepo.Instance()->Teleport(aetheryteId, subIndex);
case 3:
_206F_202E_206E_206B_200E_202D_206B_200B_200E_206B_206C_202B_202D_206C_206A_202B_202A_202D_202D_206B_200C_200D_206F_202D_202A_206B_202A_202A_202D_200F_206A_206B_200B_206C_200F_202A_200B_202E_202A_202E_202E((ILogger)_logger, global::_003CModule_003E._202D_206D_206A_206E_202C_202B_200C_206C_200E_206A_206D_200E_206A_202A_200C_202E_206E_202C_206F_200B_206D_206F_200C_202C_200B_202B_200F_200B_206A_206F_200F_202E_206B_200E_202B_202A_200F_200B_202A_200E_202E<string>(1006691700), Array.Empty<object>());
return true;
}
}
return false;
}
public bool TeleportAetheryte(EAetheryteLocation aetheryteLocation)
@ -98,56 +198,114 @@ internal sealed class AetheryteFunctions
return TeleportAetheryte((uint)aetheryteLocation);
}
public unsafe bool IsFreeAetheryte(EAetheryteLocation aetheryteLocation)
public static bool IsFreeAetheryte(EAetheryteLocation aetheryteLocation)
{
PlayerState* ptr = PlayerState.Instance();
if (ptr != null)
{
if ((EAetheryteLocation)ptr->FreeAetheryteId != aetheryteLocation)
{
return (EAetheryteLocation)ptr->FreeAetherytePSPlus == aetheryteLocation;
}
return true;
}
return false;
return _206B_200E_200D_202D_202C_202C_206F_200E_202E_202E_202D_206B_206E_200C_206B_206C_200B_200F_200B_206E_206F_206B_200B_202E_200C_206E_206A_206A_202C_202C_206E_202D_206B_206C_206A_206E_200E_206E_206E_202E_202E((uint)aetheryteLocation);
}
public unsafe AetheryteRegistrationResult CanRegisterFreeOrFavoriteAetheryte(EAetheryteLocation aetheryteLocation)
public AetheryteRegistrationResult CanRegisterFreeOrFavoriteAetheryte(EAetheryteLocation aetheryteLocation)
{
if (_objectTable[0] == null)
int num = ((_200F_200C_206E_206B_206C_202D_206B_206B_202E_202E_202D_202D_200C_202D_202C_206E_200E_206C_200F_202C_200C_206F_200F_200D_206A_200B_206C_206D_200B_200C_200D_206A_202B_200F_202A_202A_202E_200F_206B_202B_202E(_objectTable, 0) != null) ? (-303811700) : (-303811698));
bool flag = default(bool);
while (true)
{
return AetheryteRegistrationResult.NotPossible;
}
PlayerState* ptr = PlayerState.Instance();
if (ptr == null)
{
return AetheryteRegistrationResult.NotPossible;
}
if (IsFreeAetheryte(aetheryteLocation))
{
return AetheryteRegistrationResult.NotPossible;
}
bool flag = false;
for (int i = 0; i < ptr->FavouriteAetheryteCount; i++)
{
if (ptr->FavouriteAetherytes[i] == (ushort)aetheryteLocation)
int num2 = num;
int num3 = -303811697;
int num4 = num2;
switch ((num4 | num3) - (num4 & num3))
{
case 5:
num = (flag ? (-303811701) : (-303811697));
break;
case 3:
num = ((!IsFreeAetheryte(aetheryteLocation)) ? (-303811705) : (-303811699));
break;
case 0:
return AetheryteRegistrationResult.NotPossible;
case 9:
flag = _206F_206D_200D_202C_206D_202D_202C_202E_206F_202B_200E_200C_202A_206E_200E_206F_200F_206C_206B_200E_206C_200D_202B_202E_202C_202D_200C_202E_206D_200F_202B_200D_206D_200D_206B_200F_200E_200C_206F_200F_202E();
num = ((!_202C_200B_200C_200B_202E_202D_202B_200D_202B_200E_200E_206F_200F_200D_206B_202B_202A_202A_202C_206C_206A_202E_202B_206D_206D_206C_206E_200E_202C_200F_206B_202A_202A_200F_206A_206E_200B_206F_202C_206B_202E(PlayerStateFlag.IsLoginSecurityToken)) ? (-303811702) : (-303811707));
break;
case 10:
num = ((_206A_202A_200E_202D_200D_206E_206F_206D_206F_200E_202D_200B_206E_202D_200B_206B_206D_202A_200B_206A_202B_206F_202D_200F_206D_206A_200E_202C_200E_202B_200C_202C_200B_200C_202C_202E_202B_206A_206E_200D_202E() != 0) ? (-303811702) : (-303811703));
break;
case 4:
return AetheryteRegistrationResult.FavoredDestinationAvailable;
case 7:
num = -303811698;
break;
case 2:
return AetheryteRegistrationResult.NotPossible;
case 6:
return AetheryteRegistrationResult.SecurityTokenFreeDestinationAvailable;
case 8:
num = ((!_202E_206F_200B_206A_202D_206D_200F_206F_202B_206F_202C_202D_200E_206C_206D_206B_200D_202C_206F_202C_200B_206A_206B_202A_202B_206A_202C_206A_202A_202B_202C_202A_200C_206F_202C_202D_202B_202E_206D_202E((uint)aetheryteLocation)) ? (-303811706) : (-303811708));
break;
case 1:
return AetheryteRegistrationResult.NotPossible;
case 11:
return AetheryteRegistrationResult.NotPossible;
}
if (ptr->FavouriteAetherytes[i] == 0)
{
flag = true;
break;
}
}
if (ptr->IsPlayerStateFlagSet(PlayerStateFlag.IsLoginSecurityToken) && ptr->FreeAetheryteId == 0)
{
return AetheryteRegistrationResult.SecurityTokenFreeDestinationAvailable;
}
if (!flag)
{
return AetheryteRegistrationResult.NotPossible;
}
return AetheryteRegistrationResult.FavoredDestinationAvailable;
}
static bool _206E_206D_200F_200B_200E_202C_206B_206B_202E_200C_200B_200E_206B_206D_206C_200B_200C_206C_202C_202B_202C_206D_206C_200E_200B_202B_206E_206D_202B_206E_200B_206F_200B_206E_202E_206B_200B_200F_202D_202B_202E(EAetheryteLocation P_0)
{
return P_0.IsFirmamentAetheryte();
}
static QuestId _206B_206E_206B_206B_206D_200D_200E_200B_202B_206D_202E_202C_200B_202D_202A_206D_206C_206E_200D_206C_200C_206A_200C_206E_202D_200C_200D_200F_202A_202D_200F_206D_202A_206D_206E_200B_206F_206F_202D_202E_202E(ushort P_0)
{
return new QuestId(P_0);
}
static uint _200E_202E_200F_206B_206A_206D_200D_206F_206F_206A_206B_206C_200E_202E_206D_200C_202C_206F_206E_200E_206B_206E_206A_200E_202E_200D_200C_200C_202B_200B_206D_206E_206D_200D_202B_206E_206C_200E_206B_202E_202E()
{
return PlayerStateHelper.GetHomeAetheryteId();
}
static void _202A_206C_206B_200C_200F_202D_206A_200D_200C_202A_200D_206E_206B_206B_202D_202D_200C_206A_202C_206B_206D_206B_202A_202C_200E_200C_206B_200E_206D_206C_200C_202A_206F_200E_200B_202E_206B_202B_200B_202D_202E(ILogger P_0, string P_1, object[] P_2)
{
P_0.LogDebug(P_1, P_2);
}
static long _206C_200F_206F_206E_206C_200D_206F_202A_202C_202B_206F_202C_200F_200D_202B_202E_206B_200E_200E_206A_206E_200F_206A_202C_202D_206B_202C_200F_206C_200D_200B_206B_202A_206A_206D_200D_200C_202D_206B_206D_202E()
{
return Environment.TickCount64;
}
static void _206F_202E_206E_206B_200E_202D_206B_200B_200E_206B_206C_202B_202D_206C_206A_202B_202A_202D_202D_206B_200C_200D_206F_202D_202A_206B_202A_202A_202D_200F_206A_206B_200B_206C_200F_202A_200B_202E_202A_202E_202E(ILogger P_0, string P_1, object[] P_2)
{
P_0.LogInformation(P_1, P_2);
}
static bool _206B_200E_200D_202D_202C_202C_206F_200E_202E_202E_202D_206B_206E_200C_206B_206C_200B_200F_200B_206E_206F_206B_200B_202E_200C_206E_206A_206A_202C_202C_206E_202D_206B_206C_206A_206E_200E_206E_206E_202E_202E(uint P_0)
{
return PlayerStateHelper.IsFreeAetheryte(P_0);
}
static IGameObject _200F_200C_206E_206B_206C_202D_206B_206B_202E_202E_202D_202D_200C_202D_202C_206E_200E_206C_200F_202C_200C_206F_200F_200D_206A_200B_206C_206D_200B_200C_200D_206A_202B_200F_202A_202A_202E_200F_206B_202B_202E(IObjectTable P_0, int P_1)
{
return P_0[P_1];
}
static bool _202E_206F_200B_206A_202D_206D_200F_206F_202B_206F_202C_202D_200E_206C_206D_206B_200D_202C_206F_202C_200B_206A_206B_202A_202B_206A_202C_206A_202A_202B_202C_202A_200C_206F_202C_202D_202B_202E_206D_202E(uint P_0)
{
return PlayerStateHelper.IsFavouriteAetheryte(P_0);
}
static bool _206F_206D_200D_202C_206D_202D_202C_202E_206F_202B_200E_200C_202A_206E_200E_206F_200F_206C_206B_200E_206C_200D_202B_202E_202C_202D_200C_202E_206D_200F_202B_200D_206D_200D_206B_200F_200E_200C_206F_200F_202E()
{
return PlayerStateHelper.HasFavouriteSlotAvailable();
}
static bool _202C_200B_200C_200B_202E_202D_202B_200D_202B_200E_200E_206F_200F_200D_206B_202B_202A_202A_202C_206C_206A_202E_202B_206D_206D_206C_206E_200E_202C_200F_206B_202A_202A_200F_206A_206E_200B_206F_202C_206B_202E(PlayerStateFlag P_0)
{
return PlayerStateHelper.IsPlayerStateFlagSet(P_0);
}
static uint _206A_202A_200E_202D_200D_206E_206F_206D_206F_200E_202D_200B_206E_202D_200B_206B_206D_202A_200B_206A_202B_206F_202D_200F_206D_206A_200E_202C_200E_202B_200C_202C_200B_200C_202C_202E_202B_206A_206E_200D_202E()
{
return PlayerStateHelper.GetFreeAetheryteId();
}
}