forked from aly/qstbak
61 lines
2.7 KiB
C#
61 lines
2.7 KiB
C#
using System.Numerics;
|
|
using System.Runtime.CompilerServices;
|
|
using Dalamud.Game.ClientState.Objects.SubKinds;
|
|
using Dalamud.Game.ClientState.Objects.Types;
|
|
using Dalamud.Plugin.Services;
|
|
using Questionable.Functions;
|
|
|
|
namespace Questionable.Controller.Steps.Movement;
|
|
|
|
internal sealed class WaitForNearDataIdExecutor(GameFunctions gameFunctions, IObjectTable objectTable) : TaskExecutor<WaitForNearDataId>()
|
|
{
|
|
protected override bool Start()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
public override ETaskResult Update()
|
|
{
|
|
IGameObject gameObject = gameFunctions.FindObjectByDataId(base.Task.DataId);
|
|
IPlayerCharacter playerCharacter = _202E_206D_202B_206B_206B_206A_206B_202D_200E_202D_206A_206A_200C_200B_206A_206E_206C_200D_206B_206D_206F_200C_202D_202C_200D_202E_206A_202E_202E_200B_200E_206E_202C_206F_206A_206E_206C_202A_202B_206A_202E(objectTable);
|
|
int num = ((gameObject == null) ? (-1888435881) : (-1888435883));
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = -1888435882;
|
|
int num4 = num2;
|
|
switch ((num4 | num3) - (num4 & num3))
|
|
{
|
|
case 0:
|
|
num = -1888435883;
|
|
break;
|
|
case 2:
|
|
num = ((!((_202E_206C_202D_202D_206F_206F_202E_206F_202C_202A_202D_206C_202B_206C_202D_206E_202A_206D_206D_206A_202E_200D_200B_200E_200D_202D_206E_200D_202D_206A_200E_202D_202C_206B_200F_206B_206A_202D_206B_206B_202E(gameObject) - _202E_206C_202D_202D_206F_206F_202E_206F_202C_202A_202D_206C_202B_206C_202D_206E_202A_206D_206D_206A_202E_200D_200B_200E_200D_202D_206E_200D_202D_206A_200E_202D_202C_206B_200F_206B_206A_202D_206B_206B_202E((IGameObject)playerCharacter)).Length() > base.Task.StopDistance)) ? (-1888435886) : (-1888435881));
|
|
break;
|
|
case 3:
|
|
num = ((playerCharacter == null) ? (-1888435881) : (-1888435884));
|
|
break;
|
|
case 4:
|
|
return ETaskResult.TaskComplete;
|
|
case 1:
|
|
throw new TaskException(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>(1158873543));
|
|
}
|
|
}
|
|
}
|
|
|
|
public override bool ShouldInterruptOnDamage()
|
|
{
|
|
return false;
|
|
}
|
|
|
|
static IPlayerCharacter _202E_206D_202B_206B_206B_206A_206B_202D_200E_202D_206A_206A_200C_200B_206A_206E_206C_200D_206B_206D_206F_200C_202D_202C_200D_202E_206A_202E_202E_200B_200E_206E_202C_206F_206A_206E_206C_202A_202B_206A_202E(IObjectTable P_0)
|
|
{
|
|
return P_0.LocalPlayer;
|
|
}
|
|
|
|
static Vector3 _202E_206C_202D_202D_206F_206F_202E_206F_202C_202A_202D_206C_202B_206C_202D_206E_202A_206D_206D_206A_202E_200D_200B_200E_200D_202D_206E_200D_202D_206A_200E_202D_202C_206B_200F_206B_206A_202D_206B_206B_202E(IGameObject P_0)
|
|
{
|
|
return P_0.Position;
|
|
}
|
|
}
|