830 lines
40 KiB
C#
830 lines
40 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Numerics;
|
|
using System.Runtime.CompilerServices;
|
|
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 FFXIVClientStructs.FFXIV.Client.Game;
|
|
using FFXIVClientStructs.FFXIV.Client.Game.Character;
|
|
using LLib.Fishing;
|
|
using Microsoft.Extensions.Logging;
|
|
using Questionable.Controller.CustomDelivery;
|
|
using Questionable.Controller.Steps;
|
|
using Questionable.Controller.Steps.Common;
|
|
using Questionable.Data;
|
|
using Questionable.External;
|
|
using Questionable.Navigation;
|
|
|
|
namespace Questionable.Controller;
|
|
|
|
internal sealed class FishingController : MiniTaskController<FishingController>
|
|
{
|
|
public sealed record FishingRequest(uint ItemId, int Quantity, ushort Collectability)
|
|
{
|
|
[CompilerGenerated]
|
|
private Type EqualityContract
|
|
{
|
|
[CompilerGenerated]
|
|
get
|
|
{
|
|
return _202A_200B_206F_202C_206E_206F_206E_202B_206A_200F_200D_206F_202A_200C_200C_206B_202A_206B_206B_202A_206A_206C_200D_206A_206C_202E_200F_202B_202D_202C_206D_202C_200C_200F_206D_202C_202C_200E_202B_202D_202E(typeof(FishingRequest).TypeHandle);
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
[CompilerGenerated]
|
|
public override string ToString()
|
|
{
|
|
StringBuilder stringBuilder = _200C_206F_200E_200F_202B_200D_200E_206F_206F_202B_206C_200C_202C_200B_202B_200D_200B_200F_206E_206F_202A_200C_202C_206E_200B_200C_206E_206B_202D_206E_200D_200E_202E_206F_200F_206C_206E_206A_200F_206E_202E();
|
|
_200B_206F_202D_200E_202C_202A_200F_202D_200D_206F_206A_200E_200C_202C_206F_200C_202B_200E_200C_200D_202C_202E_202A_202B_202B_200C_202B_202D_200D_200E_206E_206F_200B_202C_206C_206C_206F_206F_206D_206B_202E(stringBuilder, 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>(-149753861));
|
|
_200B_206F_202D_200E_202C_202A_200F_202D_200D_206F_206A_200E_200C_202C_206F_200C_202B_200E_200C_200D_202C_202E_202A_202B_202B_200C_202B_202D_200D_200E_206E_206F_200B_202C_206C_206C_206F_206F_206D_206B_202E(stringBuilder, 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>(698284764));
|
|
int num = ((!PrintMembers(stringBuilder)) ? (-649209154) : (-649209155));
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = -649209156;
|
|
int num4 = num2;
|
|
int num5 = num4 + num3;
|
|
int num6 = num4 & num3;
|
|
switch (num5 - (num6 + num6))
|
|
{
|
|
case 0:
|
|
num = -649209155;
|
|
break;
|
|
case 1:
|
|
_200C_206B_202B_206F_202D_206B_206E_200F_206B_200E_202A_206E_206E_202C_200E_200E_202B_206E_202E_200D_202B_200B_202D_206F_206E_200C_200C_206D_200B_206E_200B_200C_200D_206C_202B_200E_200E_202E_200F_206C_202E(stringBuilder, ' ');
|
|
num = -649209154;
|
|
break;
|
|
case 2:
|
|
_200C_206B_202B_206F_202D_206B_206E_200F_206B_200E_202A_206E_206E_202C_200E_200E_202B_206E_202E_200D_202B_200B_202D_206F_206E_200C_200C_206D_200B_206E_200B_200C_200D_206C_202B_200E_200E_202E_200F_206C_202E(stringBuilder, '}');
|
|
return _200B_200E_200E_200C_206C_200B_206B_206F_202B_200C_200C_206B_200F_200C_200D_200B_200B_202D_206C_202D_200D_200E_200D_200E_206F_206A_206F_202C_202A_206A_206E_206E_206B_206A_206A_206B_202C_200F_206C_200C_202E((object)stringBuilder);
|
|
}
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
[CompilerGenerated]
|
|
private bool PrintMembers(StringBuilder builder)
|
|
{
|
|
_202B_202C_200F_200F_206D_206C_202C_202A_202E_206E_202C_200F_202B_206F_206E_206B_206E_202B_200E_200B_202A_206C_200E_202B_202E_200C_202A_206D_200C_202E_200E_200F_200C_200F_200E_202B_206A_202E_202B_206B_202E();
|
|
_200B_206F_202D_200E_202C_202A_200F_202D_200D_206F_206A_200E_200C_202C_206F_200C_202B_200E_200C_200D_202C_202E_202A_202B_202B_200C_202B_202D_200D_200E_206E_206F_200B_202C_206C_206C_206F_206F_206D_206B_202E(builder, 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>(-1176260912));
|
|
_200B_206F_202D_200E_202C_202A_200F_202D_200D_206F_206A_200E_200C_202C_206F_200C_202B_200E_200C_200D_202C_202E_202A_202B_202B_200C_202B_202D_200D_200E_206E_206F_200B_202C_206C_206C_206F_206F_206D_206B_202E(builder, ItemId.ToString());
|
|
_200B_206F_202D_200E_202C_202A_200F_202D_200D_206F_206A_200E_200C_202C_206F_200C_202B_200E_200C_200D_202C_202E_202A_202B_202B_200C_202B_202D_200D_200E_206E_206F_200B_202C_206C_206C_206F_206F_206D_206B_202E(builder, 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>(-563538637));
|
|
_200B_206F_202D_200E_202C_202A_200F_202D_200D_206F_206A_200E_200C_202C_206F_200C_202B_200E_200C_200D_202C_202E_202A_202B_202B_200C_202B_202D_200D_200E_206E_206F_200B_202C_206C_206C_206F_206F_206D_206B_202E(builder, Quantity.ToString());
|
|
_200B_206F_202D_200E_202C_202A_200F_202D_200D_206F_206A_200E_200C_202C_206F_200C_202B_200E_200C_200D_202C_202E_202A_202B_202B_200C_202B_202D_200D_200E_206E_206F_200B_202C_206C_206C_206F_206F_206D_206B_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>(1025003851));
|
|
_200B_206F_202D_200E_202C_202A_200F_202D_200D_206F_206A_200E_200C_202C_206F_200C_202B_200E_200C_200D_202C_202E_202A_202B_202B_200C_202B_202D_200D_200E_206E_206F_200B_202C_206C_206C_206F_206F_206D_206B_202E(builder, Collectability.ToString());
|
|
return true;
|
|
}
|
|
|
|
[CompilerGenerated]
|
|
public bool Equals(FishingRequest? other)
|
|
{
|
|
int num = (((object)this == other) ? 677274432 : 677274436);
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = 677274434;
|
|
int num4 = num2;
|
|
int num5 = num4 + num3;
|
|
int num6 = num4 & num3;
|
|
switch (num5 - (num6 + num6))
|
|
{
|
|
case 0:
|
|
num = 677274436;
|
|
break;
|
|
case 4:
|
|
num = ((!_200C_200C_202C_206E_200D_202B_200B_202E_202B_200F_206F_200B_202D_202B_200B_202E_202A_200B_200B_206E_200B_206A_206B_206D_206B_202A_200C_206F_202A_206E_206F_202E_206A_206E_202E_206D_200F_200B_202D_202A_202E(EqualityContract, other.EqualityContract)) ? 677274435 : 677274437);
|
|
break;
|
|
case 3:
|
|
num = ((!EqualityComparer<int>.Default.Equals(Quantity, other.Quantity)) ? 677274435 : 677274439);
|
|
break;
|
|
case 5:
|
|
return EqualityComparer<ushort>.Default.Equals(Collectability, other.Collectability);
|
|
case 7:
|
|
num = ((!EqualityComparer<uint>.Default.Equals(ItemId, other.ItemId)) ? 677274435 : 677274433);
|
|
break;
|
|
case 1:
|
|
return false;
|
|
case 6:
|
|
num = (((object)other == null) ? 677274435 : 677274438);
|
|
break;
|
|
case 2:
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
|
|
bool IEquatable<FishingRequest>.Equals(FishingRequest? other)
|
|
{
|
|
//ILSpy generated this explicit interface implementation from .override directive in Equals
|
|
return this.Equals(other);
|
|
}
|
|
|
|
static Type _202A_200B_206F_202C_206E_206F_206E_202B_206A_200F_200D_206F_202A_200C_200C_206B_202A_206B_206B_202A_206A_206C_200D_206A_206C_202E_200F_202B_202D_202C_206D_202C_200C_200F_206D_202C_202C_200E_202B_202D_202E(RuntimeTypeHandle P_0)
|
|
{
|
|
return Type.GetTypeFromHandle(P_0);
|
|
}
|
|
|
|
static StringBuilder _200C_206F_200E_200F_202B_200D_200E_206F_206F_202B_206C_200C_202C_200B_202B_200D_200B_200F_206E_206F_202A_200C_202C_206E_200B_200C_206E_206B_202D_206E_200D_200E_202E_206F_200F_206C_206E_206A_200F_206E_202E()
|
|
{
|
|
return new StringBuilder();
|
|
}
|
|
|
|
static StringBuilder _200B_206F_202D_200E_202C_202A_200F_202D_200D_206F_206A_200E_200C_202C_206F_200C_202B_200E_200C_200D_202C_202E_202A_202B_202B_200C_202B_202D_200D_200E_206E_206F_200B_202C_206C_206C_206F_206F_206D_206B_202E(StringBuilder P_0, string P_1)
|
|
{
|
|
return P_0.Append(P_1);
|
|
}
|
|
|
|
static StringBuilder _200C_206B_202B_206F_202D_206B_206E_200F_206B_200E_202A_206E_206E_202C_200E_200E_202B_206E_202E_200D_202B_200B_202D_206F_206E_200C_200C_206D_200B_206E_200B_200C_200D_206C_202B_200E_200E_202E_200F_206C_202E(StringBuilder P_0, char P_1)
|
|
{
|
|
return P_0.Append(P_1);
|
|
}
|
|
|
|
static string _200B_200E_200E_200C_206C_200B_206B_206F_202B_200C_200C_206B_200F_200C_200D_200B_200B_202D_206C_202D_200D_200E_200D_200E_206F_206A_206F_202C_202A_206A_206E_206E_206B_206A_206A_206B_202C_200F_206C_200C_202E(object P_0)
|
|
{
|
|
return P_0.ToString();
|
|
}
|
|
|
|
static void _202B_202C_200F_200F_206D_206C_202C_202A_202E_206E_202C_200F_202B_206F_206E_206B_206E_202B_200E_200B_202A_206C_200E_202B_202E_200C_202A_206D_200C_202E_200E_200F_200C_200F_200E_202B_206A_202E_202B_206B_202E()
|
|
{
|
|
RuntimeHelpers.EnsureSufficientExecutionStack();
|
|
}
|
|
|
|
static bool _200C_200C_202C_206E_200D_202B_200B_202E_202B_200F_206F_200B_202D_202B_200B_202E_202A_200B_200B_206E_200B_206A_206B_206D_206B_202A_200C_206F_202A_206E_206F_202E_206A_206E_202E_206D_200F_200B_202D_202A_202E(Type P_0, Type P_1)
|
|
{
|
|
return P_0 == P_1;
|
|
}
|
|
}
|
|
|
|
public enum EFishingState
|
|
{
|
|
Idle,
|
|
Navigating,
|
|
Orienting,
|
|
Preparing,
|
|
Fishing,
|
|
Complete
|
|
}
|
|
|
|
private const long FishingTimeoutMs = 180000L;
|
|
|
|
private const uint CollectorsGloveActionId = 4101u;
|
|
|
|
private const uint CollectorsGloveStatusId = 805u;
|
|
|
|
private const uint CastActionId = 289u;
|
|
|
|
private const uint VersatileLureId = 29717u;
|
|
|
|
private const int LurePurchaseQuantity = 99;
|
|
|
|
private readonly FishingData _fishingData;
|
|
|
|
private readonly AutoHookIpc _autoHookIpc;
|
|
|
|
private readonly VendorResolverService _vendorResolver;
|
|
|
|
private readonly NavmeshIpc _navmeshIpc;
|
|
|
|
private readonly SmartNavRouteEnqueuer _routeEnqueuer;
|
|
|
|
private readonly IObjectTable _objectTable;
|
|
|
|
private readonly ICondition _condition;
|
|
|
|
private FishingRequest? _currentRequest;
|
|
|
|
private long _fishStartMs;
|
|
|
|
private int _lastFishCount;
|
|
|
|
private long _actionThrottle;
|
|
|
|
private bool _baitReady;
|
|
|
|
public EFishingState State { get; private set; }
|
|
|
|
public bool IsRunning
|
|
{
|
|
get
|
|
{
|
|
int num = ((State == EFishingState.Idle) ? (-112078876) : (-112078873));
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = -112078874;
|
|
int num4 = num2;
|
|
switch ((num4 | num3) - (num4 & num3))
|
|
{
|
|
case 0:
|
|
goto IL_0046;
|
|
case 2:
|
|
return false;
|
|
case 1:
|
|
return State != EFishingState.Complete;
|
|
}
|
|
continue;
|
|
IL_0046:
|
|
num = -112078873;
|
|
}
|
|
}
|
|
}
|
|
|
|
public TaskQueue TaskQueue => _taskQueue;
|
|
|
|
public uint? CurrentItemId => _currentRequest?.ItemId;
|
|
|
|
public FishingController(FishingData fishingData, AutoHookIpc autoHookIpc, VendorResolverService vendorResolver, NavmeshIpc navmeshIpc, SmartNavRouteEnqueuer routeEnqueuer, IObjectTable objectTable, IChatGui chatGui, ICondition condition, IServiceProvider serviceProvider, InterruptHandler interruptHandler, IDataManager dataManager, Configuration configuration, ILogger<FishingController> logger)
|
|
: base(chatGui, condition, serviceProvider, interruptHandler, dataManager, configuration, logger)
|
|
{
|
|
_fishingData = fishingData;
|
|
_autoHookIpc = autoHookIpc;
|
|
_vendorResolver = vendorResolver;
|
|
_navmeshIpc = navmeshIpc;
|
|
_routeEnqueuer = routeEnqueuer;
|
|
_objectTable = objectTable;
|
|
_condition = condition;
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
public bool Start(FishingRequest request)
|
|
{
|
|
int num = ((State == EFishingState.Idle) ? (-974820956) : (-974820954));
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = -974820958;
|
|
int num4 = num2;
|
|
int num5 = num4 + num3;
|
|
int num6 = num4 & num3;
|
|
switch (num5 - (num6 + num6))
|
|
{
|
|
case 3:
|
|
_200B_206E_200F_206F_202D_200B_202B_200B_202E_202D_206D_202E_206C_206F_206C_200E_200F_202E_206C_206A_202A_206B_202D_206E_202E_206C_200D_200F_202B_200B_200C_200B_206F_202C_200F_202A_206F_202C_206C_202B_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>(1404409549), Array.Empty<object>());
|
|
return false;
|
|
case 6:
|
|
num = (_autoHookIpc.IsAvailable() ? (-974820957) : (-974820959));
|
|
break;
|
|
case 5:
|
|
State = EFishingState.Navigating;
|
|
return true;
|
|
case 0:
|
|
_currentRequest = null;
|
|
return false;
|
|
case 2:
|
|
num = -974820954;
|
|
break;
|
|
case 1:
|
|
_currentRequest = request;
|
|
_actionThrottle = 0L;
|
|
_baitReady = false;
|
|
_taskQueue.Reset();
|
|
num = (TryEnqueueApproach(request) ? (-974820953) : (-974820958));
|
|
break;
|
|
case 4:
|
|
_200F_206C_202B_206E_206B_206F_202C_200E_202D_200C_206E_200E_206A_202C_206F_202C_200F_202B_202C_202C_200F_202A_202E_206A_206E_202B_200D_206E_206B_202C_200D_202D_200E_206B_206D_202E_202A_206C_206E_202C_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>(1205637689), new object[1] { State });
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
private unsafe bool TryEnqueueApproach(FishingRequest request)
|
|
{
|
|
FishingSpotInfo? spot;
|
|
int num = (_fishingData.TryGetFishingSpot(request.ItemId, out spot) ? (-407149571) : (-407149573));
|
|
FishingSpotInfo value = default(FishingSpotInfo);
|
|
Vector3 vector = default(Vector3);
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = -407149570;
|
|
int num4 = num2;
|
|
int num5 = num4 + num3;
|
|
int num6 = num4 & num3;
|
|
switch (num5 - (num6 + num6))
|
|
{
|
|
case 1:
|
|
_200B_206E_200F_206F_202D_200B_202B_200B_202E_202D_206D_202E_206C_206F_206C_200E_200F_202E_206C_206A_202A_206B_202D_206E_202E_206C_200D_200F_202B_200B_200C_200B_206F_202C_200F_202A_206F_202C_206C_202B_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>(1931468190), Array.Empty<object>());
|
|
return false;
|
|
case 4:
|
|
num = (EnqueueLurePurchase() ? (-407149572) : (-407149569));
|
|
break;
|
|
case 3:
|
|
{
|
|
value = spot.Value;
|
|
Vector3 vector2 = new Vector3(value.X, 0f, value.Z);
|
|
vector = _navmeshIpc.GetPointOnFloor(vector2, unlandable: false) ?? vector2;
|
|
_202D_200F_200D_202D_202C_202A_200E_200D_206F_200D_200E_206E_206B_206E_200B_202E_202D_202B_202A_206F_206B_206C_206A_206B_206B_202E_202A_202B_206A_200B_206D_206E_206E_206F_206A_206E_206A_200B_206D_206F_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>(-1546765915), new object[4] { request.ItemId, value.SpotId, value.TerritoryId, vector });
|
|
num = ((InventoryManager.Instance()->GetInventoryItemCount(29717u, isHq: false, checkEquipped: true, checkArmory: true, 0) > 0) ? (-407149572) : (-407149574));
|
|
break;
|
|
}
|
|
case 5:
|
|
_200B_206E_200F_206F_202D_200B_202B_200B_202E_202D_206D_202E_206C_206F_206C_200E_200F_202E_206C_206A_202A_206B_202D_206E_202E_206C_200D_200F_202B_200B_200C_200B_206F_202C_200F_202A_206F_202C_206C_202B_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>(281781333), new object[1] { request.ItemId });
|
|
return false;
|
|
case 2:
|
|
EnqueueNavigateTo(value.TerritoryId, vector);
|
|
_taskQueue.Enqueue(new Mount.UnmountTask());
|
|
return true;
|
|
case 0:
|
|
num = -407149573;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
protected override void OnRetryStep()
|
|
{
|
|
int num = ((!(_currentRequest == null)) ? 1913182215 : 1913182210);
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = 1913182211;
|
|
int num4 = num2;
|
|
switch ((num4 | num3) - (num4 & num3))
|
|
{
|
|
case 0:
|
|
num = 1913182210;
|
|
break;
|
|
case 1:
|
|
Stop(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>(-600131236));
|
|
return;
|
|
case 3:
|
|
State = EFishingState.Navigating;
|
|
return;
|
|
case 4:
|
|
_202D_200F_200D_202D_202C_202A_200E_200D_206F_200D_200E_206E_206B_206E_200B_202E_202D_202B_202A_206F_206B_206C_206A_206B_206B_202E_202A_202B_206A_200B_206D_206E_206E_206F_206A_206E_206A_200B_206D_206F_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>(665668477), Array.Empty<object>());
|
|
_baitReady = false;
|
|
num = (TryEnqueueApproach(_currentRequest) ? 1913182208 : 1913182209);
|
|
break;
|
|
case 2:
|
|
Stop(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>(1698802452));
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
public EFishingState Update()
|
|
{
|
|
int num = ((State == EFishingState.Idle) ? (-1688940603) : (-1688940605));
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = -1688940604;
|
|
int num4 = num2;
|
|
switch ((num4 | num3) - (num4 & num3))
|
|
{
|
|
case 4:
|
|
num = -1688940607;
|
|
break;
|
|
case 2:
|
|
Stop(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>(-975449559));
|
|
return EFishingState.Idle;
|
|
case 6:
|
|
return UpdateOrienting();
|
|
case 7:
|
|
num = ((State != EFishingState.Complete) ? (-1688940593) : (-1688940603));
|
|
break;
|
|
case 10:
|
|
goto IL_00b0;
|
|
case 5:
|
|
return State;
|
|
case 0:
|
|
num = -1688940605;
|
|
break;
|
|
case 11:
|
|
num = ((!(_currentRequest == null)) ? (-1688940595) : (-1688940602));
|
|
break;
|
|
case 1:
|
|
return State;
|
|
case 3:
|
|
goto IL_00f7;
|
|
case 8:
|
|
goto IL_00fe;
|
|
case 9:
|
|
{
|
|
switch (State)
|
|
{
|
|
case EFishingState.Orienting:
|
|
break;
|
|
case EFishingState.Preparing:
|
|
goto IL_00b0;
|
|
case EFishingState.Fishing:
|
|
goto IL_00f7;
|
|
case EFishingState.Navigating:
|
|
goto IL_00fe;
|
|
default:
|
|
goto IL_0124;
|
|
}
|
|
goto case 6;
|
|
}
|
|
IL_0124:
|
|
num = -1688940608;
|
|
break;
|
|
IL_00fe:
|
|
return UpdateNavigating();
|
|
IL_00f7:
|
|
return UpdateFishing();
|
|
IL_00b0:
|
|
return UpdatePreparing();
|
|
}
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
private EFishingState UpdateNavigating()
|
|
{
|
|
int num = ((!_taskQueue.AllTasksComplete) ? (-1280253675) : (-1280253674));
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = -1280253673;
|
|
int num4 = num2;
|
|
int num5 = num4 + num3;
|
|
int num6 = num4 & num3;
|
|
switch (num5 - (num6 + num6))
|
|
{
|
|
case 0:
|
|
goto IL_004d;
|
|
case 1:
|
|
_206E_202B_206A_202A_202E_206E_206A_206D_206A_200B_202B_206A_202D_202B_200C_206D_200F_206F_206D_206A_202B_202A_200F_202C_202A_202E_206F_200C_200E_206B_206A_200D_200C_206D_200F_202E_200C_206E_206D_206E_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>(2136190681), Array.Empty<object>());
|
|
State = EFishingState.Orienting;
|
|
return State;
|
|
case 2:
|
|
UpdateCurrentTask();
|
|
return State;
|
|
}
|
|
continue;
|
|
IL_004d:
|
|
num = -1280253674;
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
private unsafe EFishingState UpdateOrienting()
|
|
{
|
|
IPlayerCharacter playerCharacter = _200F_202D_206D_206D_206C_206E_200B_202D_200E_202C_206B_202C_206C_206B_206D_200F_206C_200D_200C_202E_202B_200C_206A_206F_206A_202B_200D_200D_206B_206D_202B_200D_206B_200C_202B_202B_206B_200C_202A_202A_202E(_objectTable);
|
|
int num = ((playerCharacter != null) ? (-1536188772) : (-1536188775));
|
|
Vector3 vector = default(Vector3);
|
|
(float, Vector3)? tuple = default((float, Vector3)?);
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = -1536188776;
|
|
int num4 = num2;
|
|
switch ((num4 | num3) - (num4 & num3))
|
|
{
|
|
case 2:
|
|
_200F_206C_202B_206E_206B_206F_202C_200E_202D_200C_206E_200E_206A_202C_206F_202C_200F_202B_202C_202C_200F_202A_202E_206A_206E_202B_200D_206E_206B_202C_200D_202D_200E_206B_206D_202E_202A_206C_206E_202C_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>(-1988024988), new object[1] { vector });
|
|
Stop(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>(1777525514));
|
|
return State;
|
|
case 0:
|
|
{
|
|
Vector3 item = tuple.Value.Item2;
|
|
_206E_202B_206A_202A_202E_206E_206A_206D_206A_200B_202B_206A_202D_202B_200C_206D_200F_206F_206D_206A_202B_202A_200F_202C_202A_202E_206F_200C_200E_206B_206A_200D_200C_206D_200F_202E_200C_206E_206D_206E_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>(-245731895), new object[1] { item });
|
|
ActionManager.Instance()->AutoFaceTargetPosition(&item, 0uL);
|
|
State = EFishingState.Preparing;
|
|
return State;
|
|
}
|
|
case 4:
|
|
vector = _206F_206A_206A_200E_206E_200B_206E_202A_206D_206B_206F_206F_202E_206C_200D_200B_200C_206D_206B_202C_200C_202B_202A_202B_200B_200D_206F_202A_200F_202B_206A_206F_206C_206E_202A_202B_202D_202A_202C_202B_202E((IGameObject)playerCharacter);
|
|
tuple = _202D_206F_206C_206C_206D_202A_206E_206F_206E_206A_202C_200C_200D_202A_202E_206D_206E_206E_206F_200D_206D_200D_206C_200D_200E_200D_206B_200C_206D_206C_206C_206D_202E_202D_206E_206C_206E_206D_206C_202E_202E(vector, 36);
|
|
num = (tuple.HasValue ? (-1536188776) : (-1536188774));
|
|
break;
|
|
case 3:
|
|
num = -1536188775;
|
|
break;
|
|
case 1:
|
|
return State;
|
|
}
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
private unsafe EFishingState UpdatePreparing()
|
|
{
|
|
int num = (CanUseActionNow() ? (-747465758) : (-747465753));
|
|
IPlayerCharacter playerCharacter = default(IPlayerCharacter);
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = -747465756;
|
|
int num4 = num2;
|
|
int num5 = num4 + num3;
|
|
int num6 = num4 & num3;
|
|
switch (num5 - (num6 + num6))
|
|
{
|
|
case 12:
|
|
num = ((_currentRequest.Collectability <= 0) ? (-747465748) : (-747465747));
|
|
break;
|
|
case 7:
|
|
{
|
|
BattleChara* ptr = (BattleChara*)_200F_202E_200E_206A_202B_200E_206D_206B_200F_202E_206B_206B_200C_202A_206B_206F_206E_202D_202D_200F_202B_202D_206A_200C_206D_200D_202B_200B_206F_202C_206E_200D_206E_200D_206D_206A_202C_206C_206B_206C_202E((IGameObject)playerCharacter);
|
|
num = (ptr->GetStatusManager()->HasStatus(805u) ? (-747465748) : (-747465755));
|
|
break;
|
|
}
|
|
case 3:
|
|
return State;
|
|
case 5:
|
|
num = ((!_autoHookIpc.SwapBaitById(29717u)) ? (-747465754) : (-747465746));
|
|
break;
|
|
case 11:
|
|
return State;
|
|
case 8:
|
|
_autoHookIpc.SetPluginState(enabled: true);
|
|
_autoHookIpc.SetAutoStartFishing(enabled: true);
|
|
_fishStartMs = _200B_206B_202C_202E_206D_206F_202A_206D_206B_206B_206F_206A_206C_202B_206B_200B_200F_206E_200B_200B_200C_200D_200F_202A_206E_206A_200B_206C_206A_200E_200B_202A_202A_202B_200D_202C_206A_206D_206D_206D_202E();
|
|
_lastFishCount = GetItemCount();
|
|
State = EFishingState.Fishing;
|
|
_206E_202B_206A_202A_202E_206E_206A_206D_206A_200B_202B_206A_202D_202B_200C_206D_200F_206F_206D_206A_202B_202A_200F_202C_202A_202E_206F_200C_200E_206B_206A_200D_200C_206D_200F_202E_200C_206E_206D_206E_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>(1666126604), Array.Empty<object>());
|
|
return State;
|
|
case 9:
|
|
playerCharacter = _200F_202D_206D_206D_206C_206E_200B_202D_200E_202C_206B_202C_206C_206B_206D_200F_206C_200D_200C_202E_202B_200C_206A_206F_206A_202B_200D_200D_206B_206D_202B_200D_206B_200C_202B_202B_206B_200C_202A_202A_202E(_objectTable);
|
|
num = ((playerCharacter == null) ? (-747465748) : (-747465757));
|
|
break;
|
|
case 4:
|
|
num = -747465753;
|
|
break;
|
|
case 6:
|
|
num = (_baitReady ? (-747465752) : (-747465759));
|
|
break;
|
|
case 1:
|
|
num = ((ActionManager.Instance()->GetActionStatus(ActionType.Action, 4101u, 3758096384uL, checkRecastActive: true, checkCastingActive: true, null) != 0) ? (-747465745) : (-747465756));
|
|
break;
|
|
case 10:
|
|
_206E_202B_206A_202A_202E_206E_206A_206D_206A_200B_202B_206A_202D_202B_200C_206D_200F_206F_206D_206A_202B_202A_200F_202C_202A_202E_206F_200C_200E_206B_206A_200D_200C_206D_200F_202E_200C_206E_206D_206E_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>(-1055152276), Array.Empty<object>());
|
|
_baitReady = true;
|
|
_actionThrottle = _200B_206B_202C_202E_206D_206F_202A_206D_206B_206B_206F_206A_206C_202B_206B_200B_200F_206E_200B_200B_200C_200D_200F_202A_206E_206A_200B_206C_206A_200E_200B_202A_202A_202B_200D_202C_206A_206D_206D_206D_202E() + 500;
|
|
return State;
|
|
case 2:
|
|
_200F_206C_202B_206E_206B_206F_202C_200E_202D_200C_206E_200E_206A_202C_206F_202C_200F_202B_202C_202C_200F_202A_202E_206A_206E_202B_200D_206E_206B_202C_200D_202D_200E_206B_206D_202E_202A_206C_206E_202C_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>(-1448574380), Array.Empty<object>());
|
|
Stop(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>(-1247119621));
|
|
return State;
|
|
case 0:
|
|
_206E_202B_206A_202A_202E_206E_206A_206D_206A_200B_202B_206A_202D_202B_200C_206D_200F_206F_206D_206A_202B_202A_200F_202C_202A_202E_206F_200C_200E_206B_206A_200D_200C_206D_200F_202E_200C_206E_206D_206E_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>(1852976997), Array.Empty<object>());
|
|
ActionManager.Instance()->UseAction(ActionType.Action, 4101u, 3758096384uL, 0u, ActionManager.UseActionMode.None, 0u, null);
|
|
_actionThrottle = _200B_206B_202C_202E_206D_206F_202A_206D_206B_206B_206F_206A_206C_202B_206B_200B_200F_206E_200B_200B_200C_200D_200F_202A_206E_206A_200B_206C_206A_200E_200B_202A_202A_202B_200D_202C_206A_206D_206D_206D_202E() + 1000;
|
|
num = -747465745;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
private unsafe EFishingState UpdateFishing()
|
|
{
|
|
int itemCount = GetItemCount();
|
|
int num = ((itemCount <= _lastFishCount) ? (-1919966564) : (-1919966563));
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = -1919966576;
|
|
int num4 = num2;
|
|
switch ((num4 | num3) - (num4 & num3))
|
|
{
|
|
case 1:
|
|
return State;
|
|
case 0:
|
|
num = (_206D_200F_206C_200C_200E_202C_202C_206E_206A_202E_206B_206A_206E_200C_206B_202D_200B_202D_206D_200C_206B_202B_200B_206F_202D_206E_202A_200F_200B_202D_200F_206E_200F_206A_202E_200C_206C_200B_206B_206F_202E(_condition, ConditionFlag.Fishing) ? (-1919966565) : (-1919966569));
|
|
break;
|
|
case 2:
|
|
_200F_206C_202B_206E_206B_206F_202C_200E_202D_200C_206E_200E_206A_202C_206F_202C_200F_202B_202C_202C_200F_202A_202E_206A_206E_202B_200D_206E_206B_202C_200D_202D_200E_206B_206D_202E_202A_206C_206E_202C_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>(1428296655), new object[1] { 180000L });
|
|
Stop(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>(1371551999));
|
|
return State;
|
|
case 7:
|
|
_206E_202B_206A_202A_202E_206E_206A_206D_206A_200B_202B_206A_202D_202B_200C_206D_200F_206F_206D_206A_202B_202A_200F_202C_202A_202E_206F_200C_200E_206B_206A_200D_200C_206D_200F_202E_200C_206E_206D_206E_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>(273212512), Array.Empty<object>());
|
|
State = EFishingState.Complete;
|
|
DisableAutoHookAutoStart();
|
|
num = -1919966565;
|
|
break;
|
|
case 12:
|
|
num = ((_200B_206B_202C_202E_206D_206F_202A_206D_206B_206B_206F_206A_206C_202B_206B_200B_200F_206E_200B_200B_200C_200D_200F_202A_206E_206A_200B_206C_206A_200E_200B_202A_202A_202B_200D_202C_206A_206D_206D_206D_202E() - _fishStartMs <= 180000) ? (-1919966568) : (-1919966574));
|
|
break;
|
|
case 3:
|
|
num = ((ActionManager.Instance()->GetActionStatus(ActionType.Action, 289u, 3758096384uL, checkRecastActive: true, checkCastingActive: true, null) != 0) ? (-1919966575) : (-1919966571));
|
|
break;
|
|
case 13:
|
|
_lastFishCount = itemCount;
|
|
_fishStartMs = _200B_206B_202C_202E_206D_206F_202A_206D_206B_206B_206F_206A_206C_202B_206B_200B_200F_206E_200B_200B_200C_200D_200F_202A_206E_206A_200B_206C_206A_200E_200B_202A_202A_202B_200D_202C_206A_206D_206D_206D_202E();
|
|
num = -1919966564;
|
|
break;
|
|
case 4:
|
|
num = (_206D_200F_206C_200C_200E_202C_202C_206E_206A_202E_206B_206A_206E_200C_206B_202D_200B_202D_206D_200C_206B_202B_200B_206F_202D_206E_202A_200F_200B_202D_200F_206E_200F_206A_202E_200C_206C_200B_206B_206F_202E(_condition, ConditionFlag.Fishing) ? (-1919966575) : (-1919966567));
|
|
break;
|
|
case 5:
|
|
_206E_202B_206A_202A_202E_206E_206A_206D_206A_200B_202B_206A_202D_202B_200C_206D_200F_206F_206D_206A_202B_202A_200F_202C_202A_202E_206F_200C_200E_206B_206A_200D_200C_206D_200F_202E_200C_206E_206D_206E_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>(1571582558), Array.Empty<object>());
|
|
ActionManager.Instance()->UseAction(ActionType.Action, 289u, 3758096384uL, 0u, ActionManager.UseActionMode.None, 0u, null);
|
|
_actionThrottle = _200B_206B_202C_202E_206D_206F_202A_206D_206B_206B_206F_206A_206C_202B_206B_200B_200F_206E_200B_200B_200C_200D_200F_202A_206E_206A_200B_206C_206A_200E_200B_202A_202A_202B_200D_202C_206A_206D_206D_206D_202E() + 2000;
|
|
num = -1919966575;
|
|
break;
|
|
case 9:
|
|
num = (_206D_200F_206C_200C_200E_202C_202C_206E_206A_202E_206B_206A_206E_200C_206B_202D_200B_202D_206D_200C_206B_202B_200B_206F_202D_206E_202A_200F_200B_202D_200F_206E_200F_206A_202E_200C_206C_200B_206B_206F_202E(_condition, ConditionFlag.Casting) ? (-1919966575) : (-1919966570));
|
|
break;
|
|
case 6:
|
|
num = ((!CanUseActionNow()) ? (-1919966575) : (-1919966573));
|
|
break;
|
|
case 8:
|
|
num = ((!HasEnoughItems()) ? (-1919966572) : (-1919966576));
|
|
break;
|
|
case 11:
|
|
return State;
|
|
case 10:
|
|
num = -1919966563;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
public override void Stop(string label)
|
|
{
|
|
base.Stop(label);
|
|
int num = ((State != EFishingState.Idle) ? 1276475840 : 1276475841);
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = 1276475840;
|
|
int num4 = num2;
|
|
switch ((num4 | num3) - (num4 & num3))
|
|
{
|
|
case 0:
|
|
_202D_200F_200D_202D_202C_202A_200E_200D_206F_200D_200E_206E_206B_206E_200B_202E_202D_202B_202A_206F_206B_206C_206A_206B_206B_202E_202A_202B_206A_200B_206D_206E_206E_206F_206A_206E_206A_200B_206D_206F_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>(447789808), new object[1] { label });
|
|
DisableAutoHookAutoStart();
|
|
_routeEnqueuer.ClearDestination();
|
|
_taskQueue.Reset();
|
|
_currentRequest = null;
|
|
State = EFishingState.Idle;
|
|
num = 1276475843;
|
|
break;
|
|
case 1:
|
|
num = ((!(_currentRequest != null)) ? 1276475843 : 1276475840);
|
|
break;
|
|
case 3:
|
|
return;
|
|
case 2:
|
|
num = 1276475841;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
private void DisableAutoHookAutoStart()
|
|
{
|
|
try
|
|
{
|
|
_autoHookIpc.SetAutoStartFishing(enabled: false);
|
|
}
|
|
catch (Exception)
|
|
{
|
|
}
|
|
}
|
|
|
|
private bool HasEnoughItems()
|
|
{
|
|
int num = ((!(_currentRequest == null)) ? 1490081139 : 1490081136);
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = 1490081137;
|
|
int num4 = num2;
|
|
int num5 = num4 + num3;
|
|
int num6 = num4 & num3;
|
|
switch (num5 - (num6 + num6))
|
|
{
|
|
case 0:
|
|
goto IL_004e;
|
|
case 1:
|
|
return true;
|
|
case 2:
|
|
return GetItemCount() >= _currentRequest.Quantity;
|
|
}
|
|
continue;
|
|
IL_004e:
|
|
num = 1490081136;
|
|
}
|
|
}
|
|
|
|
private unsafe int GetItemCount()
|
|
{
|
|
int num = ((!(_currentRequest == null)) ? 1670490552 : 1670490555);
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = 1670490553;
|
|
int num4 = num2;
|
|
int num5 = num4 + num3;
|
|
int num6 = num4 & num3;
|
|
switch (num5 - (num6 + num6))
|
|
{
|
|
case 0:
|
|
goto IL_004e;
|
|
case 1:
|
|
return InventoryManager.Instance()->GetInventoryItemCount(_currentRequest.ItemId, isHq: false, checkEquipped: true, checkArmory: true, (short)_currentRequest.Collectability);
|
|
case 2:
|
|
return 0;
|
|
}
|
|
continue;
|
|
IL_004e:
|
|
num = 1670490555;
|
|
}
|
|
}
|
|
|
|
private bool CanUseActionNow()
|
|
{
|
|
return _200B_206B_202C_202E_206D_206F_202A_206D_206B_206B_206F_206A_206C_202B_206B_200B_200F_206E_200B_200B_200C_200D_200F_202A_206E_206A_200B_206C_206A_200E_200B_202A_202A_202B_200D_202C_206A_206D_206D_206D_202E() >= _actionThrottle;
|
|
}
|
|
|
|
private void EnqueueNavigateTo(ushort territoryId, Vector3 position)
|
|
{
|
|
_routeEnqueuer.Enqueue(_taskQueue, territoryId, position);
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
private bool EnqueueLurePurchase()
|
|
{
|
|
VendorResolverService.VendorInfo? vendorInfo = _vendorResolver.ResolveVendor(29717u);
|
|
int num = (vendorInfo.HasValue ? 496459254 : 496459255);
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = 496459254;
|
|
int num4 = num2;
|
|
switch ((num4 | num3) - (num4 & num3))
|
|
{
|
|
case 0:
|
|
_202D_200F_200D_202D_202C_202A_200E_200D_206F_200D_200E_206E_206B_206E_200B_202E_202D_202B_202A_206F_206B_206C_206A_206B_206B_202E_202A_202B_206A_200B_206D_206E_206E_206F_206A_206E_206A_200B_206D_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>(-26952727), new object[2]
|
|
{
|
|
99,
|
|
vendorInfo.Value.VendorNpcId
|
|
});
|
|
EnqueueNavigateTo(vendorInfo.Value.TerritoryId, vendorInfo.Value.Position);
|
|
_taskQueue.Enqueue(new Mount.UnmountTask());
|
|
_taskQueue.Enqueue(new VendorPurchaseTask(vendorInfo.Value.VendorNpcId, new global::_003C_003Ez__ReadOnlySingleElementList<VendorPurchaseTask.PurchaseItem>(new VendorPurchaseTask.PurchaseItem(29717u, 99)), vendorInfo.Value.DialogOptionIndex));
|
|
return true;
|
|
case 1:
|
|
_200F_206C_202B_206E_206B_206F_202C_200E_202D_200C_206E_200E_206A_202C_206F_202C_200F_202B_202C_202C_200F_202A_202E_206A_206E_202B_200D_206E_206B_202C_200D_202D_200E_206B_206D_202E_202A_206C_206E_202C_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>(570039642), Array.Empty<object>());
|
|
return false;
|
|
case 2:
|
|
goto IL_0128;
|
|
}
|
|
continue;
|
|
IL_0128:
|
|
num = 496459255;
|
|
}
|
|
}
|
|
|
|
static void _200F_206C_202B_206E_206B_206F_202C_200E_202D_200C_206E_200E_206A_202C_206F_202C_200F_202B_202C_202C_200F_202A_202E_206A_206E_202B_200D_206E_206B_202C_200D_202D_200E_206B_206D_202E_202A_206C_206E_202C_202E(ILogger P_0, string P_1, object[] P_2)
|
|
{
|
|
P_0.LogWarning(P_1, P_2);
|
|
}
|
|
|
|
static void _200B_206E_200F_206F_202D_200B_202B_200B_202E_202D_206D_202E_206C_206F_206C_200E_200F_202E_206C_206A_202A_206B_202D_206E_202E_206C_200D_200F_202B_200B_200C_200B_206F_202C_200F_202A_206F_202C_206C_202B_202E(ILogger P_0, string P_1, object[] P_2)
|
|
{
|
|
P_0.LogError(P_1, P_2);
|
|
}
|
|
|
|
static void _202D_200F_200D_202D_202C_202A_200E_200D_206F_200D_200E_206E_206B_206E_200B_202E_202D_202B_202A_206F_206B_206C_206A_206B_206B_202E_202A_202B_206A_200B_206D_206E_206E_206F_206A_206E_206A_200B_206D_206F_202E(ILogger P_0, string P_1, object[] P_2)
|
|
{
|
|
P_0.LogInformation(P_1, P_2);
|
|
}
|
|
|
|
static void _206E_202B_206A_202A_202E_206E_206A_206D_206A_200B_202B_206A_202D_202B_200C_206D_200F_206F_206D_206A_202B_202A_200F_202C_202A_202E_206F_200C_200E_206B_206A_200D_200C_206D_200F_202E_200C_206E_206D_206E_202E(ILogger P_0, string P_1, object[] P_2)
|
|
{
|
|
P_0.LogDebug(P_1, P_2);
|
|
}
|
|
|
|
static IPlayerCharacter _200F_202D_206D_206D_206C_206E_200B_202D_200E_202C_206B_202C_206C_206B_206D_200F_206C_200D_200C_202E_202B_200C_206A_206F_206A_202B_200D_200D_206B_206D_202B_200D_206B_200C_202B_202B_206B_200C_202A_202A_202E(IObjectTable P_0)
|
|
{
|
|
return P_0.LocalPlayer;
|
|
}
|
|
|
|
static Vector3 _206F_206A_206A_200E_206E_200B_206E_202A_206D_206B_206F_206F_202E_206C_200D_200B_200C_206D_206B_202C_200C_202B_202A_202B_200B_200D_206F_202A_200F_202B_206A_206F_206C_206E_202A_202B_202D_202A_202C_202B_202E(IGameObject P_0)
|
|
{
|
|
return P_0.Position;
|
|
}
|
|
|
|
static (float, Vector3)? _202D_206F_206C_206C_206D_202A_206E_206F_206E_206A_202C_200C_200D_202A_202E_206D_206E_206E_206F_200D_206D_200D_206C_200D_200E_200D_206B_200C_206D_206C_206C_206D_202E_202D_206E_206C_206E_206D_206C_202E_202E(Vector3 P_0, int P_1)
|
|
{
|
|
return WaterSurfaceDetector.FindFishableRotation(P_0, P_1);
|
|
}
|
|
|
|
static long _200B_206B_202C_202E_206D_206F_202A_206D_206B_206B_206F_206A_206C_202B_206B_200B_200F_206E_200B_200B_200C_200D_200F_202A_206E_206A_200B_206C_206A_200E_200B_202A_202A_202B_200D_202C_206A_206D_206D_206D_202E()
|
|
{
|
|
return Environment.TickCount64;
|
|
}
|
|
|
|
static nint _200F_202E_200E_206A_202B_200E_206D_206B_200F_202E_206B_206B_200C_202A_206B_206F_206E_202D_202D_200F_202B_202D_206A_200C_206D_200D_202B_200B_206F_202C_206E_200D_206E_200D_206D_206A_202C_206C_206B_206C_202E(IGameObject P_0)
|
|
{
|
|
return P_0.Address;
|
|
}
|
|
|
|
static bool _206D_200F_206C_200C_200E_202C_202C_206E_206A_202E_206B_206A_206E_200C_206B_202D_200B_202D_206D_200C_206B_202B_200B_206F_202D_206E_202A_200F_200B_202D_200F_206E_200F_206A_202E_200C_206C_200B_206B_206F_202E(ICondition P_0, ConditionFlag P_1)
|
|
{
|
|
return P_0[P_1];
|
|
}
|
|
}
|