forked from aly/qstbak
287 lines
16 KiB
C#
287 lines
16 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Runtime.CompilerServices;
|
|
using System.Text;
|
|
using Dalamud.Game.ClientState.Objects.Enums;
|
|
using Dalamud.Plugin.Services;
|
|
using Microsoft.Extensions.Logging;
|
|
using Questionable.Data;
|
|
using Questionable.Functions;
|
|
using Questionable.Model;
|
|
using Questionable.Model.Questing;
|
|
|
|
namespace Questionable.Controller.Steps.Interactions;
|
|
|
|
internal static class AetherCurrent
|
|
{
|
|
internal sealed class Factory(AetherCurrentData aetherCurrentData, IChatGui chatGui) : SimpleTaskFactory()
|
|
{
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
public override ITask? CreateTask(Quest quest, QuestSequence sequence, QuestStep step)
|
|
{
|
|
int num = ((_206B_200B_202B_200C_206F_202E_200C_206D_206F_206F_202A_206D_200C_200C_206C_200D_202B_202E_200F_202C_202A_206B_202E_206E_206B_202B_202D_206C_200B_200B_200B_206C_202A_200F_202E_202D_202C_200F_200D_202B_202E(step) == EInteractionType.AttuneAetherCurrent) ? 1616096496 : 1616096497);
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = 1616096499;
|
|
int num4 = num2;
|
|
int num5 = num4 + num3;
|
|
int num6 = num4 & num3;
|
|
switch (num5 - (num6 + num6))
|
|
{
|
|
case 0:
|
|
return new Attune(_202E_206C_200B_202C_200D_200C_206A_200B_206F_206D_206F_202E_202D_200F_200D_200B_202A_200D_200C_200D_202B_202D_206F_202B_202E_200F_206D_202B_202E_202A_200E_202D_200E_200E_206D_202B_206B_206C_200B_202D_202E(step).Value, _200B_200C_202D_206B_200F_202B_202A_200B_202B_202E_200D_206C_202A_206C_202A_202D_202D_200B_200D_202C_200C_206B_202A_206F_200B_206A_200C_206C_206A_206E_202E_202B_206F_202D_202E_200C_202C_206E_206B_206F_202E(step).Value);
|
|
case 2:
|
|
return null;
|
|
case 4:
|
|
num = 1616096497;
|
|
break;
|
|
case 1:
|
|
{
|
|
IChatGui chatGui = chatGui;
|
|
DefaultInterpolatedStringHandler defaultInterpolatedStringHandler = new DefaultInterpolatedStringHandler(86, 1);
|
|
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>(-494490534));
|
|
defaultInterpolatedStringHandler.AppendFormatted(_200B_200C_202D_206B_200F_202B_202A_200B_202B_202E_200D_206C_202A_206C_202A_202D_202D_200B_200D_202C_200C_206B_202A_206F_200B_206A_200C_206C_206A_206E_202E_202B_206F_202D_202E_200C_202C_206E_206B_206F_202E(step));
|
|
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>(214778039));
|
|
_202C_206F_206A_206F_202D_206B_200B_206E_206D_206E_202E_202B_200B_206E_200D_206A_206D_200B_206A_206D_200D_206E_206F_200E_206A_202B_206D_200C_202B_200E_206E_200D_202E_200C_202B_200B_200E_206E_200B_206D_202E(chatGui, defaultInterpolatedStringHandler.ToStringAndClear(), 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>(1231541163), (ushort?)(ushort)576);
|
|
return null;
|
|
}
|
|
case 3:
|
|
_200E_206F_206A_200C_202A_202A_202C_202D_206D_202C_202C_202B_202A_202D_206A_202D_202C_202C_206A_200D_206F_200E_206A_206C_200C_202A_200B_206D_200B_206D_200B_206A_202C_206F_202A_200E_206C_206C_206E_200E_202E((object)_202E_206C_200B_202C_200D_200C_206A_200B_206F_206D_206F_202E_202D_200F_200D_200B_202A_200D_200C_200D_202B_202D_206F_202B_202E_200F_206D_202B_202E_202A_200E_202D_200E_200E_206D_202B_206B_206C_200B_202D_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>(1549410118));
|
|
_200E_206F_206A_200C_202A_202A_202C_202D_206D_202C_202C_202B_202A_202D_206A_202D_202C_202C_206A_200D_206F_200E_206A_206C_200C_202A_200B_206D_200B_206D_200B_206A_202C_206F_202A_200E_206C_206C_206E_200E_202E((object)_200B_200C_202D_206B_200F_202B_202A_200B_202B_202E_200D_206C_202A_206C_202A_202D_202D_200B_200D_202C_200C_206B_202A_206F_200B_206A_200C_206C_206A_206E_202E_202B_206F_202D_202E_200C_202C_206E_206B_206F_202E(step), 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>(-672605828));
|
|
num = (aetherCurrentData.IsValidAetherCurrent(_200C_202A_206F_202E_206B_200B_200B_200B_202C_206F_202C_206F_206A_200D_202C_206F_200D_200F_202E_200B_206F_202B_206D_200D_200C_206E_202B_200B_202C_202E_200F_202D_200F_202C_206C_200E_200D_202B_202C_202A_202E(step), _200B_200C_202D_206B_200F_202B_202A_200B_202B_202E_200D_206C_202A_206C_202A_202D_202D_200B_200D_202C_200C_206B_202A_206F_200B_206A_200C_206C_206A_206E_202E_202B_206F_202D_202E_200C_202C_206E_206B_206F_202E(step).Value) ? 1616096499 : 1616096498);
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
static EInteractionType _206B_200B_202B_200C_206F_202E_200C_206D_206F_206F_202A_206D_200C_200C_206C_200D_202B_202E_200F_202C_202A_206B_202E_206E_206B_202B_202D_206C_200B_200B_200B_206C_202A_200F_202E_202D_202C_200F_200D_202B_202E(QuestStep P_0)
|
|
{
|
|
return P_0.InteractionType;
|
|
}
|
|
|
|
static uint? _202E_206C_200B_202C_200D_200C_206A_200B_206F_206D_206F_202E_202D_200F_200D_200B_202A_200D_200C_200D_202B_202D_206F_202B_202E_200F_206D_202B_202E_202A_200E_202D_200E_200E_206D_202B_206B_206C_200B_202D_202E(QuestStep P_0)
|
|
{
|
|
return P_0.DataId;
|
|
}
|
|
|
|
static void _200E_206F_206A_200C_202A_202A_202C_202D_206D_202C_202C_202B_202A_202D_206A_202D_202C_202C_206A_200D_206F_200E_206A_206C_200C_202A_200B_206D_200B_206D_200B_206A_202C_206F_202A_200E_206C_206C_206E_200E_202E(object P_0, string P_1)
|
|
{
|
|
ArgumentNullException.ThrowIfNull(P_0, P_1);
|
|
}
|
|
|
|
static uint? _200B_200C_202D_206B_200F_202B_202A_200B_202B_202E_200D_206C_202A_206C_202A_202D_202D_200B_200D_202C_200C_206B_202A_206F_200B_206A_200C_206C_206A_206E_202E_202B_206F_202D_202E_200C_202C_206E_206B_206F_202E(QuestStep P_0)
|
|
{
|
|
return P_0.AetherCurrentId;
|
|
}
|
|
|
|
static ushort _200C_202A_206F_202E_206B_200B_200B_200B_202C_206F_202C_206F_206A_200D_202C_206F_200D_200F_202E_200B_206F_202B_206D_200D_200C_206E_202B_200B_202C_202E_200F_202D_200F_202C_206C_200E_200D_202B_202C_202A_202E(QuestStep P_0)
|
|
{
|
|
return P_0.TerritoryId;
|
|
}
|
|
|
|
static void _202C_206F_206A_206F_202D_206B_200B_206E_206D_206E_202E_202B_200B_206E_200D_206A_206D_200B_206A_206D_200D_206E_206F_200E_206A_202B_206D_200C_202B_200E_206E_200D_202E_200C_202B_200B_200E_206E_200B_206D_202E(IChatGui P_0, string P_1, string P_2, ushort? P_3)
|
|
{
|
|
P_0.PrintError(P_1, P_2, P_3);
|
|
}
|
|
}
|
|
|
|
internal sealed record Attune(uint DataId, uint AetherCurrentId) : ITask
|
|
{
|
|
[CompilerGenerated]
|
|
private Type EqualityContract
|
|
{
|
|
[CompilerGenerated]
|
|
get
|
|
{
|
|
return _206E_200D_202C_202A_206C_200E_206F_200D_202B_206C_206C_202D_202C_200B_206A_200E_206E_206A_206C_202E_202A_200C_206E_202C_202A_206A_206D_202E_202B_202C_202A_202E_200E_200E_206F_202C_202E_206F_202D_200D_202E(typeof(Attune).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(21, 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>(361982327));
|
|
defaultInterpolatedStringHandler.AppendFormatted(AetherCurrentId);
|
|
defaultInterpolatedStringHandler.AppendLiteral(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>(424561659));
|
|
return defaultInterpolatedStringHandler.ToStringAndClear();
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
[CompilerGenerated]
|
|
private bool PrintMembers(StringBuilder builder)
|
|
{
|
|
_206E_202E_200E_200F_206D_206E_206D_202C_202A_202A_200D_202C_200D_206B_202A_202D_200D_202A_200C_202C_202B_200D_200D_202E_200E_206A_202E_202A_202D_202A_200C_202E_206B_202C_200D_202E_200D_206B_200D_200E_202E();
|
|
_202D_200C_206E_202D_202E_202E_200F_202D_200D_200C_200F_200C_200E_206E_206C_202E_202C_202A_202B_206F_202D_200F_200C_206C_202E_202C_200C_200F_206C_200D_206D_202C_206B_202D_206C_200C_200E_206F_206D_202B_202E(builder, 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>(-813337770));
|
|
_202D_200C_206E_202D_202E_202E_200F_202D_200D_200C_200F_200C_200E_206E_206C_202E_202C_202A_202B_206F_202D_200F_200C_206C_202E_202C_200C_200F_206C_200D_206D_202C_206B_202D_206C_200C_200E_206F_206D_202B_202E(builder, DataId.ToString());
|
|
_202D_200C_206E_202D_202E_202E_200F_202D_200D_200C_200F_200C_200E_206E_206C_202E_202C_202A_202B_206F_202D_200F_200C_206C_202E_202C_200C_200F_206C_200D_206D_202C_206B_202D_206C_200C_200E_206F_206D_202B_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>(-1099263671));
|
|
_202D_200C_206E_202D_202E_202E_200F_202D_200D_200C_200F_200C_200E_206E_206C_202E_202C_202A_202B_206F_202D_200F_200C_206C_202E_202C_200C_200F_206C_200D_206D_202C_206B_202D_206C_200C_200E_206F_206D_202B_202E(builder, AetherCurrentId.ToString());
|
|
return true;
|
|
}
|
|
|
|
[CompilerGenerated]
|
|
public bool Equals(Attune? other)
|
|
{
|
|
int num = (((object)this == other) ? (-814902453) : (-814902454));
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = -814902455;
|
|
int num4 = num2;
|
|
switch ((num4 | num3) - (num4 & num3))
|
|
{
|
|
case 2:
|
|
return true;
|
|
case 3:
|
|
num = (((object)other == null) ? (-814902456) : (-814902455));
|
|
break;
|
|
case 1:
|
|
return false;
|
|
case 4:
|
|
return EqualityComparer<uint>.Default.Equals(AetherCurrentId, other.AetherCurrentId);
|
|
case 6:
|
|
num = -814902454;
|
|
break;
|
|
case 5:
|
|
num = ((!EqualityComparer<uint>.Default.Equals(DataId, other.DataId)) ? (-814902456) : (-814902451));
|
|
break;
|
|
case 0:
|
|
num = ((!_206B_200B_200B_206C_206B_200F_200F_206E_200D_206D_200C_206F_206D_206A_206F_206B_202E_206C_200B_202E_206E_202B_206C_206F_206E_200E_206E_202E_202B_200E_202C_206A_202D_200B_206F_200B_202C_200C_202E_206C_202E(EqualityContract, other.EqualityContract)) ? (-814902456) : (-814902452));
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
bool IEquatable<Attune>.Equals(Attune? other)
|
|
{
|
|
//ILSpy generated this explicit interface implementation from .override directive in Equals
|
|
return this.Equals(other);
|
|
}
|
|
|
|
static Type _206E_200D_202C_202A_206C_200E_206F_200D_202B_206C_206C_202D_202C_200B_206A_200E_206E_206A_206C_202E_202A_200C_206E_202C_202A_206A_206D_202E_202B_202C_202A_202E_200E_200E_206F_202C_202E_206F_202D_200D_202E(RuntimeTypeHandle P_0)
|
|
{
|
|
return Type.GetTypeFromHandle(P_0);
|
|
}
|
|
|
|
static void _206E_202E_200E_200F_206D_206E_206D_202C_202A_202A_200D_202C_200D_206B_202A_202D_200D_202A_200C_202C_202B_200D_200D_202E_200E_206A_202E_202A_202D_202A_200C_202E_206B_202C_200D_202E_200D_206B_200D_200E_202E()
|
|
{
|
|
RuntimeHelpers.EnsureSufficientExecutionStack();
|
|
}
|
|
|
|
static StringBuilder _202D_200C_206E_202D_202E_202E_200F_202D_200D_200C_200F_200C_200E_206E_206C_202E_202C_202A_202B_206F_202D_200F_200C_206C_202E_202C_200C_200F_206C_200D_206D_202C_206B_202D_206C_200C_200E_206F_206D_202B_202E(StringBuilder P_0, string P_1)
|
|
{
|
|
return P_0.Append(P_1);
|
|
}
|
|
|
|
static bool _206B_200B_200B_206C_206B_200F_200F_206E_200D_206D_200C_206F_206D_206A_206F_206B_202E_206C_200B_202E_206E_202B_206C_206F_206E_200E_206E_202E_202B_200E_202C_206A_202D_200B_206F_200B_202C_200C_202E_206C_202E(Type P_0, Type P_1)
|
|
{
|
|
return P_0 == P_1;
|
|
}
|
|
}
|
|
|
|
internal sealed class DoAttune(GameFunctions gameFunctions, ILogger<DoAttune> logger) : TaskExecutor<Attune>()
|
|
{
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
protected override bool Start()
|
|
{
|
|
int num = (GameFunctions.IsAetherCurrentUnlocked(base.Task.AetherCurrentId) ? 1079740231 : 1079740228);
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = 1079740230;
|
|
int num4 = num2;
|
|
int num5 = num4 + num3;
|
|
int num6 = num4 & num3;
|
|
switch (num5 - (num6 + num6))
|
|
{
|
|
case 1:
|
|
_200E_200C_202B_200D_206C_206B_206B_206F_200E_206D_200E_200E_202C_200E_200C_200D_202D_206C_206D_206E_206A_206A_200F_200E_202C_206E_206E_202C_206F_200C_200B_206E_206F_202C_200E_200E_200F_202A_206B_202D_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>(693559237), new object[2]
|
|
{
|
|
base.Task.AetherCurrentId,
|
|
base.Task.DataId
|
|
});
|
|
return false;
|
|
case 2:
|
|
_206B_202B_202B_202B_200D_206B_202E_202A_206B_202A_202B_202B_202A_200D_202C_200F_202C_200F_200B_200F_206E_206C_206E_200B_200B_202A_206F_206B_200E_200F_200F_200E_206A_200E_202C_206A_200D_202A_206A_200D_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>(-2064140489), new object[2]
|
|
{
|
|
base.Task.AetherCurrentId,
|
|
base.Task.DataId
|
|
});
|
|
base.ProgressContext = InteractionProgressContext.FromActionUseOrDefault(() => gameFunctions.InteractWith(base.Task.DataId, ObjectKind.EventObj));
|
|
return true;
|
|
case 0:
|
|
goto IL_00ef;
|
|
}
|
|
continue;
|
|
IL_00ef:
|
|
num = 1079740228;
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
public override ETaskResult Update()
|
|
{
|
|
int num = ((!GameFunctions.IsAetherCurrentUnlocked(base.Task.AetherCurrentId)) ? (-272165629) : (-272165626));
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = -272165632;
|
|
int num4 = num2;
|
|
switch ((num4 | num3) - (num4 & num3))
|
|
{
|
|
case 4:
|
|
ResetProgressTimer();
|
|
num = -272165630;
|
|
break;
|
|
case 3:
|
|
num = ((base.ProgressContext == null) ? (-272165630) : (-272165632));
|
|
break;
|
|
case 6:
|
|
ResetProgressTimer();
|
|
return ETaskResult.TaskComplete;
|
|
case 7:
|
|
num = -272165626;
|
|
break;
|
|
case 1:
|
|
_200E_200C_202B_200D_206C_206B_206B_206F_200E_206D_200E_200E_202C_200E_200C_200D_202D_206C_206D_206E_206A_206A_200F_200E_202C_206E_206E_202C_206F_200C_200B_206E_206F_202C_200E_200E_200F_202A_206B_202D_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>(-119711603), new object[1] { base.Task.AetherCurrentId });
|
|
return ETaskResult.StillRunning;
|
|
case 2:
|
|
return ETaskResult.StillRunning;
|
|
case 0:
|
|
num = ((!base.ProgressContext.WasInterrupted()) ? (-272165627) : (-272165631));
|
|
break;
|
|
case 5:
|
|
num = ((!base.ProgressContext.WasSuccessful()) ? (-272165630) : (-272165628));
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
public override bool ShouldInterruptOnDamage()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
static void _206B_202B_202B_202B_200D_206B_202E_202A_206B_202A_202B_202B_202A_200D_202C_200F_202C_200F_200B_200F_206E_206C_206E_200B_200B_202A_206F_206B_200E_200F_200F_200E_206A_200E_202C_206A_200D_202A_206A_200D_202E(ILogger P_0, string P_1, object[] P_2)
|
|
{
|
|
P_0.LogInformation(P_1, P_2);
|
|
}
|
|
|
|
static void _200E_200C_202B_200D_206C_206B_206B_206F_200E_206D_200E_200E_202C_200E_200C_200D_202D_206C_206D_206E_206A_206A_200F_200E_202C_206E_206E_202C_206F_200C_200B_206E_206F_202C_200E_200E_200F_202A_206B_202D_202E(ILogger P_0, string P_1, object[] P_2)
|
|
{
|
|
P_0.LogDebug(P_1, P_2);
|
|
}
|
|
}
|
|
}
|