forked from aly/qstbak
muffin v7.5.11
This commit is contained in:
parent
addf2d530f
commit
3102923ce2
522 changed files with 41082 additions and 211592 deletions
|
|
@ -1,11 +1,6 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Numerics;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Dalamud.Game.ClientState.Conditions;
|
||||
using Dalamud.Game.ClientState.Objects.SubKinds;
|
||||
using Dalamud.Game.ClientState.Objects.Types;
|
||||
using Dalamud.Plugin.Services;
|
||||
using LLib.GameData;
|
||||
using LLib.Gear;
|
||||
|
|
@ -23,41 +18,6 @@ namespace Questionable.Controller;
|
|||
|
||||
internal sealed class GearRepairService(Configuration configuration, ICondition condition, IClientState clientState, IObjectTable objectTable, IDataManager dataManager, MenderDataService menderDataService, SmartNavRouteEnqueuer routeEnqueuer, AetheryteFunctions aetheryteFunctions, IChatGui chatGui, ILogger<GearRepairService> logger)
|
||||
{
|
||||
[CompilerGenerated]
|
||||
private sealed class _003C_003Ec__DisplayClass19_0
|
||||
{
|
||||
public ExcelSheet<ClassJob> classJobSheet;
|
||||
|
||||
internal byte _003CCanSelfRepair_003Eb__0(uint classJobId)
|
||||
{
|
||||
ClassJob row;
|
||||
int num = (classJobSheet.TryGetRow(classJobId, out row) ? (-528090726) : (-528090727));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -528090725;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_004e;
|
||||
case 2:
|
||||
return 0;
|
||||
case 1:
|
||||
return (byte)_200C_206B_202B_202B_206C_200B_202D_206C_206D_206C_206E_202E_202E_202B_200B_206F_202B_202C_202A_200D_206E_202E_206C_200F_202C_206B_200D_206A_202E_202C_200B_206D_206C_200F_200E_206C_200F_206E_200D_202A_202E((int)row.ExpArrayIndex);
|
||||
}
|
||||
continue;
|
||||
IL_004e:
|
||||
num = -528090727;
|
||||
}
|
||||
}
|
||||
|
||||
static short _200C_206B_202B_202B_206C_200B_202D_206C_206D_206C_206E_202E_202E_202B_200B_206F_202B_202C_202A_200D_206E_202E_206C_200F_202C_206B_200D_206A_202E_202C_200B_206D_206C_200F_200E_206C_200F_206E_200D_202A_202E(int P_0)
|
||||
{
|
||||
return PlayerStateHelper.GetClassJobLevel(P_0);
|
||||
}
|
||||
}
|
||||
|
||||
private const int CriticalConditionPercent = 10;
|
||||
|
||||
private const long AttemptCooldownMs = 300000L;
|
||||
|
|
@ -74,346 +34,110 @@ internal sealed class GearRepairService(Configuration configuration, ICondition
|
|||
_nextWarningAtMs = 0L;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public ERepairDecision EvaluateAndEnqueue(EInteractionType upcomingType, TaskQueue taskQueue)
|
||||
{
|
||||
int num = (((uint)(upcomingType - 19) > 1u) ? 1929941200 : 1929941198);
|
||||
int? num7 = default(int?);
|
||||
bool flag2 = default(bool);
|
||||
bool flag4 = default(bool);
|
||||
bool flag3 = default(bool);
|
||||
bool flag = default(bool);
|
||||
string failureReason = default(string);
|
||||
while (true)
|
||||
bool flag = (uint)(upcomingType - 19) <= 1u;
|
||||
bool flag2 = flag;
|
||||
flag = (uint)(upcomingType - 30) <= 1u;
|
||||
bool flag3 = flag;
|
||||
if (!flag2 && !flag3)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1929941195;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
int num8;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 3:
|
||||
_206A_200F_206D_200B_202C_200B_206D_206C_202E_202E_200F_200F_202B_200D_200D_206F_200B_206B_206D_202E_202D_206C_206A_202D_202A_206A_202B_200D_206D_206B_206C_206D_206F_202E_200D_202A_202C_202E_206A_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>(776424222), new object[1] { num7.Value });
|
||||
return ERepairDecision.BlockDuty;
|
||||
case 22:
|
||||
num7 = _200E_202E_202C_202C_200D_206E_200B_202B_200E_202E_202A_202C_202D_202B_202D_202B_200E_206C_206F_206E_206C_202C_202E_200C_202A_202C_202C_206D_206C_202B_200B_206C_202D_202E_200D_200E_206C_200C_206A_206C_202E();
|
||||
num = ((!num7.HasValue) ? 1929941188 : 1929941209);
|
||||
break;
|
||||
case 27:
|
||||
flag2 = false;
|
||||
num = 1929941208;
|
||||
break;
|
||||
case 10:
|
||||
return ERepairDecision.NotNeeded;
|
||||
case 20:
|
||||
num = ((!flag4) ? 1929941210 : 1929941192);
|
||||
break;
|
||||
case 19:
|
||||
flag3 = flag2;
|
||||
num = (((uint)(upcomingType - 30) > 1u) ? 1929941194 : 1929941193);
|
||||
break;
|
||||
case 12:
|
||||
num = (flag ? 1929941197 : 1929941202);
|
||||
break;
|
||||
case 14:
|
||||
num = ((_202B_206C_202A_202A_206E_202C_200C_202A_202A_200E_200B_200D_206B_202D_206A_200B_200D_200E_200B_200F_206F_202C_202C_200F_200E_202E_206F_202E_202E_206B_202C_202D_200F_200C_200B_206F_206E_202E_206A_202A_202E() < _nextWarningAtMs) ? 1929941185 : 1929941190);
|
||||
break;
|
||||
case 13:
|
||||
{
|
||||
_nextWarningAtMs = _202B_206C_202A_202A_206E_202C_200C_202A_202A_200E_200B_200D_206B_202D_206A_200B_200D_200E_200B_200F_206F_202C_202C_200F_200E_202E_206F_202E_202E_206B_202C_202D_200F_200C_200B_206F_206E_202E_206A_202A_202E() + 300000;
|
||||
IChatGui chatGui = chatGui;
|
||||
DefaultInterpolatedStringHandler defaultInterpolatedStringHandler = new DefaultInterpolatedStringHandler(46, 2);
|
||||
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>(1964571551));
|
||||
defaultInterpolatedStringHandler.AppendFormatted(num7.Value);
|
||||
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>(1599790962));
|
||||
defaultInterpolatedStringHandler.AppendFormatted(failureReason);
|
||||
_200D_206B_206B_202C_200D_206C_200E_200D_202E_202C_206B_202D_206B_206C_206F_200D_200F_206D_200E_206C_206F_206B_202E_200B_200C_202E_202E_202B_206F_206C_206C_202A_206D_202A_200C_206B_200B_200F_202C_206C_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);
|
||||
num = 1929941185;
|
||||
break;
|
||||
}
|
||||
case 26:
|
||||
num8 = ((num7.Value < 10) ? 1 : 0);
|
||||
goto IL_026c;
|
||||
case 7:
|
||||
num = ((!flag3) ? 1929941212 : 1929941201);
|
||||
break;
|
||||
case 15:
|
||||
return ERepairDecision.NotNeeded;
|
||||
case 23:
|
||||
num8 = 0;
|
||||
goto IL_026c;
|
||||
case 17:
|
||||
return ERepairDecision.NotNeeded;
|
||||
case 28:
|
||||
num = ((!TryEnqueueRepair(taskQueue, num7.Value, out failureReason)) ? 1929941184 : 1929941203);
|
||||
break;
|
||||
case 25:
|
||||
return ERepairDecision.NotNeeded;
|
||||
case 24:
|
||||
return ERepairDecision.Enqueued;
|
||||
case 18:
|
||||
num = ((num7.Value < configuration.General.RepairThresholdPercent) ? 1929941196 : 1929941188);
|
||||
break;
|
||||
case 11:
|
||||
num = ((!flag4) ? 1929941189 : 1929941195);
|
||||
break;
|
||||
case 1:
|
||||
flag2 = false;
|
||||
num = 1929941199;
|
||||
break;
|
||||
case 0:
|
||||
_206A_200F_206D_200B_202C_200B_206D_206C_202E_202E_200F_200F_202B_200D_200D_206F_200B_206B_206D_202E_202D_206C_206A_202D_202A_206A_202B_200D_206D_206B_206C_206D_206F_202E_200D_202A_202C_202E_206A_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>(-1917801143), new object[2] { num7.Value, failureReason });
|
||||
return ERepairDecision.BlockDuty;
|
||||
case 5:
|
||||
flag2 = true;
|
||||
num = 1929941208;
|
||||
break;
|
||||
case 2:
|
||||
flag2 = true;
|
||||
num = 1929941199;
|
||||
break;
|
||||
case 16:
|
||||
num = ((!_202A_206F_206D_206C_200E_200C_206D_206A_200E_202A_206E_206F_206C_200C_200E_200F_202B_202B_206B_202C_200F_206C_202C_206C_202E_206C_206F_206C_200F_206E_200D_200E_202B_206B_202A_202D_202A_200C_202B_206A_202E(condition, ConditionFlag.InCombat)) ? 1929941213 : 1929941214);
|
||||
break;
|
||||
case 9:
|
||||
return ERepairDecision.NotNeeded;
|
||||
case 6:
|
||||
num = (configuration.General.RepairGear ? 1929941211 : 1929941186);
|
||||
break;
|
||||
case 21:
|
||||
return ERepairDecision.NotNeeded;
|
||||
case 4:
|
||||
flag = flag2;
|
||||
num = (flag3 ? 1929941197 : 1929941191);
|
||||
break;
|
||||
case 8:
|
||||
{
|
||||
num = 1929941198;
|
||||
break;
|
||||
}
|
||||
IL_026c:
|
||||
flag4 = (byte)num8 != 0;
|
||||
num = ((_202B_206C_202A_202A_206E_202C_200C_202A_202A_200E_200B_200D_206B_202D_206A_200B_200D_200E_200B_200F_206F_202C_202C_200F_200E_202E_206F_202E_202E_206B_202C_202D_200F_200C_200B_206F_206E_202E_206A_202A_202E() >= _nextAttemptAtMs) ? 1929941207 : 1929941215);
|
||||
break;
|
||||
}
|
||||
return ERepairDecision.NotNeeded;
|
||||
}
|
||||
if (!configuration.General.RepairGear)
|
||||
{
|
||||
return ERepairDecision.NotNeeded;
|
||||
}
|
||||
if (condition[ConditionFlag.InCombat])
|
||||
{
|
||||
return ERepairDecision.NotNeeded;
|
||||
}
|
||||
int? lowestConditionPercent = GearConditionHelper.GetLowestConditionPercent();
|
||||
if (!lowestConditionPercent.HasValue || lowestConditionPercent.Value >= configuration.General.RepairThresholdPercent)
|
||||
{
|
||||
return ERepairDecision.NotNeeded;
|
||||
}
|
||||
bool flag4 = flag2 && lowestConditionPercent.Value < 10;
|
||||
if (Environment.TickCount64 < _nextAttemptAtMs)
|
||||
{
|
||||
if (flag4)
|
||||
{
|
||||
logger.LogError("Gear still critically damaged ({Condition}%) after recent repair attempt", lowestConditionPercent.Value);
|
||||
return ERepairDecision.BlockDuty;
|
||||
}
|
||||
return ERepairDecision.NotNeeded;
|
||||
}
|
||||
if (TryEnqueueRepair(taskQueue, lowestConditionPercent.Value, out string failureReason))
|
||||
{
|
||||
return ERepairDecision.Enqueued;
|
||||
}
|
||||
if (flag4)
|
||||
{
|
||||
logger.LogError("Gear critically damaged ({Condition}%) and unrepairable: {Reason}", lowestConditionPercent.Value, failureReason);
|
||||
return ERepairDecision.BlockDuty;
|
||||
}
|
||||
if (Environment.TickCount64 >= _nextWarningAtMs)
|
||||
{
|
||||
_nextWarningAtMs = Environment.TickCount64 + 300000;
|
||||
chatGui.Print($"Gear is at {lowestConditionPercent.Value}% condition but can't be repaired: {failureReason}", "Questionable", 576);
|
||||
}
|
||||
return ERepairDecision.NotNeeded;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
private bool TryEnqueueRepair(TaskQueue taskQueue, int lowestCondition, out string failureReason)
|
||||
{
|
||||
int num = ((!CanSelfRepair()) ? (-1145158930) : (-1145158934));
|
||||
MenderNpc menderNpc = default(MenderNpc);
|
||||
IPlayerCharacter playerCharacter = default(IPlayerCharacter);
|
||||
MenderNpc current = default(MenderNpc);
|
||||
while (true)
|
||||
if (CanSelfRepair())
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1145158932;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
logger.LogInformation("Lowest gear condition {Condition}%, self-repairing", lowestCondition);
|
||||
taskQueue.Enqueue(new Questionable.Controller.Steps.Common.Mount.UnmountTask());
|
||||
taskQueue.Enqueue(new RepairGear.SelfRepairTask());
|
||||
MarkAttempt();
|
||||
failureReason = string.Empty;
|
||||
return true;
|
||||
}
|
||||
IPlayerCharacter localPlayer = objectTable.LocalPlayer;
|
||||
if (localPlayer != null)
|
||||
{
|
||||
MenderNpc menderNpc = menderDataService.FindNearestInTerritory((ushort)clientState.TerritoryType, localPlayer.Position);
|
||||
if ((object)menderNpc != null)
|
||||
{
|
||||
default:
|
||||
continue;
|
||||
case 1:
|
||||
if (aetheryteFunctions.IsTeleportUnlocked())
|
||||
{
|
||||
num = -1145158935;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
case 0:
|
||||
_206A_206D_202D_200F_200E_202D_206E_206C_206B_202E_202D_200E_200D_200E_206B_206D_206B_200E_202D_206A_202B_200E_200B_202B_200F_206F_202C_200D_200B_202E_202E_206D_206C_202B_206F_206E_200F_206B_200D_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>(1341197987), new object[2] { lowestCondition, menderNpc.DataId });
|
||||
logger.LogInformation("Lowest gear condition {Condition}%, visiting mender {DataId} in current zone", lowestCondition, menderNpc.DataId);
|
||||
routeEnqueuer.Enqueue(taskQueue, menderNpc.TerritoryId, menderNpc.Position, 3f);
|
||||
taskQueue.Enqueue(new Questionable.Controller.Steps.Common.Mount.UnmountTask());
|
||||
taskQueue.Enqueue(new RepairGear.MenderRepairTask(menderNpc));
|
||||
MarkAttempt();
|
||||
failureReason = string.Empty;
|
||||
return true;
|
||||
case 2:
|
||||
playerCharacter = _206D_202E_206C_206D_200F_202E_200C_200C_202B_202B_200D_200F_206A_206E_206F_206C_202E_206A_202D_202C_206B_206D_200B_206D_206A_202E_200D_200C_202D_200D_206C_200D_206C_206B_202C_206E_206B_206F_202C_202D_202E(objectTable);
|
||||
num = ((playerCharacter == null) ? (-1145158931) : (-1145158929));
|
||||
continue;
|
||||
case 3:
|
||||
menderNpc = menderDataService.FindNearestInTerritory((ushort)_200E_206C_200F_200D_202E_206C_202D_206E_206C_206A_200C_202E_200E_206F_200F_200B_202B_202C_206A_202A_202A_200D_206F_206C_202C_202C_202A_202B_206D_206F_202B_202D_202D_202A_200E_200D_200D_202E_206E_206E_202E(clientState), _206C_202C_202B_206E_202C_200B_202C_202B_202D_202D_206D_206A_206A_202C_202E_206F_200C_202D_206A_202C_202B_202D_200F_206A_206A_202A_202E_202C_202B_202C_206B_200F_202D_202A_206B_206B_200F_202D_202D_202C_202E((IGameObject)playerCharacter));
|
||||
num = (((object)menderNpc == null) ? (-1145158931) : (-1145158932));
|
||||
continue;
|
||||
case 6:
|
||||
_206A_206D_202D_200F_200E_202D_206E_206C_206B_202E_202D_200E_200D_200E_206B_206D_206B_200E_202D_206A_202B_200E_200B_202B_200F_206F_202C_200D_200B_202E_202E_206D_206C_202B_206F_206E_200F_206B_200D_206A_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>(517880176), new object[1] { lowestCondition });
|
||||
taskQueue.Enqueue(new Questionable.Controller.Steps.Common.Mount.UnmountTask());
|
||||
taskQueue.Enqueue(new RepairGear.SelfRepairTask());
|
||||
MarkAttempt();
|
||||
failureReason = string.Empty;
|
||||
return true;
|
||||
case 4:
|
||||
num = -1145158934;
|
||||
continue;
|
||||
case 5:
|
||||
{
|
||||
IEnumerator<MenderNpc> enumerator = MenderDataService.CityFallbacks.GetEnumerator();
|
||||
try
|
||||
{
|
||||
num = -1950756902;
|
||||
while (true)
|
||||
{
|
||||
int num5 = num;
|
||||
num3 = -1950756902;
|
||||
num4 = num5;
|
||||
int num6 = num4 + num3;
|
||||
int num7 = num4 & num3;
|
||||
switch (num6 - (num7 + num7))
|
||||
{
|
||||
case 0:
|
||||
num = (_206B_200F_206D_206D_206B_206B_200B_206D_202A_206D_202A_206B_206E_200D_206E_202D_200D_206E_206A_206F_206A_202B_202E_200B_202A_206A_206A_206D_202D_202B_206C_206F_202D_206D_206F_202C_202A_202D_200B_202E_202E((IEnumerator)enumerator) ? (-1950756901) : (-1950756903));
|
||||
break;
|
||||
case 1:
|
||||
current = enumerator.Current;
|
||||
num = ((!routeEnqueuer.TryEnqueueRouted(taskQueue, current.TerritoryId, current.Position)) ? (-1950756902) : (-1950756898));
|
||||
break;
|
||||
case 4:
|
||||
_206A_206D_202D_200F_200E_202D_206E_206C_206B_202E_202D_200E_200D_200E_206B_206D_206B_200E_202D_206A_202B_200E_200B_202B_200F_206F_202C_200D_200B_202E_202E_206D_206C_202B_206F_206E_200F_206B_200D_206A_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>(90066395), new object[2] { lowestCondition, current.DataId });
|
||||
taskQueue.Enqueue(new Questionable.Controller.Steps.Common.Mount.UnmountTask());
|
||||
taskQueue.Enqueue(new RepairGear.MenderRepairTask(current));
|
||||
MarkAttempt();
|
||||
failureReason = string.Empty;
|
||||
return true;
|
||||
case 2:
|
||||
num = -1950756902;
|
||||
break;
|
||||
case 3:
|
||||
goto end_IL_01c7;
|
||||
}
|
||||
continue;
|
||||
end_IL_01c7:
|
||||
break;
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
num = ((enumerator == null) ? (-462922479) : (-462922478));
|
||||
while (true)
|
||||
{
|
||||
int num8 = num;
|
||||
num3 = -462922477;
|
||||
num4 = num8;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
num = -462922478;
|
||||
break;
|
||||
case 2:
|
||||
goto end_IL_02f5;
|
||||
case 1:
|
||||
_200C_206C_200E_200B_202C_206C_206A_200E_200D_206F_206F_200D_200E_200E_200C_206A_206C_206F_200E_200B_206E_202E_202C_202D_200B_202D_202A_200D_206F_200E_202C_200B_202D_200B_200D_206B_206B_202D_206F_200C_202E((IDisposable)enumerator);
|
||||
num = -462922479;
|
||||
break;
|
||||
}
|
||||
continue;
|
||||
end_IL_02f5:
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
failureReason = 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>(1806822311);
|
||||
if (aetheryteFunctions.IsTeleportUnlocked())
|
||||
{
|
||||
foreach (MenderNpc cityFallback in MenderDataService.CityFallbacks)
|
||||
{
|
||||
if (routeEnqueuer.TryEnqueueRouted(taskQueue, cityFallback.TerritoryId, cityFallback.Position))
|
||||
{
|
||||
logger.LogInformation("Lowest gear condition {Condition}%, no zone mender - routing to city mender {DataId}", lowestCondition, cityFallback.DataId);
|
||||
taskQueue.Enqueue(new Questionable.Controller.Steps.Common.Mount.UnmountTask());
|
||||
taskQueue.Enqueue(new RepairGear.MenderRepairTask(cityFallback));
|
||||
MarkAttempt();
|
||||
failureReason = string.Empty;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
failureReason = "no dark matter or crafter levels for self-repair, and no reachable mender";
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool CanSelfRepair()
|
||||
{
|
||||
ExcelSheet<ClassJob> classJobSheet = dataManager.GetExcelSheet<ClassJob>();
|
||||
return _206B_200B_200F_206D_202B_200D_206D_200E_202E_200D_200E_200C_200D_200C_206A_200D_202D_202B_206C_202C_206C_206C_206B_206B_206C_206E_200C_206F_206C_206F_200C_202C_202D_200F_206E_202E_206A_202B_206D_200C_202E(dataManager, (Func<uint, byte>)delegate(uint classJobId)
|
||||
{
|
||||
ClassJob row;
|
||||
int num = (classJobSheet.TryGetRow(classJobId, out row) ? (-528090726) : (-528090727));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -528090725;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_004e;
|
||||
case 2:
|
||||
return 0;
|
||||
case 1:
|
||||
return (byte)_003C_003Ec__DisplayClass19_0._200C_206B_202B_202B_206C_200B_202D_206C_206D_206C_206E_202E_202E_202B_200B_206F_202B_202C_202A_200D_206E_202E_206C_200F_202C_206B_200D_206A_202E_202C_200B_206D_206C_200F_200E_206C_200F_206E_200D_202A_202E((int)row.ExpArrayIndex);
|
||||
}
|
||||
continue;
|
||||
IL_004e:
|
||||
num = -528090727;
|
||||
}
|
||||
}, configuration.General.RepairThresholdPercent);
|
||||
ClassJob row;
|
||||
return RepairActions.CanSelfRepairAny(dataManager, (uint classJobId) => (byte)(classJobSheet.TryGetRow(classJobId, out row) ? ((byte)PlayerStateHelper.GetClassJobLevel(row.ExpArrayIndex)) : 0), configuration.General.RepairThresholdPercent);
|
||||
}
|
||||
|
||||
private void MarkAttempt()
|
||||
{
|
||||
_nextAttemptAtMs = _202B_206C_202A_202A_206E_202C_200C_202A_202A_200E_200B_200D_206B_202D_206A_200B_200D_200E_200B_200F_206F_202C_202C_200F_200E_202E_206F_202E_202E_206B_202C_202D_200F_200C_200B_206F_206E_202E_206A_202A_202E() + 300000;
|
||||
}
|
||||
|
||||
static bool _202A_206F_206D_206C_200E_200C_206D_206A_200E_202A_206E_206F_206C_200C_200E_200F_202B_202B_206B_202C_200F_206C_202C_206C_202E_206C_206F_206C_200F_206E_200D_200E_202B_206B_202A_202D_202A_200C_202B_206A_202E(ICondition P_0, ConditionFlag P_1)
|
||||
{
|
||||
return P_0[P_1];
|
||||
}
|
||||
|
||||
static int? _200E_202E_202C_202C_200D_206E_200B_202B_200E_202E_202A_202C_202D_202B_202D_202B_200E_206C_206F_206E_206C_202C_202E_200C_202A_202C_202C_206D_206C_202B_200B_206C_202D_202E_200D_200E_206C_200C_206A_206C_202E()
|
||||
{
|
||||
return GearConditionHelper.GetLowestConditionPercent();
|
||||
}
|
||||
|
||||
static long _202B_206C_202A_202A_206E_202C_200C_202A_202A_200E_200B_200D_206B_202D_206A_200B_200D_200E_200B_200F_206F_202C_202C_200F_200E_202E_206F_202E_202E_206B_202C_202D_200F_200C_200B_206F_206E_202E_206A_202A_202E()
|
||||
{
|
||||
return Environment.TickCount64;
|
||||
}
|
||||
|
||||
static void _206A_200F_206D_200B_202C_200B_206D_206C_202E_202E_200F_200F_202B_200D_200D_206F_200B_206B_206D_202E_202D_206C_206A_202D_202A_206A_202B_200D_206D_206B_206C_206D_206F_202E_200D_202A_202C_202E_206A_206E_202E(ILogger P_0, string P_1, object[] P_2)
|
||||
{
|
||||
P_0.LogError(P_1, P_2);
|
||||
}
|
||||
|
||||
static void _200D_206B_206B_202C_200D_206C_200E_200D_202E_202C_206B_202D_206B_206C_206F_200D_200F_206D_200E_206C_206F_206B_202E_200B_200C_202E_202E_202B_206F_206C_206C_202A_206D_202A_200C_206B_200B_200F_202C_206C_202E(IChatGui P_0, string P_1, string P_2, ushort? P_3)
|
||||
{
|
||||
P_0.Print(P_1, P_2, P_3);
|
||||
}
|
||||
|
||||
static void _206A_206D_202D_200F_200E_202D_206E_206C_206B_202E_202D_200E_200D_200E_206B_206D_206B_200E_202D_206A_202B_200E_200B_202B_200F_206F_202C_200D_200B_202E_202E_206D_206C_202B_206F_206E_200F_206B_200D_206A_202E(ILogger P_0, string P_1, object[] P_2)
|
||||
{
|
||||
P_0.LogInformation(P_1, P_2);
|
||||
}
|
||||
|
||||
static IPlayerCharacter _206D_202E_206C_206D_200F_202E_200C_200C_202B_202B_200D_200F_206A_206E_206F_206C_202E_206A_202D_202C_206B_206D_200B_206D_206A_202E_200D_200C_202D_200D_206C_200D_206C_206B_202C_206E_206B_206F_202C_202D_202E(IObjectTable P_0)
|
||||
{
|
||||
return P_0.LocalPlayer;
|
||||
}
|
||||
|
||||
static uint _200E_206C_200F_200D_202E_206C_202D_206E_206C_206A_200C_202E_200E_206F_200F_200B_202B_202C_206A_202A_202A_200D_206F_206C_202C_202C_202A_202B_206D_206F_202B_202D_202D_202A_200E_200D_200D_202E_206E_206E_202E(IClientState P_0)
|
||||
{
|
||||
return P_0.TerritoryType;
|
||||
}
|
||||
|
||||
static Vector3 _206C_202C_202B_206E_202C_200B_202C_202B_202D_202D_206D_206A_206A_202C_202E_206F_200C_202D_206A_202C_202B_202D_200F_206A_206A_202A_202E_202C_202B_202C_206B_200F_202D_202A_206B_206B_200F_202D_202D_202C_202E(IGameObject P_0)
|
||||
{
|
||||
return P_0.Position;
|
||||
}
|
||||
|
||||
static bool _206B_200F_206D_206D_206B_206B_200B_206D_202A_206D_202A_206B_206E_200D_206E_202D_200D_206E_206A_206F_206A_202B_202E_200B_202A_206A_206A_206D_202D_202B_206C_206F_202D_206D_206F_202C_202A_202D_200B_202E_202E(IEnumerator P_0)
|
||||
{
|
||||
return P_0.MoveNext();
|
||||
}
|
||||
|
||||
static void _200C_206C_200E_200B_202C_206C_206A_200E_200D_206F_206F_200D_200E_200E_200C_206A_206C_206F_200E_200B_206E_202E_202C_202D_200B_202D_202A_200D_206F_200E_202C_200B_202D_200B_200D_206B_206B_202D_206F_200C_202E(IDisposable P_0)
|
||||
{
|
||||
P_0.Dispose();
|
||||
}
|
||||
|
||||
static bool _206B_200B_200F_206D_202B_200D_206D_200E_202E_200D_200E_200C_200D_200C_206A_200D_202D_202B_206C_202C_206C_206C_206B_206B_206C_206E_200C_206F_206C_206F_200C_202C_202D_200F_206E_202E_206A_202B_206D_200C_202E(IDataManager P_0, Func<uint, byte> P_1, int P_2)
|
||||
{
|
||||
return RepairActions.CanSelfRepairAny(P_0, P_1, P_2);
|
||||
_nextAttemptAtMs = Environment.TickCount64 + 300000;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue