526 lines
30 KiB
C#
526 lines
30 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Collections.ObjectModel;
|
|
using System.Linq;
|
|
using System.Numerics;
|
|
using System.Runtime.CompilerServices;
|
|
using System.Runtime.InteropServices;
|
|
using System.Text;
|
|
using Dalamud.Game.ClientState.Conditions;
|
|
using Dalamud.Game.ClientState.Objects.SubKinds;
|
|
using Dalamud.Game.ClientState.Objects.Types;
|
|
using Dalamud.Plugin.Services;
|
|
using Microsoft.Extensions.Logging;
|
|
using Questionable.Controller.Steps.Movement;
|
|
using Questionable.Functions;
|
|
using SmartNav.Data;
|
|
using SmartNav.Model;
|
|
|
|
namespace Questionable.Controller.Steps.Shared;
|
|
|
|
internal static class AetheryteTeleport
|
|
{
|
|
internal sealed record Task(EAetheryteLocation TargetAetheryte, ushort ExpectedTerritoryId) : ISkippableTask, ITask
|
|
{
|
|
[CompilerGenerated]
|
|
private Type EqualityContract
|
|
{
|
|
[CompilerGenerated]
|
|
get
|
|
{
|
|
return _202E_202E_206D_200B_200C_200E_206A_202B_206D_200E_206B_202A_202D_206C_206B_200F_200B_202E_202C_202D_202B_206B_200F_206F_202A_202D_206B_202D_200C_200D_206B_202C_206D_200D_200C_202B_200D_200E_202E_206D_202E(typeof(Task).TypeHandle);
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
public override string ToString()
|
|
{
|
|
DefaultInterpolatedStringHandler defaultInterpolatedStringHandler = new DefaultInterpolatedStringHandler(14, 1);
|
|
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>(-749085387));
|
|
defaultInterpolatedStringHandler.AppendFormatted(TargetAetheryte);
|
|
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>(444206578));
|
|
return defaultInterpolatedStringHandler.ToStringAndClear();
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
[CompilerGenerated]
|
|
private bool PrintMembers(StringBuilder builder)
|
|
{
|
|
_202E_200C_206B_202D_202C_200D_206C_202D_200E_206F_202C_206E_200C_200B_206E_206F_200B_202D_206F_202E_200F_206E_206F_206C_200E_202D_202D_206D_202D_202B_206D_200E_206C_206A_202E_202C_206D_206D_206C_202B_202E();
|
|
_206B_202E_202E_206E_206A_200C_206D_200E_202C_200F_200D_206A_206A_200C_200E_200B_200B_206F_206F_202E_206B_206A_202E_206C_202E_202E_206C_206C_206E_200E_202E_202C_200C_202B_206A_206E_202E_206A_206A_206A_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>(-1084557892));
|
|
_206B_202E_202E_206E_206A_200C_206D_200E_202C_200F_200D_206A_206A_200C_200E_200B_200B_206F_206F_202E_206B_206A_202E_206C_202E_202E_206C_206C_206E_200E_202E_202C_200C_202B_206A_206E_202E_206A_206A_206A_202E(builder, TargetAetheryte.ToString());
|
|
_206B_202E_202E_206E_206A_200C_206D_200E_202C_200F_200D_206A_206A_200C_200E_200B_200B_206F_206F_202E_206B_206A_202E_206C_202E_202E_206C_206C_206E_200E_202E_202C_200C_202B_206A_206E_202E_206A_206A_206A_202E(builder, 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>(1768197240));
|
|
_206B_202E_202E_206E_206A_200C_206D_200E_202C_200F_200D_206A_206A_200C_200E_200B_200B_206F_206F_202E_206B_206A_202E_206C_202E_202E_206C_206C_206E_200E_202E_202C_200C_202B_206A_206E_202E_206A_206A_206A_202E(builder, ExpectedTerritoryId.ToString());
|
|
return true;
|
|
}
|
|
|
|
[CompilerGenerated]
|
|
public bool Equals(Task? other)
|
|
{
|
|
int num = (((object)this == other) ? 712329357 : 712329359);
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = 712329358;
|
|
int num4 = num2;
|
|
switch ((num4 | num3) - (num4 & num3))
|
|
{
|
|
case 6:
|
|
return false;
|
|
case 2:
|
|
num = ((!EqualityComparer<EAetheryteLocation>.Default.Equals(TargetAetheryte, other.TargetAetheryte)) ? 712329352 : 712329355);
|
|
break;
|
|
case 3:
|
|
return true;
|
|
case 1:
|
|
num = (((object)other == null) ? 712329352 : 712329358);
|
|
break;
|
|
case 0:
|
|
num = ((!_200C_206F_206D_202A_202D_206F_206E_202E_202E_202D_202D_202A_202C_202C_202E_202E_200E_200E_200D_200B_202C_206F_200B_206A_206B_202A_200E_202A_202E_202D_200E_206A_202B_206C_206F_206A_206E_200C_202E_202D_202E(EqualityContract, other.EqualityContract)) ? 712329352 : 712329356);
|
|
break;
|
|
case 4:
|
|
num = 712329359;
|
|
break;
|
|
case 5:
|
|
return EqualityComparer<ushort>.Default.Equals(ExpectedTerritoryId, other.ExpectedTerritoryId);
|
|
}
|
|
}
|
|
}
|
|
|
|
bool IEquatable<Task>.Equals(Task? other)
|
|
{
|
|
//ILSpy generated this explicit interface implementation from .override directive in Equals
|
|
return this.Equals(other);
|
|
}
|
|
|
|
static Type _202E_202E_206D_200B_200C_200E_206A_202B_206D_200E_206B_202A_202D_206C_206B_200F_200B_202E_202C_202D_202B_206B_200F_206F_202A_202D_206B_202D_200C_200D_206B_202C_206D_200D_200C_202B_200D_200E_202E_206D_202E(RuntimeTypeHandle P_0)
|
|
{
|
|
return Type.GetTypeFromHandle(P_0);
|
|
}
|
|
|
|
static void _202E_200C_206B_202D_202C_200D_206C_202D_200E_206F_202C_206E_200C_200B_206E_206F_200B_202D_206F_202E_200F_206E_206F_206C_200E_202D_202D_206D_202D_202B_206D_200E_206C_206A_202E_202C_206D_206D_206C_202B_202E()
|
|
{
|
|
RuntimeHelpers.EnsureSufficientExecutionStack();
|
|
}
|
|
|
|
static StringBuilder _206B_202E_202E_206E_206A_200C_206D_200E_202C_200F_200D_206A_206A_200C_200E_200B_200B_206F_206F_202E_206B_206A_202E_206C_202E_202E_206C_206C_206E_200E_202E_202C_200C_202B_206A_206E_202E_206A_206A_206A_202E(StringBuilder P_0, string P_1)
|
|
{
|
|
return P_0.Append(P_1);
|
|
}
|
|
|
|
static bool _200C_206F_206D_202A_202D_206F_206E_202E_202E_202D_202D_202A_202C_202C_202E_202E_200E_200E_200D_200B_202C_206F_200B_206A_206B_202A_200E_202A_202E_202D_200E_206A_202B_206C_206F_206A_206E_200C_202E_202D_202E(Type P_0, Type P_1)
|
|
{
|
|
return P_0 == P_1;
|
|
}
|
|
}
|
|
|
|
internal sealed class AetheryteTeleportExecutor(ILogger<AetheryteTeleportExecutor> logger, AetheryteFunctions aetheryteFunctions, IClientState clientState, IObjectTable objectTable, IChatGui chatGui, ICondition condition, AetheryteData aetheryteData) : TaskExecutor<Task>()
|
|
{
|
|
private bool _teleported;
|
|
|
|
private long _retryTeleportAt;
|
|
|
|
private int _teleportAttempts;
|
|
|
|
private const int MaxTeleportAttempts = 3;
|
|
|
|
protected override bool Start()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
public override ETaskResult Update()
|
|
{
|
|
int num = (_teleported ? 1711369376 : 1711369377);
|
|
IPlayerCharacter playerCharacter = default(IPlayerCharacter);
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = 1711369383;
|
|
int num4 = num2;
|
|
int num5 = num4 + num3;
|
|
int num6 = num4 & num3;
|
|
switch (num5 - (num6 + num6))
|
|
{
|
|
case 9:
|
|
return ETaskResult.StillRunning;
|
|
case 7:
|
|
num = ((_202E_200E_206B_200B_200F_202E_206E_206B_202B_206E_202B_206D_200D_206F_206E_200B_202D_206A_202A_200E_206E_206B_206A_206B_200B_200D_202C_200C_206F_206E_200E_206C_200B_200B_206E_200E_206B_202C_200B_200E_202E(clientState) != base.Task.ExpectedTerritoryId) ? 1711369378 : 1711369382);
|
|
break;
|
|
case 1:
|
|
playerCharacter = _200E_202E_200D_206B_206C_206D_202D_200D_200E_200C_202B_200E_206B_202C_202B_206F_200F_206A_200E_200B_206A_202D_202A_200E_200C_200E_202C_202E_202D_206A_206F_202E_202B_202E_206F_200C_202C_200F_200B_202B_202E(objectTable);
|
|
num = ((playerCharacter == null) ? 1711369386 : 1711369379);
|
|
break;
|
|
case 0:
|
|
return ETaskResult.StillRunning;
|
|
case 3:
|
|
_teleported = DoTeleport();
|
|
return ETaskResult.StillRunning;
|
|
case 10:
|
|
ResetProgressTimer();
|
|
num = 1711369390;
|
|
break;
|
|
case 11:
|
|
num = ((!base.ProgressContext.WasSuccessful()) ? 1711369390 : 1711369389);
|
|
break;
|
|
case 2:
|
|
num = 1711369377;
|
|
break;
|
|
case 12:
|
|
_206A_206E_206D_200B_200E_206F_202D_202C_200F_206A_200F_200F_200F_200E_202A_200C_202E_200E_206E_202E_202E_206E_200E_202E_200F_206F_206F_200D_200B_206D_206E_206F_200C_206F_200C_206B_200D_200B_200E_206F_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>(460204205), new object[1] { base.Task.TargetAetheryte });
|
|
return ETaskResult.StillRunning;
|
|
case 8:
|
|
num = ((!base.ProgressContext.WasInterrupted()) ? 1711369388 : 1711369387);
|
|
break;
|
|
case 5:
|
|
num = ((base.ProgressContext == null) ? 1711369390 : 1711369391);
|
|
break;
|
|
case 4:
|
|
num = ((!(_202E_200B_206C_206D_206A_206A_200D_200B_206E_202A_202A_206C_200E_202B_202A_202D_202E_206F_202C_206A_200C_200E_202B_206F_202C_202A_202A_206E_200F_200C_202D_202E_200B_206B_206D_206D_200D_200E_200B_202D_202E(aetheryteData, _206F_206C_202C_200C_200B_202D_202A_200C_206F_206B_206C_200F_206B_206A_206D_200C_202D_206F_206B_206E_202E_200C_206F_206F_200D_200D_202C_202D_206A_202B_202D_206A_206F_200F_206D_206B_202E_206E_200D_202E((IGameObject)playerCharacter), _202E_200E_206B_200B_200F_202E_206E_206B_202B_206E_202B_206D_200D_206F_206E_200B_202D_206A_202A_200E_206E_206B_206A_206B_200B_200D_202C_200C_206F_206E_200E_206C_200B_200B_206E_200E_206B_202C_200B_200E_202E(clientState), base.Task.TargetAetheryte) <= 50f)) ? 1711369378 : 1711369386);
|
|
break;
|
|
case 6:
|
|
num = ((_206A_202C_202B_206A_202C_202B_206B_202C_206F_206F_202B_206F_202D_206C_202D_202D_200C_200B_202B_206B_202E_202D_200F_202B_200E_206A_206A_206F_202B_200B_206B_202E_202D_200C_206C_200B_206A_206F_200D_202D_202E() >= _retryTeleportAt) ? 1711369380 : 1711369383);
|
|
break;
|
|
case 13:
|
|
ResetProgressTimer();
|
|
return ETaskResult.TaskComplete;
|
|
}
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
private bool DoTeleport()
|
|
{
|
|
int num = (aetheryteFunctions.CanTeleport(base.Task.TargetAetheryte) ? (-1816428016) : (-1816428003));
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = -1816428007;
|
|
int num4 = num2;
|
|
switch ((num4 | num3) - (num4 & num3))
|
|
{
|
|
case 3:
|
|
{
|
|
IChatGui chatGui = chatGui;
|
|
DefaultInterpolatedStringHandler defaultInterpolatedStringHandler = new DefaultInterpolatedStringHandler(27, 1);
|
|
defaultInterpolatedStringHandler.AppendLiteral(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>(599001678));
|
|
defaultInterpolatedStringHandler.AppendFormatted(base.Task.TargetAetheryte);
|
|
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>(-1014635520));
|
|
_202B_206D_206A_200C_202B_206E_206D_202A_200C_200E_200B_202C_202A_202C_202C_206F_206B_200B_200F_206B_200F_206A_202E_206F_206C_206B_206A_206B_206F_202A_200B_200C_202D_206A_206C_200C_200C_202C_202A_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);
|
|
throw new TaskException(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>(-1295664094));
|
|
}
|
|
case 10:
|
|
_206B_200D_202E_202D_202A_202D_202B_206E_200D_202E_206B_206E_200C_206F_206E_202A_206C_206A_200C_200C_200C_200B_206E_200B_206E_206A_202E_200F_206B_200B_206E_202A_206A_206F_200E_202E_206F_206E_202A_202A_202E(chatGui, 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>(1266800824), 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);
|
|
throw new TaskException(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>(1604023920));
|
|
case 4:
|
|
num = (aetheryteFunctions.IsTeleportUnlocked() ? (-1816428008) : (-1816428002));
|
|
break;
|
|
case 6:
|
|
num = -1816428003;
|
|
break;
|
|
case 8:
|
|
_retryTeleportAt = _206A_202C_202B_206A_202C_202B_206B_202C_206F_206F_202B_206F_202D_206C_202D_202D_200C_200B_202B_206B_202E_202D_200F_202B_200E_206A_206A_206F_202B_200B_206B_202E_202D_200C_206C_200B_206A_206F_200D_202D_202E() + 1000;
|
|
_200C_200B_202D_200E_200B_200E_202C_206D_202C_206D_200F_200D_200F_202E_202D_202D_200C_206B_200B_200B_202B_206C_202B_206E_202A_206E_200C_202B_206B_202E_206E_206F_202E_206E_200C_200E_202D_200E_206B_206A_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>(-424744046), new object[2] { _teleportAttempts, 3 });
|
|
return false;
|
|
case 1:
|
|
_retryTeleportAt = _206A_202C_202B_206A_202C_202B_206B_202C_206F_206F_202B_206F_202D_206C_202D_202D_200C_200B_202B_206B_202E_202D_200F_202B_200E_206A_206A_206F_202B_200B_206B_202E_202D_200C_206C_200B_206A_206F_200D_202D_202E() + 1000;
|
|
_206F_202C_206F_202A_200D_206E_206D_206B_206C_206F_200C_206D_200C_206E_200B_200D_206F_206F_202C_202A_202C_200B_200D_202D_206F_206A_206D_200D_202B_206B_206E_206E_202D_206F_202E_200C_202B_202E_200F_206D_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>(-501538903), Array.Empty<object>());
|
|
return false;
|
|
case 5:
|
|
_206E_202D_206F_202B_206B_200F_200D_202C_202D_200D_202C_202A_202C_206C_202A_206B_206E_200E_206C_202A_202E_206C_200B_206A_206D_200C_200F_202D_200D_206A_206D_200B_202E_200C_206D_206E_200B_202C_202C_200F_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>(-1089359613), Array.Empty<object>());
|
|
return true;
|
|
case 0:
|
|
base.ProgressContext = InteractionProgressContext.FromActionUseOrDefault(() => aetheryteFunctions.TeleportAetheryte(base.Task.TargetAetheryte));
|
|
num = ((base.ProgressContext == null) ? (-1816428005) : (-1816428004));
|
|
break;
|
|
case 7:
|
|
throw new TaskException(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>(451905220));
|
|
case 2:
|
|
{
|
|
int teleportAttempts = _teleportAttempts;
|
|
num3 = 1;
|
|
num4 = teleportAttempts;
|
|
num = (((_teleportAttempts = (num4 | num3) + (num4 & num3)) >= 3) ? (-1816428013) : (-1816428015));
|
|
break;
|
|
}
|
|
case 9:
|
|
num = (aetheryteFunctions.IsAetheryteUnlocked(base.Task.TargetAetheryte) ? (-1816428007) : (-1816428006));
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
public override bool WasInterrupted()
|
|
{
|
|
int num = (_200E_202C_206A_202E_202C_200E_206C_206A_200B_200D_200D_202B_202C_200C_200F_200C_206A_206D_200C_200F_206C_206A_200E_206B_202A_206B_206C_206E_206D_202A_206E_206E_206C_202C_206B_200C_200D_206D_200C_202B_202E(condition, ConditionFlag.InCombat) ? (-1702092527) : (-1702092528));
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = -1702092527;
|
|
int num4 = num2;
|
|
switch ((num4 | num3) - (num4 & num3))
|
|
{
|
|
case 2:
|
|
goto IL_004d;
|
|
case 1:
|
|
return base.WasInterrupted();
|
|
case 0:
|
|
return true;
|
|
}
|
|
continue;
|
|
IL_004d:
|
|
num = -1702092528;
|
|
}
|
|
}
|
|
|
|
public override bool ShouldInterruptOnDamage()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
static long _206A_202C_202B_206A_202C_202B_206B_202C_206F_206F_202B_206F_202D_206C_202D_202D_200C_200B_202B_206B_202E_202D_200F_202B_200E_206A_206A_206F_202B_200B_206B_202E_202D_200C_206C_200B_206A_206F_200D_202D_202E()
|
|
{
|
|
return Environment.TickCount64;
|
|
}
|
|
|
|
static uint _202E_200E_206B_200B_200F_202E_206E_206B_202B_206E_202B_206D_200D_206F_206E_200B_202D_206A_202A_200E_206E_206B_206A_206B_200B_200D_202C_200C_206F_206E_200E_206C_200B_200B_206E_200E_206B_202C_200B_200E_202E(IClientState P_0)
|
|
{
|
|
return P_0.TerritoryType;
|
|
}
|
|
|
|
static IPlayerCharacter _200E_202E_200D_206B_206C_206D_202D_200D_200E_200C_202B_200E_206B_202C_202B_206F_200F_206A_200E_200B_206A_202D_202A_200E_200C_200E_202C_202E_202D_206A_206F_202E_202B_202E_206F_200C_202C_200F_200B_202B_202E(IObjectTable P_0)
|
|
{
|
|
return P_0.LocalPlayer;
|
|
}
|
|
|
|
static Vector3 _206F_206C_202C_200C_200B_202D_202A_200C_206F_206B_206C_200F_206B_206A_206D_200C_202D_206F_206B_206E_202E_200C_206F_206F_200D_200D_202C_202D_206A_202B_202D_206A_206F_200F_206D_206B_202E_206E_200D_202E(IGameObject P_0)
|
|
{
|
|
return P_0.Position;
|
|
}
|
|
|
|
static float _202E_200B_206C_206D_206A_206A_200D_200B_206E_202A_202A_206C_200E_202B_202A_202D_202E_206F_202C_206A_200C_200E_202B_206F_202C_202A_202A_206E_200F_200C_202D_202E_200B_206B_206D_206D_200D_200E_200B_202D_202E(AetheryteData P_0, Vector3 P_1, uint P_2, EAetheryteLocation P_3)
|
|
{
|
|
return P_0.CalculateDistance(P_1, P_2, P_3);
|
|
}
|
|
|
|
static void _206A_206E_206D_200B_200E_206F_202D_202C_200F_206A_200F_200F_200F_200E_202A_200C_202E_200E_206E_202E_202E_206E_200E_202E_200F_206F_206F_200D_200B_206D_206E_206F_200C_206F_200C_206B_200D_200B_200E_206F_202E(ILogger P_0, string P_1, object[] P_2)
|
|
{
|
|
P_0.LogDebug(P_1, P_2);
|
|
}
|
|
|
|
static void _206F_202C_206F_202A_200D_206E_206D_206B_206C_206F_200C_206D_200C_206E_200B_200D_206F_206F_202C_202A_202C_200B_200D_202D_206F_206A_206D_200D_202B_206B_206E_206E_202D_206F_202E_200C_202B_202E_200F_206D_202E(ILogger P_0, string P_1, object[] P_2)
|
|
{
|
|
P_0.LogTrace(P_1, P_2);
|
|
}
|
|
|
|
static void _202B_206D_206A_200C_202B_206E_206D_202A_200C_200E_200B_202C_202A_202C_202C_206F_206B_200B_200F_206B_200F_206A_202E_206F_206C_206B_206A_206B_206F_202A_200B_200C_202D_206A_206C_200C_200C_202C_202A_202E(IChatGui P_0, string P_1, string P_2, ushort? P_3)
|
|
{
|
|
P_0.PrintError(P_1, P_2, P_3);
|
|
}
|
|
|
|
static void _206E_202D_206F_202B_206B_200F_200D_202C_202D_200D_202C_202A_202C_206C_202A_206B_206E_200E_206C_202A_202E_206C_200B_206A_206D_200C_200F_202D_200D_206A_206D_200B_202E_200C_206D_206E_200B_202C_202C_200F_202E(ILogger P_0, string P_1, object[] P_2)
|
|
{
|
|
P_0.LogInformation(P_1, P_2);
|
|
}
|
|
|
|
static void _200C_200B_202D_200E_200B_200E_202C_206D_202C_206D_200F_200D_200F_202E_202D_202D_200C_206B_200B_200B_202B_206C_202B_206E_202A_206E_200C_202B_206B_202E_206E_206F_202E_206E_200C_200E_202D_200E_206B_206A_202E(ILogger P_0, string P_1, object[] P_2)
|
|
{
|
|
P_0.LogWarning(P_1, P_2);
|
|
}
|
|
|
|
static void _206B_200D_202E_202D_202A_202D_202B_206E_200D_202E_206B_206E_200C_206F_206E_202A_206C_206A_200C_200C_200C_200B_206E_200B_206E_206A_202E_200F_206B_200B_206E_202A_206A_206F_200E_202E_206F_206E_202A_202A_202E(IChatGui P_0, string P_1, string P_2, ushort? P_3)
|
|
{
|
|
P_0.Print(P_1, P_2, P_3);
|
|
}
|
|
|
|
static bool _200E_202C_206A_202E_202C_200E_206C_206A_200B_200D_200D_202B_202C_200C_200F_200C_206A_206D_200C_200F_206C_206A_200E_206B_202A_206B_206C_206E_206D_202A_206E_206E_206C_202C_206B_200C_200D_206D_200C_202B_202E(ICondition P_0, ConditionFlag P_1)
|
|
{
|
|
return P_0[P_1];
|
|
}
|
|
}
|
|
|
|
internal sealed record MoveAwayFromAetheryte(EAetheryteLocation TargetAetheryte) : ITask
|
|
{
|
|
[CompilerGenerated]
|
|
private Type EqualityContract
|
|
{
|
|
[CompilerGenerated]
|
|
get
|
|
{
|
|
return _202B_206F_206F_200D_200E_200E_206E_200B_200B_200F_202B_202B_206D_202E_206A_206F_200D_200E_202A_206C_206C_200C_202A_206D_200F_206E_206B_200C_200F_202B_202D_206D_202A_202B_200C_200E_200C_200B_206F_202E_202E(typeof(MoveAwayFromAetheryte).TypeHandle);
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
public override string ToString()
|
|
{
|
|
DefaultInterpolatedStringHandler defaultInterpolatedStringHandler = new DefaultInterpolatedStringHandler(10, 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>(578312142));
|
|
defaultInterpolatedStringHandler.AppendFormatted(TargetAetheryte);
|
|
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>(444206578));
|
|
return defaultInterpolatedStringHandler.ToStringAndClear();
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
[CompilerGenerated]
|
|
private bool PrintMembers(StringBuilder builder)
|
|
{
|
|
_202D_206B_202D_200B_202C_206F_206D_206B_202B_206B_206A_200F_200D_206D_202B_202D_202C_206A_206E_202E_202C_200D_206A_206A_200F_206E_206F_206E_202C_202C_206F_202A_200D_206D_200D_202A_202E_202A_206D_202E();
|
|
_206F_200D_202B_202B_200E_200C_202D_200E_200E_206F_200D_206E_202C_206A_200B_206C_206C_200B_200F_202C_202D_202E_202C_206D_206F_206F_202D_202A_206D_202E_206F_202D_206F_202C_206B_202C_206D_200B_206B_200C_202E(builder, 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>(-1402978722));
|
|
_206F_200D_202B_202B_200E_200C_202D_200E_200E_206F_200D_206E_202C_206A_200B_206C_206C_200B_200F_202C_202D_202E_202C_206D_206F_206F_202D_202A_206D_202E_206F_202D_206F_202C_206B_202C_206D_200B_206B_200C_202E(builder, TargetAetheryte.ToString());
|
|
return true;
|
|
}
|
|
|
|
[CompilerGenerated]
|
|
public bool Equals(MoveAwayFromAetheryte? other)
|
|
{
|
|
int num = (((object)this == other) ? 278211642 : 278211645);
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = 278211641;
|
|
int num4 = num2;
|
|
int num5 = num4 + num3;
|
|
int num6 = num4 & num3;
|
|
switch (num5 - (num6 + num6))
|
|
{
|
|
case 0:
|
|
num = 278211645;
|
|
break;
|
|
case 5:
|
|
return false;
|
|
case 4:
|
|
num = (((object)other == null) ? 278211644 : 278211640);
|
|
break;
|
|
case 3:
|
|
return true;
|
|
case 2:
|
|
return EqualityComparer<EAetheryteLocation>.Default.Equals(TargetAetheryte, other.TargetAetheryte);
|
|
case 1:
|
|
num = ((!_200E_206C_202E_200E_200F_202B_202E_200F_202D_200B_206A_200C_206B_206B_206C_200F_200F_206A_200E_202D_200D_200B_200E_202C_206C_206A_200E_206B_200F_202D_200D_206C_200F_206D_200B_200D_200C_202D_200F_206F_202E(EqualityContract, other.EqualityContract)) ? 278211644 : 278211643);
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
bool IEquatable<MoveAwayFromAetheryte>.Equals(MoveAwayFromAetheryte? other)
|
|
{
|
|
//ILSpy generated this explicit interface implementation from .override directive in Equals
|
|
return this.Equals(other);
|
|
}
|
|
|
|
static Type _202B_206F_206F_200D_200E_200E_206E_200B_200B_200F_202B_202B_206D_202E_206A_206F_200D_200E_202A_206C_206C_200C_202A_206D_200F_206E_206B_200C_200F_202B_202D_206D_202A_202B_200C_200E_200C_200B_206F_202E_202E(RuntimeTypeHandle P_0)
|
|
{
|
|
return Type.GetTypeFromHandle(P_0);
|
|
}
|
|
|
|
static void _202D_206B_202D_200B_202C_206F_206D_206B_202B_206B_206A_200F_200D_206D_202B_202D_202C_206A_206E_202E_202C_200D_206A_206A_200F_206E_206F_206E_202C_202C_206F_202A_200D_206D_200D_202A_202E_202A_206D_202E()
|
|
{
|
|
RuntimeHelpers.EnsureSufficientExecutionStack();
|
|
}
|
|
|
|
static StringBuilder _206F_200D_202B_202B_200E_200C_202D_200E_200E_206F_200D_206E_202C_206A_200B_206C_206C_200B_200F_202C_202D_202E_202C_206D_206F_206F_202D_202A_206D_202E_206F_202D_206F_202C_206B_202C_206D_200B_206B_200C_202E(StringBuilder P_0, string P_1)
|
|
{
|
|
return P_0.Append(P_1);
|
|
}
|
|
|
|
static bool _200E_206C_202E_200E_200F_202B_202E_200F_202D_200B_206A_200C_206B_206B_206C_200F_200F_206A_200E_202D_200D_200B_200E_202C_206C_206A_200E_206B_200F_202D_200D_206C_200F_206D_200B_200D_200C_202D_200F_206F_202E(Type P_0, Type P_1)
|
|
{
|
|
return P_0 == P_1;
|
|
}
|
|
}
|
|
|
|
internal sealed class MoveAwayFromAetheryteExecutor(MoveExecutor moveExecutor, AetheryteData aetheryteData, IClientState clientState, IObjectTable objectTable) : TaskExecutor<MoveAwayFromAetheryte>()
|
|
{
|
|
private static readonly Dictionary<EAetheryteLocation, List<Vector3>> AetherytesToMoveFrom;
|
|
|
|
public static bool AppliesTo(EAetheryteLocation location)
|
|
{
|
|
return AetherytesToMoveFrom.ContainsKey(location);
|
|
}
|
|
|
|
protected override bool Start()
|
|
{
|
|
IPlayerCharacter playerCharacter = _202B_206E_206F_206B_202E_206F_202B_200D_202B_202C_206E_206A_206D_202D_202C_202D_202A_206E_202D_200E_200D_206C_202B_206A_202B_206A_206C_206E_200D_206C_202D_206C_202B_202A_206C_206E_206D_200F_202D_206B_202E(objectTable);
|
|
int num = ((playerCharacter != null) ? 1693276113 : 1693276115);
|
|
Vector3 playerPosition = default(Vector3);
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = 1693276112;
|
|
int num4 = num2;
|
|
switch ((num4 | num3) - (num4 & num3))
|
|
{
|
|
case 0:
|
|
num = 1693276115;
|
|
break;
|
|
case 3:
|
|
return false;
|
|
case 1:
|
|
playerPosition = _206F_206F_206C_200E_206B_200F_200D_202C_206B_206F_202D_206B_200C_200D_206C_200B_202E_202E_202A_202D_202E_200C_206A_200E_202B_200F_200E_200F_206A_200B_202A_200E_202C_200F_200B_202A_202B_200D_206C_200C_202E((IGameObject)playerCharacter);
|
|
num = ((!(_206B_200B_200F_200C_202D_206F_200C_206F_200F_202B_206D_206F_202D_200B_200E_200C_206C_206C_206B_200C_202D_200C_200E_202B_200C_200B_202B_206C_200F_206B_206D_202D_202D_202D_202C_206D_202C_200E_202C_206D_202E(aetheryteData, playerPosition, _202B_200D_200F_202D_200F_206F_206D_202C_206A_206B_206B_202D_206E_206D_206A_202E_200C_200C_202B_206F_200E_206D_202B_206C_200C_206C_202D_206A_202A_206E_206F_200B_206B_202A_200B_206C_200E_202D_200E_202C_202E(clientState), base.Task.TargetAetheryte) >= 20f)) ? 1693276114 : 1693276116);
|
|
break;
|
|
case 4:
|
|
return false;
|
|
case 2:
|
|
{
|
|
Vector3 destination = AetherytesToMoveFrom[base.Task.TargetAetheryte].MinBy((Vector3 x) => Vector3.Distance(x, playerPosition));
|
|
MoveTask task = new MoveTask(_202D_202E_202C_202E_200D_202A_206C_206F_200E_206A_200B_202D_206C_206E_202C_202E_206F_206E_200D_206A_202D_206F_206B_202A_202C_202D_200C_202A_200B_206F_200B_206C_200D_200D_202E_202C_202E_202D_202E_200D_202E(aetheryteData)[base.Task.TargetAetheryte], destination, false, MountRequired: false, DismountRequired: false, 0.25f, null, DisableNavmesh: true, null, Fly: false, Land: false, IgnoreDistanceToObject: false, RestartNavigation: false);
|
|
return moveExecutor.Start(task);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
public override ETaskResult Update()
|
|
{
|
|
return moveExecutor.Update();
|
|
}
|
|
|
|
public override bool ShouldInterruptOnDamage()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
static MoveAwayFromAetheryteExecutor()
|
|
{
|
|
Dictionary<EAetheryteLocation, List<Vector3>> dictionary = new Dictionary<EAetheryteLocation, List<Vector3>>();
|
|
int num = 4;
|
|
List<Vector3> list = new List<Vector3>(num);
|
|
CollectionsMarshal.SetCount(list, num);
|
|
Span<Vector3> span = CollectionsMarshal.AsSpan(list);
|
|
span[0] = new Vector3(0f, 8.8f, 15.5f);
|
|
span[1] = new Vector3(0f, 8.8f, -15.5f);
|
|
span[2] = new Vector3(15.5f, 8.8f, 0f);
|
|
span[3] = new Vector3(-15.5f, 8.8f, 0f);
|
|
dictionary.Add(EAetheryteLocation.SolutionNine, list);
|
|
AetherytesToMoveFrom = dictionary;
|
|
}
|
|
|
|
static IPlayerCharacter _202B_206E_206F_206B_202E_206F_202B_200D_202B_202C_206E_206A_206D_202D_202C_202D_202A_206E_202D_200E_200D_206C_202B_206A_202B_206A_206C_206E_200D_206C_202D_206C_202B_202A_206C_206E_206D_200F_202D_206B_202E(IObjectTable P_0)
|
|
{
|
|
return P_0.LocalPlayer;
|
|
}
|
|
|
|
static Vector3 _206F_206F_206C_200E_206B_200F_200D_202C_206B_206F_202D_206B_200C_200D_206C_200B_202E_202E_202A_202D_202E_200C_206A_200E_202B_200F_200E_200F_206A_200B_202A_200E_202C_200F_200B_202A_202B_200D_206C_200C_202E(IGameObject P_0)
|
|
{
|
|
return P_0.Position;
|
|
}
|
|
|
|
static uint _202B_200D_200F_202D_200F_206F_206D_202C_206A_206B_206B_202D_206E_206D_206A_202E_200C_200C_202B_206F_200E_206D_202B_206C_200C_206C_202D_206A_202A_206E_206F_200B_206B_202A_200B_206C_200E_202D_200E_202C_202E(IClientState P_0)
|
|
{
|
|
return P_0.TerritoryType;
|
|
}
|
|
|
|
static float _206B_200B_200F_200C_202D_206F_200C_206F_200F_202B_206D_206F_202D_200B_200E_200C_206C_206C_206B_200C_202D_200C_200E_202B_200C_200B_202B_206C_200F_206B_206D_202D_202D_202D_202C_206D_202C_200E_202C_206D_202E(AetheryteData P_0, Vector3 P_1, uint P_2, EAetheryteLocation P_3)
|
|
{
|
|
return P_0.CalculateDistance(P_1, P_2, P_3);
|
|
}
|
|
|
|
static ReadOnlyDictionary<EAetheryteLocation, ushort> _202D_202E_202C_202E_200D_202A_206C_206F_200E_206A_200B_202D_206C_206E_202C_202E_206F_206E_200D_206A_202D_206F_206B_202A_202C_202D_200C_202A_200B_206F_200B_206C_200D_200D_202E_202C_202E_202D_202E_200D_202E(AetheryteData P_0)
|
|
{
|
|
return P_0.TerritoryIds;
|
|
}
|
|
}
|
|
}
|