muffin v7.5.6
This commit is contained in:
parent
6266f9e6b7
commit
addf2d530f
619 changed files with 264792 additions and 446022 deletions
|
|
@ -1,11 +1,15 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using Dalamud.Game.Text.SeStringHandling;
|
||||
using Dalamud.Plugin.Services;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
using LLib;
|
||||
using LLib.Inventory;
|
||||
using Lumina.Excel.Sheets;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Questionable.Functions;
|
||||
|
|
@ -18,22 +22,135 @@ internal static class EquipItem
|
|||
{
|
||||
internal sealed class Factory : SimpleTaskFactory
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public override ITask? CreateTask(Questionable.Model.Quest quest, QuestSequence sequence, QuestStep step)
|
||||
{
|
||||
if (step.InteractionType != EInteractionType.EquipItem)
|
||||
int num = ((_206E_202C_202B_206E_202A_200F_200F_200D_206D_200B_202E_206B_200D_200E_200E_206A_202A_200D_202D_202B_206A_202B_206A_206A_206E_206C_202E_206E_200E_206A_206F_206C_200E_202B_206D_202D_202A_202A_206E_206F_202E(step) == EInteractionType.EquipItem) ? (-1960316662) : (-1960316663));
|
||||
while (true)
|
||||
{
|
||||
return null;
|
||||
int num2 = num;
|
||||
int num3 = -1960316664;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 2:
|
||||
_200C_206A_206A_206C_202C_206E_200B_202D_200E_206C_202B_206A_206F_206C_206C_202E_202C_206A_206C_200B_206D_206F_200F_202D_206A_202C_206F_206B_202A_202D_200C_206B_202E_200F_206C_200E_202A_202C_206C_202A_202E((object)_206A_202C_206D_200D_202B_206E_200B_206A_206E_206F_202D_200E_202E_206E_200B_202C_202B_202D_200F_202B_206B_202E_202C_200C_202B_202C_206A_206C_202C_206F_206F_206E_200C_206E_206B_206A_206C_202D_206E_200E_202E(step), 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>(775023194));
|
||||
return new Task(_206A_202C_206D_200D_202B_206E_200B_206A_206E_206F_202D_200E_202E_206E_200B_202C_202B_202D_200F_202B_206B_202E_202C_200C_202B_202C_206A_206C_202C_206F_206F_206E_200C_206E_206B_206A_206C_202D_206E_200E_202E(step).Value);
|
||||
case 1:
|
||||
return null;
|
||||
case 0:
|
||||
goto IL_0078;
|
||||
}
|
||||
continue;
|
||||
IL_0078:
|
||||
num = -1960316663;
|
||||
}
|
||||
ArgumentNullException.ThrowIfNull(step.ItemId, "step.ItemId");
|
||||
return new Task(step.ItemId.Value);
|
||||
}
|
||||
|
||||
static EInteractionType _206E_202C_202B_206E_202A_200F_200F_200D_206D_200B_202E_206B_200D_200E_200E_206A_202A_200D_202D_202B_206A_202B_206A_206A_206E_206C_202E_206E_200E_206A_206F_206C_200E_202B_206D_202D_202A_202A_206E_206F_202E(QuestStep P_0)
|
||||
{
|
||||
return P_0.InteractionType;
|
||||
}
|
||||
|
||||
static uint? _206A_202C_206D_200D_202B_206E_200B_206A_206E_206F_202D_200E_202E_206E_200B_202C_202B_202D_200F_202B_206B_202E_202C_200C_202B_202C_206A_206C_202C_206F_206F_206E_200C_206E_206B_206A_206C_202D_206E_200E_202E(QuestStep P_0)
|
||||
{
|
||||
return P_0.ItemId;
|
||||
}
|
||||
|
||||
static void _200C_206A_206A_206C_202C_206E_200B_202D_200E_206C_202B_206A_206F_206C_206C_202E_202C_206A_206C_200B_206D_206F_200F_202D_206A_202C_206F_206B_202A_202D_200C_206B_202E_200F_206C_200E_202A_202C_206C_202A_202E(object P_0, string P_1)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(P_0, P_1);
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed record Task(uint ItemId) : ITask
|
||||
{
|
||||
[CompilerGenerated]
|
||||
private Type EqualityContract
|
||||
{
|
||||
[CompilerGenerated]
|
||||
get
|
||||
{
|
||||
return _202A_200B_202C_202C_206F_200C_202E_202A_200E_206E_206A_206F_206F_200E_206D_200B_206D_200B_206C_202C_206F_206E_206E_206A_202B_206D_206D_206C_200E_206F_200E_206D_200E_200B_206A_200C_206F_202B_200C_200C_202E(typeof(Task).TypeHandle);
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public override string ToString()
|
||||
{
|
||||
return $"Equip({ItemId})";
|
||||
DefaultInterpolatedStringHandler defaultInterpolatedStringHandler = new DefaultInterpolatedStringHandler(7, 1);
|
||||
defaultInterpolatedStringHandler.AppendLiteral(global::_003CModule_003E._202D_206D_206A_206E_202C_202B_200C_206C_200E_206A_206D_200E_206A_202A_200C_202E_206E_202C_206F_200B_206D_206F_200C_202C_200B_202B_200F_200B_206A_206F_200F_202E_206B_200E_202B_202A_200F_200B_202A_200E_202E<string>(1269144091));
|
||||
defaultInterpolatedStringHandler.AppendFormatted(ItemId);
|
||||
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>(1735737295));
|
||||
return defaultInterpolatedStringHandler.ToStringAndClear();
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
private bool PrintMembers(StringBuilder builder)
|
||||
{
|
||||
_206B_200F_206D_206D_206A_206A_206D_206F_202C_202D_206E_200D_200C_206D_200E_202B_206A_206F_200C_206F_202A_200E_202D_202E_202B_202E_206B_202C_200C_206C_202D_202A_206A_206C_202B_206A_202C_200D_206A_200E_202E();
|
||||
_206D_206A_202E_202A_206E_202D_200C_206C_206E_202D_202B_200E_202C_202B_206C_206C_206C_200F_206A_206F_200E_206C_206D_202A_200E_200B_206F_202C_202D_202D_202A_206E_206B_200D_200E_206F_202A_202A_202C_202A_202E(builder, 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>(1149877868));
|
||||
_206D_206A_202E_202A_206E_202D_200C_206C_206E_202D_202B_200E_202C_202B_206C_206C_206C_200F_206A_206F_200E_206C_206D_202A_200E_200B_206F_202C_202D_202D_202A_206E_206B_200D_200E_206F_202A_202A_202C_202A_202E(builder, ItemId.ToString());
|
||||
return true;
|
||||
}
|
||||
|
||||
[CompilerGenerated]
|
||||
public bool Equals(Task? other)
|
||||
{
|
||||
int num = (((object)this == other) ? 916478318 : 916478314);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 916478319;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 4:
|
||||
return EqualityComparer<uint>.Default.Equals(ItemId, other.ItemId);
|
||||
case 5:
|
||||
num = (((object)other == null) ? 916478317 : 916478319);
|
||||
break;
|
||||
case 3:
|
||||
num = 916478314;
|
||||
break;
|
||||
case 2:
|
||||
return false;
|
||||
case 0:
|
||||
num = ((!_206C_200B_202B_200E_202A_206E_206A_206B_200B_202D_206E_200B_200B_206D_206E_200F_202C_206C_200F_200F_202D_202D_206A_206B_200F_206A_202E_200E_202C_206B_202E_200E_206B_200D_202C_200F_202C_200E_200B_206F_202E(EqualityContract, other.EqualityContract)) ? 916478317 : 916478315);
|
||||
break;
|
||||
case 1:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool IEquatable<Task>.Equals(Task? other)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in Equals
|
||||
return this.Equals(other);
|
||||
}
|
||||
|
||||
static Type _202A_200B_202C_202C_206F_200C_202E_202A_200E_206E_206A_206F_206F_200E_206D_200B_206D_200B_206C_202C_206F_206E_206E_206A_202B_206D_206D_206C_200E_206F_200E_206D_200E_200B_206A_200C_206F_202B_200C_200C_202E(RuntimeTypeHandle P_0)
|
||||
{
|
||||
return Type.GetTypeFromHandle(P_0);
|
||||
}
|
||||
|
||||
static void _206B_200F_206D_206D_206A_206A_206D_206F_202C_202D_206E_200D_200C_206D_200E_202B_206A_206F_200C_206F_202A_200E_202D_202E_202B_202E_206B_202C_200C_206C_202D_202A_206A_206C_202B_206A_202C_200D_206A_200E_202E()
|
||||
{
|
||||
RuntimeHelpers.EnsureSufficientExecutionStack();
|
||||
}
|
||||
|
||||
static StringBuilder _206D_206A_202E_202A_206E_202D_200C_206C_206E_202D_202B_200E_202C_202B_206C_206C_206C_200F_206A_206F_200E_206C_206D_202A_200E_200B_206F_202C_202D_202D_202A_206E_206B_200D_200E_206F_202A_202A_202C_202A_202E(StringBuilder P_0, string P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static bool _206C_200B_202B_200E_202A_206E_206A_206B_200B_202D_206E_200B_200B_206D_206E_200F_202C_206C_200F_200F_202D_202D_206A_206B_200F_206A_202E_200E_202C_206B_202E_200E_206B_200D_202C_200F_202C_200E_200B_206F_202E(Type P_0, Type P_1)
|
||||
{
|
||||
return P_0 == P_1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -41,25 +158,7 @@ internal static class EquipItem
|
|||
{
|
||||
private const int MaxAttempts = 3;
|
||||
|
||||
private static readonly IReadOnlyList<InventoryType> SourceInventoryTypes = new global::_003C_003Ez__ReadOnlyArray<InventoryType>(new InventoryType[16]
|
||||
{
|
||||
InventoryType.ArmoryMainHand,
|
||||
InventoryType.ArmoryOffHand,
|
||||
InventoryType.ArmoryHead,
|
||||
InventoryType.ArmoryBody,
|
||||
InventoryType.ArmoryHands,
|
||||
InventoryType.ArmoryLegs,
|
||||
InventoryType.ArmoryFeets,
|
||||
InventoryType.ArmoryEar,
|
||||
InventoryType.ArmoryNeck,
|
||||
InventoryType.ArmoryWrist,
|
||||
InventoryType.ArmoryRings,
|
||||
InventoryType.ArmorySoulCrystal,
|
||||
InventoryType.Inventory1,
|
||||
InventoryType.Inventory2,
|
||||
InventoryType.Inventory3,
|
||||
InventoryType.Inventory4
|
||||
});
|
||||
private static readonly IReadOnlyList<InventoryType> SourceInventoryTypes;
|
||||
|
||||
private int _attempts;
|
||||
|
||||
|
|
@ -67,164 +166,392 @@ internal static class EquipItem
|
|||
|
||||
private List<ushort> _targetSlots;
|
||||
|
||||
private DateTime _continueAt = DateTime.MaxValue;
|
||||
private long _continueAt = long.MaxValue;
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
protected override bool Start()
|
||||
{
|
||||
_item = dataManager.GetExcelSheet<Item>().GetRowOrDefault(base.Task.ItemId) ?? throw new ArgumentOutOfRangeException("ItemId");
|
||||
_targetSlots = GetEquipSlot(_item) ?? throw new InvalidOperationException("Not a piece of equipment");
|
||||
_item = ((ItemHandle)base.Task.ItemId).GetRow(dataManager) ?? throw _202D_206F_200D_200B_200E_200F_200C_200F_206A_200C_206E_202E_206F_202B_202B_200D_206B_200F_200B_206E_202A_200C_202B_202B_200F_206A_200F_202C_206F_206F_202C_200D_206F_206D_202B_206D_202A_206E_200F_206D_202E(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>(-1077249422));
|
||||
_targetSlots = GetEquipSlot(_item) ?? throw _202C_202B_200C_200E_206C_200C_206A_206A_206E_202D_200E_206D_202B_200F_206A_202C_202C_200C_206D_206E_202B_206A_200F_200F_200F_206C_200C_206C_200F_206C_200C_202C_206E_206F_202C_200C_206D_200D_200B_202A_202E(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>(1196644281));
|
||||
Equip();
|
||||
_continueAt = DateTime.Now.AddSeconds(1.0);
|
||||
_continueAt = _206D_202E_200E_200D_202A_206E_200E_200E_200F_206C_206F_206F_200F_200C_200D_206D_202A_206A_206C_206F_200E_206F_200F_206C_206F_202D_200D_202E_202E_202B_202C_206A_202D_206E_200C_206A_200B_206E_206D_206A_202E() + 1000;
|
||||
return true;
|
||||
}
|
||||
|
||||
public unsafe override ETaskResult Update()
|
||||
public override ETaskResult Update()
|
||||
{
|
||||
if (DateTime.Now < _continueAt)
|
||||
int num = ((_206D_202E_200E_200D_202A_206E_200E_200E_200F_206C_206F_206F_200F_200C_200D_206D_202A_206A_206C_206F_200E_206F_200F_206C_206F_202D_200D_202E_202E_202B_202C_206A_202D_206E_200C_206A_200B_206E_206D_206A_202E() >= _continueAt) ? (-1725394015) : (-1725394009));
|
||||
while (true)
|
||||
{
|
||||
return ETaskResult.StillRunning;
|
||||
}
|
||||
InventoryManager* ptr = InventoryManager.Instance();
|
||||
if (ptr == null)
|
||||
{
|
||||
return ETaskResult.StillRunning;
|
||||
}
|
||||
foreach (ushort targetSlot in _targetSlots)
|
||||
{
|
||||
InventoryItem* inventorySlot = ptr->GetInventorySlot(InventoryType.EquippedItems, targetSlot);
|
||||
if (inventorySlot != null && inventorySlot->ItemId == base.Task.ItemId)
|
||||
int num2 = num;
|
||||
int num3 = -1725394013;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 2:
|
||||
num = ((!_200B_206F_200E_202D_200D_206A_202C_200F_202E_206D_206A_206D_202A_200C_202C_206B_200D_206E_200E_202D_202B_200F_202C_206A_202B_202C_202A_200E_206A_200D_206C_206C_202E_202E_200C_202E_206F_202C_200B_206E_202E(base.Task.ItemId)) ? (-1725394014) : (-1725394016));
|
||||
break;
|
||||
case 4:
|
||||
return ETaskResult.StillRunning;
|
||||
case 3:
|
||||
return ETaskResult.TaskComplete;
|
||||
case 0:
|
||||
num = -1725394009;
|
||||
break;
|
||||
case 1:
|
||||
Equip();
|
||||
_continueAt = _206D_202E_200E_200D_202A_206E_200E_200E_200F_206C_206F_206F_200F_200C_200D_206D_202A_206A_206C_206F_200E_206F_200F_206C_206F_202D_200D_202E_202E_202B_202C_206A_202D_206E_200C_206A_200B_206E_206D_206A_202E() + 1000;
|
||||
return ETaskResult.StillRunning;
|
||||
}
|
||||
}
|
||||
Equip();
|
||||
_continueAt = DateTime.Now.AddSeconds(1.0);
|
||||
return ETaskResult.StillRunning;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
private unsafe void Equip()
|
||||
{
|
||||
_attempts++;
|
||||
if (_attempts > 3)
|
||||
int attempts = _attempts;
|
||||
int num = 1;
|
||||
int num2 = attempts;
|
||||
_attempts = (num2 | num) + (num2 & num);
|
||||
int num3 = ((_attempts <= 3) ? 2032675570 : 2032675573);
|
||||
InventoryManager* inventoryManager = default(InventoryManager*);
|
||||
ushort num11 = default(ushort);
|
||||
InventoryContainer* inventoryContainer = default(InventoryContainer*);
|
||||
InventoryType current = default(InventoryType);
|
||||
InventoryItem* inventorySlot = default(InventoryItem*);
|
||||
while (true)
|
||||
{
|
||||
throw new TaskException("Unable to equip gear.");
|
||||
}
|
||||
InventoryManager* inventoryManager = InventoryManager.Instance();
|
||||
if (inventoryManager == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
InventoryContainer* inventoryContainer = inventoryManager->GetInventoryContainer(InventoryType.EquippedItems);
|
||||
if (inventoryContainer == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
foreach (ushort targetSlot in _targetSlots)
|
||||
{
|
||||
InventoryItem* inventorySlot = inventoryContainer->GetInventorySlot(targetSlot);
|
||||
if (inventorySlot != null && inventorySlot->ItemId == base.Task.ItemId)
|
||||
int num4 = num3;
|
||||
num = 2032675575;
|
||||
num2 = num4;
|
||||
int num5 = num2 + num;
|
||||
int num6 = num2 & num;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
logger.LogInformation("Already equipped {Item}, skipping step", _item?.Name.ToString());
|
||||
case 0:
|
||||
num3 = 2032675573;
|
||||
break;
|
||||
case 4:
|
||||
num3 = ((!_200B_206F_200E_202D_200D_206A_202C_200F_202E_206D_206A_206D_202A_200C_202C_206B_200D_206E_200E_202D_202B_200F_202C_206A_202B_202C_202A_200E_206A_200D_206C_206C_202E_202E_200C_202E_206F_202C_200B_206E_202E(base.Task.ItemId)) ? 2032675572 : 2032675569);
|
||||
break;
|
||||
case 6:
|
||||
_206C_206A_200D_200F_200F_202A_200B_206A_200C_206E_200E_200C_206D_200E_202B_206A_206C_202E_206D_206B_200D_206F_200B_202C_206C_200E_202A_200E_202C_202E_206B_200D_200C_202B_206B_200F_200E_200D_202A_200F_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>(764444822), new object[1] { _item?.Name.ToString() });
|
||||
return;
|
||||
}
|
||||
}
|
||||
foreach (InventoryType sourceInventoryType in SourceInventoryTypes)
|
||||
{
|
||||
InventoryContainer* inventoryContainer2 = inventoryManager->GetInventoryContainer(sourceInventoryType);
|
||||
if (inventoryContainer2 == null || (inventoryManager->GetItemCountInContainer(base.Task.ItemId, sourceInventoryType, isHq: true, 0) == 0 && inventoryManager->GetItemCountInContainer(base.Task.ItemId, sourceInventoryType, isHq: false, 0) == 0))
|
||||
case 2:
|
||||
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>(2089703109));
|
||||
case 1:
|
||||
return;
|
||||
case 5:
|
||||
inventoryManager = InventoryManager.Instance();
|
||||
num3 = ((inventoryManager != null) ? 2032675571 : 2032675574);
|
||||
break;
|
||||
case 3:
|
||||
{
|
||||
continue;
|
||||
}
|
||||
for (ushort num = 0; num < inventoryContainer2->Size; num++)
|
||||
{
|
||||
InventoryItem* inventorySlot2 = inventoryContainer2->GetInventorySlot(num);
|
||||
if (inventorySlot2 != null && inventorySlot2->ItemId == base.Task.ItemId)
|
||||
IEnumerator<InventoryType> enumerator = SourceInventoryTypes.GetEnumerator();
|
||||
try
|
||||
{
|
||||
ushort num2 = _targetSlots.Where(delegate(ushort x)
|
||||
num3 = -665926440;
|
||||
while (true)
|
||||
{
|
||||
InventoryItem* inventorySlot3 = inventoryManager->GetInventorySlot(InventoryType.EquippedItems, x);
|
||||
return inventorySlot3 == null || inventorySlot3->ItemId == 0;
|
||||
}).Concat(_targetSlots).First();
|
||||
logger.LogInformation("Equipping item from {SourceInventory}, {SourceSlot} to {TargetInventory}, {TargetSlot}", sourceInventoryType, num, InventoryType.EquippedItems, num2);
|
||||
int num3 = inventoryManager->MoveItemSlot(sourceInventoryType, num, InventoryType.EquippedItems, num2, a6: true);
|
||||
logger.LogInformation("MoveItemSlot result: {Result}", num3);
|
||||
return;
|
||||
int num7 = num3;
|
||||
num = -665926439;
|
||||
num2 = num7;
|
||||
int num8 = num2 + num;
|
||||
int num9 = num2 & num;
|
||||
switch (num8 - (num9 + num9))
|
||||
{
|
||||
case 4:
|
||||
num11 = 0;
|
||||
num3 = -665926436;
|
||||
break;
|
||||
case 1:
|
||||
num3 = (_206B_200C_206A_206B_206A_202D_206C_200F_206B_206A_206D_200F_200C_202B_200C_206B_202B_200B_200B_202E_200E_200B_200C_200B_202C_200F_206B_206D_200E_206C_206B_200B_200F_202E_200D_206F_200E_202A_200E_200D_202E((IEnumerator)enumerator) ? (-665926434) : (-665926439));
|
||||
break;
|
||||
case 5:
|
||||
num3 = ((num11 < inventoryContainer->Size) ? (-665926438) : (-665926440));
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
ushort num14 = _targetSlots.Where(delegate(ushort x)
|
||||
{
|
||||
InventoryItem* inventorySlot2 = inventoryManager->GetInventorySlot(InventoryType.EquippedItems, x);
|
||||
int num19 = ((inventorySlot2 == null) ? 1990589233 : 1990589234);
|
||||
while (true)
|
||||
{
|
||||
int num20 = num19;
|
||||
int num21 = 1990589232;
|
||||
int num22 = num20;
|
||||
int num23 = num22 + num21;
|
||||
int num24 = num22 & num21;
|
||||
switch (num23 - (num24 + num24))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0057;
|
||||
case 1:
|
||||
return true;
|
||||
case 2:
|
||||
return inventorySlot2->ItemId == 0;
|
||||
}
|
||||
continue;
|
||||
IL_0057:
|
||||
num19 = 1990589234;
|
||||
}
|
||||
}).Concat(_targetSlots).First();
|
||||
_206C_206A_200D_200F_200F_202A_200B_206A_200C_206E_200E_200C_206D_200E_202B_206A_206C_202E_206D_206B_200D_206F_200B_202C_206C_200E_202A_200E_202C_202E_206B_200D_200C_202B_206B_200F_200E_200D_202A_200F_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>(-2001963263), new object[4]
|
||||
{
|
||||
current,
|
||||
num11,
|
||||
InventoryType.EquippedItems,
|
||||
num14
|
||||
});
|
||||
int num15 = inventoryManager->MoveItemSlot(current, num11, InventoryType.EquippedItems, num14, a6: true);
|
||||
_206C_206A_200D_200F_200F_202A_200B_206A_200C_206E_200E_200C_206D_200E_202B_206A_206C_202E_206D_206B_200D_206F_200B_202C_206C_200E_202A_200E_202C_202E_206B_200D_200C_202B_206B_200F_200E_200D_202A_200F_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>(1852506223), new object[1] { num15 });
|
||||
return;
|
||||
}
|
||||
case 9:
|
||||
num3 = -665926440;
|
||||
break;
|
||||
case 6:
|
||||
{
|
||||
ushort num10 = num11;
|
||||
num = 1;
|
||||
num2 = num10;
|
||||
int num12 = num2 ^ num;
|
||||
int num13 = num2 & num;
|
||||
num11 = (ushort)(num12 + (num13 + num13));
|
||||
num3 = -665926436;
|
||||
break;
|
||||
}
|
||||
case 8:
|
||||
num3 = ((inventorySlot->ItemId != base.Task.ItemId) ? (-665926433) : (-665926437));
|
||||
break;
|
||||
case 3:
|
||||
inventorySlot = inventoryContainer->GetInventorySlot(num11);
|
||||
num3 = ((inventorySlot == null) ? (-665926433) : (-665926447));
|
||||
break;
|
||||
case 7:
|
||||
current = enumerator.Current;
|
||||
inventoryContainer = inventoryManager->GetInventoryContainer(current);
|
||||
num3 = ((inventoryContainer == null) ? (-665926440) : (-665926435));
|
||||
break;
|
||||
case 0:
|
||||
goto end_IL_0167;
|
||||
}
|
||||
continue;
|
||||
end_IL_0167:
|
||||
break;
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
num3 = ((enumerator == null) ? (-1329874453) : (-1329874454));
|
||||
while (true)
|
||||
{
|
||||
int num16 = num3;
|
||||
num = -1329874453;
|
||||
num2 = num16;
|
||||
int num17 = num2 + num;
|
||||
int num18 = num2 & num;
|
||||
switch (num17 - (num18 + num18))
|
||||
{
|
||||
case 2:
|
||||
num3 = -1329874454;
|
||||
break;
|
||||
case 0:
|
||||
goto end_IL_03c4;
|
||||
case 1:
|
||||
_200F_206D_202E_206B_200E_206D_202C_206A_206C_200B_206D_202A_200F_202B_200C_206E_206C_200B_206D_202B_206F_202B_202B_206D_202B_202A_202A_200E_200C_202A_200E_202E_200C_202C_206A_202C_206C_200D_202C_202E_202E((IDisposable)enumerator);
|
||||
num3 = -1329874453;
|
||||
break;
|
||||
}
|
||||
continue;
|
||||
end_IL_03c4:
|
||||
break;
|
||||
}
|
||||
}
|
||||
DefaultInterpolatedStringHandler defaultInterpolatedStringHandler = new DefaultInterpolatedStringHandler(22, 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>(-639221766));
|
||||
defaultInterpolatedStringHandler.AppendFormatted(base.Task.ItemId);
|
||||
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>(-978038014));
|
||||
throw new TaskException(defaultInterpolatedStringHandler.ToStringAndClear());
|
||||
}
|
||||
}
|
||||
}
|
||||
throw new TaskException($"Could not equip item {base.Task.ItemId}.");
|
||||
}
|
||||
|
||||
private static List<ushort>? GetEquipSlot(Item? item)
|
||||
{
|
||||
if (!item.HasValue)
|
||||
int num = (item.HasValue ? 1849291533 : 1849291535);
|
||||
uint rowId = default(uint);
|
||||
List<ushort> result = default(List<ushort>);
|
||||
while (true)
|
||||
{
|
||||
return new List<ushort>();
|
||||
}
|
||||
switch (item.Value.EquipSlotCategory.RowId)
|
||||
{
|
||||
case 1u:
|
||||
case 2u:
|
||||
case 3u:
|
||||
case 4u:
|
||||
case 5u:
|
||||
case 6u:
|
||||
case 7u:
|
||||
case 8u:
|
||||
case 9u:
|
||||
case 10u:
|
||||
case 11u:
|
||||
{
|
||||
int num = 1;
|
||||
List<ushort> list4 = new List<ushort>(num);
|
||||
CollectionsMarshal.SetCount(list4, num);
|
||||
CollectionsMarshal.AsSpan(list4)[0] = (ushort)(item.Value.EquipSlotCategory.RowId - 1);
|
||||
return list4;
|
||||
}
|
||||
case 12u:
|
||||
{
|
||||
int num = 2;
|
||||
List<ushort> list3 = new List<ushort>(num);
|
||||
CollectionsMarshal.SetCount(list3, num);
|
||||
Span<ushort> span = CollectionsMarshal.AsSpan(list3);
|
||||
span[0] = 11;
|
||||
span[1] = 12;
|
||||
return list3;
|
||||
}
|
||||
case 13u:
|
||||
{
|
||||
int num = 1;
|
||||
List<ushort> list2 = new List<ushort>(num);
|
||||
CollectionsMarshal.SetCount(list2, num);
|
||||
CollectionsMarshal.AsSpan(list2)[0] = 0;
|
||||
return list2;
|
||||
}
|
||||
case 17u:
|
||||
{
|
||||
int num = 1;
|
||||
List<ushort> list = new List<ushort>(num);
|
||||
CollectionsMarshal.SetCount(list, num);
|
||||
CollectionsMarshal.AsSpan(list)[0] = 13;
|
||||
return list;
|
||||
}
|
||||
default:
|
||||
return null;
|
||||
int num2 = num;
|
||||
int num3 = 1849291534;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 5:
|
||||
num = ((rowId == 12) ? 1849291532 : 1849291523);
|
||||
break;
|
||||
case 3:
|
||||
rowId = item.Value.EquipSlotCategory.RowId;
|
||||
num = ((rowId < 1) ? 1849291526 : 1849291524);
|
||||
break;
|
||||
case 12:
|
||||
{
|
||||
int num5 = 1;
|
||||
List<ushort> list4 = new List<ushort>(num5);
|
||||
CollectionsMarshal.SetCount(list4, num5);
|
||||
CollectionsMarshal.AsSpan(list4)[0] = 13;
|
||||
result = list4;
|
||||
num = 1849291527;
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
return null;
|
||||
case 11:
|
||||
{
|
||||
int num5 = 1;
|
||||
List<ushort> list2 = new List<ushort>(num5);
|
||||
CollectionsMarshal.SetCount(list2, num5);
|
||||
CollectionsMarshal.AsSpan(list2)[0] = 0;
|
||||
result = list2;
|
||||
num = 1849291527;
|
||||
break;
|
||||
}
|
||||
case 13:
|
||||
num = ((rowId == 13) ? 1849291525 : 1849291528);
|
||||
break;
|
||||
case 10:
|
||||
num = ((rowId <= 11) ? 1849291530 : 1849291531);
|
||||
break;
|
||||
case 4:
|
||||
{
|
||||
int num5 = 1;
|
||||
List<ushort> list3 = new List<ushort>(num5);
|
||||
CollectionsMarshal.SetCount(list3, num5);
|
||||
CollectionsMarshal.AsSpan(list3)[0] = (ushort)(item.Value.EquipSlotCategory.RowId - 1);
|
||||
result = list3;
|
||||
num = 1849291527;
|
||||
break;
|
||||
}
|
||||
case 7:
|
||||
num = 1849291535;
|
||||
break;
|
||||
case 6:
|
||||
num = ((rowId == 17) ? 1849291522 : 1849291534);
|
||||
break;
|
||||
case 0:
|
||||
num = 1849291526;
|
||||
break;
|
||||
case 8:
|
||||
result = null;
|
||||
num = 1849291527;
|
||||
break;
|
||||
case 9:
|
||||
return result;
|
||||
case 2:
|
||||
{
|
||||
int num5 = 2;
|
||||
List<ushort> list = new List<ushort>(num5);
|
||||
CollectionsMarshal.SetCount(list, num5);
|
||||
Span<ushort> span = CollectionsMarshal.AsSpan(list);
|
||||
span[0] = 11;
|
||||
span[1] = 12;
|
||||
result = list;
|
||||
num = 1849291527;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool OnErrorToast(SeString message)
|
||||
{
|
||||
string b = dataManager.GetString(709u, (LogMessage x) => x.Text);
|
||||
if (GameFunctions.GameStringEquals(message.TextValue, b))
|
||||
int num = ((!GameFunctions.GameStringEquals(_200C_206D_206F_202A_202B_206F_202C_206F_206E_206D_202B_200D_202E_202D_202C_202D_202E_200B_206A_202E_200D_200F_206D_206A_206D_206F_206A_206A_202D_202A_206D_206D_200B_206A_206D_202B_206C_206A_202D_202D_202E(message), b)) ? 1240228835 : 1240228832);
|
||||
while (true)
|
||||
{
|
||||
_attempts = 3;
|
||||
int num2 = num;
|
||||
int num3 = 1240228834;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
num = 1240228832;
|
||||
break;
|
||||
case 2:
|
||||
_attempts = 3;
|
||||
num = 1240228835;
|
||||
break;
|
||||
case 1:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool IToastAware.OnErrorToast(SeString message)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in OnErrorToast
|
||||
return this.OnErrorToast(message);
|
||||
}
|
||||
|
||||
public override bool ShouldInterruptOnDamage()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
static DoEquip()
|
||||
{
|
||||
InventoryType[] array = new InventoryType[16];
|
||||
_206C_202D_200F_202E_200F_202A_200E_206A_206C_206E_202B_200D_202E_200C_206C_200F_200C_202C_202E_200D_200D_202E_200B_206E_202B_206E_202E_206C_206B_206D_200F_200F_206A_206A_200B_200F_200C_202B_202E_202C_202E((Array)array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
|
||||
SourceInventoryTypes = new global::_003C_003Ez__ReadOnlyArray<InventoryType>(array);
|
||||
}
|
||||
|
||||
static ArgumentOutOfRangeException _202D_206F_200D_200B_200E_200F_200C_200F_206A_200C_206E_202E_206F_202B_202B_200D_206B_200F_200B_206E_202A_200C_202B_202B_200F_206A_200F_202C_206F_206F_202C_200D_206F_206D_202B_206D_202A_206E_200F_206D_202E(string P_0)
|
||||
{
|
||||
return new ArgumentOutOfRangeException(P_0);
|
||||
}
|
||||
|
||||
static InvalidOperationException _202C_202B_200C_200E_206C_200C_206A_206A_206E_202D_200E_206D_202B_200F_206A_202C_202C_200C_206D_206E_202B_206A_200F_200F_200F_206C_200C_206C_200F_206C_200C_202C_206E_206F_202C_200C_206D_200D_200B_202A_202E(string P_0)
|
||||
{
|
||||
return new InvalidOperationException(P_0);
|
||||
}
|
||||
|
||||
static long _206D_202E_200E_200D_202A_206E_200E_200E_200F_206C_206F_206F_200F_200C_200D_206D_202A_206A_206C_206F_200E_206F_200F_206C_206F_202D_200D_202E_202E_202B_202C_206A_202D_206E_200C_206A_200B_206E_206D_206A_202E()
|
||||
{
|
||||
return Environment.TickCount64;
|
||||
}
|
||||
|
||||
static bool _200B_206F_200E_202D_200D_206A_202C_200F_202E_206D_206A_206D_202A_200C_202C_206B_200D_206E_200E_202D_202B_200F_202C_206A_202B_202C_202A_200E_206A_200D_206C_206C_202E_202E_200C_202E_206F_202C_200B_206E_202E(uint P_0)
|
||||
{
|
||||
return InventoryHelper.IsItemEquipped(P_0);
|
||||
}
|
||||
|
||||
static void _206C_206A_200D_200F_200F_202A_200B_206A_200C_206E_200E_200C_206D_200E_202B_206A_206C_202E_206D_206B_200D_206F_200B_202C_206C_200E_202A_200E_202C_202E_206B_200D_200C_202B_206B_200F_200E_200D_202A_200F_202E(ILogger P_0, string P_1, object[] P_2)
|
||||
{
|
||||
P_0.LogDebug(P_1, P_2);
|
||||
}
|
||||
|
||||
static bool _206B_200C_206A_206B_206A_202D_206C_200F_206B_206A_206D_200F_200C_202B_200C_206B_202B_200B_200B_202E_200E_200B_200C_200B_202C_200F_206B_206D_200E_206C_206B_200B_200F_202E_200D_206F_200E_202A_200E_200D_202E(IEnumerator P_0)
|
||||
{
|
||||
return P_0.MoveNext();
|
||||
}
|
||||
|
||||
static void _200F_206D_202E_206B_200E_206D_202C_206A_206C_200B_206D_202A_200F_202B_200C_206E_206C_200B_206D_202B_206F_202B_202B_206D_202B_202A_202A_200E_200C_202A_200E_202E_200C_202C_206A_202C_206C_200D_202C_202E_202E(IDisposable P_0)
|
||||
{
|
||||
P_0.Dispose();
|
||||
}
|
||||
|
||||
static string _200C_206D_206F_202A_202B_206F_202C_206F_206E_206D_202B_200D_202E_202D_202C_202D_202E_200B_206A_202E_200D_200F_206D_206A_206D_206F_206A_206A_202D_202A_206D_206D_200B_206A_206D_202B_206C_206A_202D_202D_202E(SeString P_0)
|
||||
{
|
||||
return P_0.TextValue;
|
||||
}
|
||||
|
||||
static void _206C_202D_200F_202E_200F_202A_200E_206A_206C_206E_202B_200D_202E_200C_206C_200F_200C_202C_202E_200D_200D_202E_200B_206E_202B_206E_202E_206C_206B_206D_200F_200F_206A_206A_200B_200F_200C_202B_202E_202C_202E(Array P_0, RuntimeFieldHandle P_1)
|
||||
{
|
||||
RuntimeHelpers.InitializeArray(P_0, P_1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue