forked from aly/qstbak
247 lines
12 KiB
C#
247 lines
12 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Runtime.CompilerServices;
|
|
using System.Text;
|
|
using Dalamud.Game.ClientState.Objects.Enums;
|
|
using Microsoft.Extensions.Logging;
|
|
using Questionable.Functions;
|
|
using Questionable.Model;
|
|
using Questionable.Model.Questing;
|
|
using SmartNav.Model;
|
|
|
|
namespace Questionable.Controller.Steps.Interactions;
|
|
|
|
internal static class AetheryteFreeOrFavored
|
|
{
|
|
internal sealed class Factory : SimpleTaskFactory
|
|
{
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
public override ITask? CreateTask(Quest quest, QuestSequence sequence, QuestStep step)
|
|
{
|
|
int num = ((_206C_200C_200E_202C_200E_202A_206A_202C_206D_202A_206F_206D_206A_200D_200B_200E_206B_202B_202E_202B_202A_202D_206B_206D_200B_200E_202E_206A_206A_202D_200B_206C_206D_200C_202A_200C_200D_206E_200D_200E_202E(step) == EInteractionType.RegisterFreeOrFavoredAetheryte) ? 499713839 : 499713836);
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = 499713838;
|
|
int num4 = num2;
|
|
switch ((num4 | num3) - (num4 & num3))
|
|
{
|
|
case 1:
|
|
_202D_206F_202E_200B_200B_206F_206D_202C_206A_202B_200F_202E_200C_206A_206A_202B_206A_200D_206F_202A_200E_206D_206F_202D_206D_202A_200F_202B_206B_202B_202A_200C_206F_200F_206F_202C_200D_206E_202E_206A_202E((object)_202B_202C_202E_202A_206D_202A_200E_200E_206B_200D_206F_206A_206E_206E_202D_202D_206D_206C_202B_202E_202B_206E_200F_202C_206F_200B_202C_206C_206A_202B_200D_200E_200B_206C_200C_206B_200B_200D_202B_202A_202E(step), 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>(1584480667));
|
|
return new Register(_202B_202C_202E_202A_206D_202A_200E_200E_206B_200D_206F_206A_206E_206E_202D_202D_206D_206C_202B_202E_202B_206E_200F_202C_206F_200B_202C_206C_206A_202B_200D_200E_200B_206C_200C_206B_200B_200D_202B_202A_202E(step).Value);
|
|
case 2:
|
|
return null;
|
|
case 0:
|
|
goto IL_0077;
|
|
}
|
|
continue;
|
|
IL_0077:
|
|
num = 499713836;
|
|
}
|
|
}
|
|
|
|
static EInteractionType _206C_200C_200E_202C_200E_202A_206A_202C_206D_202A_206F_206D_206A_200D_200B_200E_206B_202B_202E_202B_202A_202D_206B_206D_200B_200E_202E_206A_206A_202D_200B_206C_206D_200C_202A_200C_200D_206E_200D_200E_202E(QuestStep P_0)
|
|
{
|
|
return P_0.InteractionType;
|
|
}
|
|
|
|
static EAetheryteLocation? _202B_202C_202E_202A_206D_202A_200E_200E_206B_200D_206F_206A_206E_206E_202D_202D_206D_206C_202B_202E_202B_206E_200F_202C_206F_200B_202C_206C_206A_202B_200D_200E_200B_206C_200C_206B_200B_200D_202B_202A_202E(QuestStep P_0)
|
|
{
|
|
return P_0.Aetheryte;
|
|
}
|
|
|
|
static void _202D_206F_202E_200B_200B_206F_206D_202C_206A_202B_200F_202E_200C_206A_206A_202B_206A_200D_206F_202A_200E_206D_206F_202D_206D_202A_200F_202B_206B_202B_202A_200C_206F_200F_206F_202C_200D_206E_202E_206A_202E(object P_0, string P_1)
|
|
{
|
|
ArgumentNullException.ThrowIfNull(P_0, P_1);
|
|
}
|
|
}
|
|
|
|
internal sealed record Register(EAetheryteLocation AetheryteLocation) : ITask
|
|
{
|
|
[CompilerGenerated]
|
|
private Type EqualityContract
|
|
{
|
|
[CompilerGenerated]
|
|
get
|
|
{
|
|
return _202B_202A_202B_200E_202B_206A_206D_206D_206E_202B_200E_200C_206B_200D_206B_200F_200C_200B_202D_200F_206D_206E_202D_206A_202C_200B_200B_200F_202C_206E_200B_200C_206A_202D_206D_206F_200B_202B_206E_200F_202E(typeof(Register).TypeHandle);
|
|
}
|
|
}
|
|
|
|
public bool ShouldRedoOnInterrupt()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
bool ITask.ShouldRedoOnInterrupt()
|
|
{
|
|
//ILSpy generated this explicit interface implementation from .override directive in ShouldRedoOnInterrupt
|
|
return this.ShouldRedoOnInterrupt();
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
public override string ToString()
|
|
{
|
|
DefaultInterpolatedStringHandler defaultInterpolatedStringHandler = new DefaultInterpolatedStringHandler(32, 1);
|
|
defaultInterpolatedStringHandler.AppendLiteral(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>(837587043));
|
|
defaultInterpolatedStringHandler.AppendFormatted(AetheryteLocation);
|
|
defaultInterpolatedStringHandler.AppendLiteral(global::_003CModule_003E._202A_206B_206D_200C_206B_200E_200E_202A_200B_202E_206A_206F_206A_206B_200E_200D_200F_206D_206E_206A_206F_200C_206C_202C_202A_206E_202C_200B_206E_202A_206E_202B_206B_202E_202E_206A_206D_206D_202C_200F_202E<string>(1618480346));
|
|
return defaultInterpolatedStringHandler.ToStringAndClear();
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
[CompilerGenerated]
|
|
private bool PrintMembers(StringBuilder builder)
|
|
{
|
|
_202B_206C_200B_200F_206A_202B_206B_206E_202D_202C_202B_206F_206F_202D_206A_206C_202E_200C_202B_200F_202A_200B_200E_200E_200F_200E_206B_200E_206F_200B_200E_200C_200F_206C_200D_206D_200C_200D_202B_202A_202E();
|
|
_206C_202E_202B_200F_206A_206D_202B_202C_200D_206B_206C_206B_200D_200D_200D_202A_200E_202B_200B_200E_206D_206B_202B_202B_206B_206A_206A_202A_200E_206B_200D_206A_200D_202B_202E_202B_200B_206B_206E_202D_202E(builder, 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>(719371282));
|
|
_206C_202E_202B_200F_206A_206D_202B_202C_200D_206B_206C_206B_200D_200D_200D_202A_200E_202B_200B_200E_206D_206B_202B_202B_206B_206A_206A_202A_200E_206B_200D_206A_200D_202B_202E_202B_200B_206B_206E_202D_202E(builder, AetheryteLocation.ToString());
|
|
return true;
|
|
}
|
|
|
|
[CompilerGenerated]
|
|
public bool Equals(Register? other)
|
|
{
|
|
int num = (((object)this == other) ? 602559884 : 602559880);
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = 602559881;
|
|
int num4 = num2;
|
|
switch ((num4 | num3) - (num4 & num3))
|
|
{
|
|
case 5:
|
|
return true;
|
|
case 2:
|
|
return false;
|
|
case 4:
|
|
num = 602559880;
|
|
break;
|
|
case 0:
|
|
return EqualityComparer<EAetheryteLocation>.Default.Equals(AetheryteLocation, other.AetheryteLocation);
|
|
case 1:
|
|
num = (((object)other == null) ? 602559883 : 602559882);
|
|
break;
|
|
case 3:
|
|
num = ((!_202E_206F_200D_200E_206F_200C_202D_202E_206D_200B_202B_200B_200D_200D_202B_202B_202C_200D_206A_202B_200C_206E_202C_200C_202C_200B_202A_206D_200C_202D_206E_206A_206C_202C_206E_200F_200B_200C_200E_206F_202E(EqualityContract, other.EqualityContract)) ? 602559883 : 602559881);
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
bool IEquatable<Register>.Equals(Register? other)
|
|
{
|
|
//ILSpy generated this explicit interface implementation from .override directive in Equals
|
|
return this.Equals(other);
|
|
}
|
|
|
|
static Type _202B_202A_202B_200E_202B_206A_206D_206D_206E_202B_200E_200C_206B_200D_206B_200F_200C_200B_202D_200F_206D_206E_202D_206A_202C_200B_200B_200F_202C_206E_200B_200C_206A_202D_206D_206F_200B_202B_206E_200F_202E(RuntimeTypeHandle P_0)
|
|
{
|
|
return Type.GetTypeFromHandle(P_0);
|
|
}
|
|
|
|
static void _202B_206C_200B_200F_206A_202B_206B_206E_202D_202C_202B_206F_206F_202D_206A_206C_202E_200C_202B_200F_202A_200B_200E_200E_200F_200E_206B_200E_206F_200B_200E_200C_200F_206C_200D_206D_200C_200D_202B_202A_202E()
|
|
{
|
|
RuntimeHelpers.EnsureSufficientExecutionStack();
|
|
}
|
|
|
|
static StringBuilder _206C_202E_202B_200F_206A_206D_202B_202C_200D_206B_206C_206B_200D_200D_200D_202A_200E_202B_200B_200E_206D_206B_202B_202B_206B_206A_206A_202A_200E_206B_200D_206A_200D_202B_202E_202B_200B_206B_206E_202D_202E(StringBuilder P_0, string P_1)
|
|
{
|
|
return P_0.Append(P_1);
|
|
}
|
|
|
|
static bool _202E_206F_200D_200E_206F_200C_202D_202E_206D_200B_202B_200B_200D_200D_202B_202B_202C_200D_206A_202B_200C_206E_202C_200C_202C_200B_202A_206D_200C_202D_206E_206A_206C_202C_206E_200F_200B_200C_200E_206F_202E(Type P_0, Type P_1)
|
|
{
|
|
return P_0 == P_1;
|
|
}
|
|
}
|
|
|
|
internal sealed class DoRegister(AetheryteFunctions aetheryteFunctions, GameFunctions gameFunctions, ILogger<DoRegister> logger) : TaskExecutor<Register>()
|
|
{
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
protected override bool Start()
|
|
{
|
|
int num = (aetheryteFunctions.IsAetheryteUnlocked(base.Task.AetheryteLocation) ? 1191746400 : 1191746407);
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = 1191746404;
|
|
int num4 = num2;
|
|
switch ((num4 | num3) - (num4 & num3))
|
|
{
|
|
case 1:
|
|
_200C_202B_206D_200B_202A_202C_200B_206A_200D_202E_206C_202B_200B_206B_206F_206C_200F_200D_200B_206C_200D_202C_202C_206E_206F_206C_202E_206A_200D_206D_206F_202A_202A_206C_206F_206E_200E_200C_202D_202E_202E((ILogger)logger, global::_003CModule_003E._202E_206C_200F_206B_206A_202A_202C_206F_200C_206C_202B_206B_206D_206D_206D_202D_206E_202E_206C_206E_206D_202C_206F_200D_202D_202E_206A_206D_202A_206A_202B_200D_200C_206D_202B_200B_200D_200C_206E_206B_202E<string>(560864212), new object[1] { base.Task.AetheryteLocation });
|
|
return false;
|
|
case 3:
|
|
{
|
|
DefaultInterpolatedStringHandler defaultInterpolatedStringHandler = new DefaultInterpolatedStringHandler(25, 1);
|
|
defaultInterpolatedStringHandler.AppendLiteral(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>(-1957444372));
|
|
defaultInterpolatedStringHandler.AppendFormatted(base.Task.AetheryteLocation);
|
|
defaultInterpolatedStringHandler.AppendLiteral(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>(-1174023517));
|
|
throw new TaskException(defaultInterpolatedStringHandler.ToStringAndClear());
|
|
}
|
|
case 4:
|
|
num = ((aetheryteFunctions.CanRegisterFreeOrFavoriteAetheryte(base.Task.AetheryteLocation) != AetheryteRegistrationResult.NotPossible) ? 1191746404 : 1191746405);
|
|
break;
|
|
case 2:
|
|
num = 1191746407;
|
|
break;
|
|
case 0:
|
|
base.ProgressContext = InteractionProgressContext.FromActionUseOrDefault(() => gameFunctions.InteractWith((uint)base.Task.AetheryteLocation, ObjectKind.Aetheryte));
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
public override ETaskResult Update()
|
|
{
|
|
int num = ((aetheryteFunctions.CanRegisterFreeOrFavoriteAetheryte(base.Task.AetheryteLocation) != AetheryteRegistrationResult.NotPossible) ? 473627761 : 473627764);
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = 473627760;
|
|
int num4 = num2;
|
|
int num5 = num4 + num3;
|
|
int num6 = num4 & num3;
|
|
switch (num5 - (num6 + num6))
|
|
{
|
|
case 0:
|
|
num = 473627764;
|
|
break;
|
|
case 7:
|
|
num = ((!base.ProgressContext.WasSuccessful()) ? 473627762 : 473627766);
|
|
break;
|
|
case 2:
|
|
return ETaskResult.StillRunning;
|
|
case 5:
|
|
_200C_202B_206D_200B_202A_202C_200B_206A_200D_202E_206C_202B_200B_206B_206F_206C_200F_200D_200B_206C_200D_202C_202C_206E_206F_206C_202E_206A_200D_206D_206F_202A_202A_206C_206F_206E_200E_200C_202D_202E_202E((ILogger)logger, global::_003CModule_003E._202A_206B_206D_200C_206B_200E_200E_202A_200B_202E_206A_206F_206A_206B_200E_200D_200F_206D_206E_206A_206F_200C_206C_202C_202A_206E_202C_200B_206E_202A_206E_202B_206B_202E_202E_206A_206D_206D_202C_200F_202E<string>(-180503859), new object[1] { base.Task.AetheryteLocation });
|
|
return ETaskResult.StillRunning;
|
|
case 4:
|
|
ResetProgressTimer();
|
|
return ETaskResult.TaskComplete;
|
|
case 6:
|
|
ResetProgressTimer();
|
|
num = 473627762;
|
|
break;
|
|
case 3:
|
|
num = ((!base.ProgressContext.WasInterrupted()) ? 473627767 : 473627765);
|
|
break;
|
|
case 1:
|
|
num = ((base.ProgressContext == null) ? 473627762 : 473627763);
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
public override bool ShouldInterruptOnDamage()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
static void _200C_202B_206D_200B_202A_202C_200B_206A_200D_202E_206C_202B_200B_206B_206F_206C_200F_200D_200B_206C_200D_202C_202C_206E_206F_206C_202E_206A_200D_206D_206F_202A_202A_206C_206F_206E_200E_200C_202D_202E_202E(ILogger P_0, string P_1, object[] P_2)
|
|
{
|
|
P_0.LogDebug(P_1, P_2);
|
|
}
|
|
}
|
|
}
|