muffin v7.5.6
This commit is contained in:
parent
6266f9e6b7
commit
addf2d530f
619 changed files with 264792 additions and 446022 deletions
|
|
@ -1,12 +1,16 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
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.UI.Agent;
|
||||
using FFXIVClientStructs.FFXIV.Component.GUI;
|
||||
using LLib.GameData;
|
||||
using Lumina.Excel;
|
||||
using Lumina.Excel.Sheets;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Questionable.Controller.Steps.Common;
|
||||
|
|
@ -20,105 +24,430 @@ internal static class Craft
|
|||
{
|
||||
internal sealed class Factory : ITaskFactory
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public IEnumerable<ITask> CreateAllTasks(Questionable.Model.Quest quest, QuestSequence sequence, QuestStep step)
|
||||
{
|
||||
if (step.InteractionType != EInteractionType.Craft)
|
||||
int num = ((_206A_202B_202D_206A_206B_200B_202A_202A_206B_202D_206A_206A_206C_206D_206A_200C_206B_200F_202A_206C_200B_206C_206C_202C_206A_200F_206F_206B_206A_206A_206D_206C_202A_206F_206D_206B_200B_200C_202D_206D_202E(step) == EInteractionType.Craft) ? 511987702 : 511987701);
|
||||
while (true)
|
||||
{
|
||||
return Array.Empty<ITask>();
|
||||
int num2 = num;
|
||||
int num3 = 511987703;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 1:
|
||||
_202D_200C_206B_202C_200D_200D_206B_206E_202A_202C_200B_202B_200D_206F_202C_206C_202B_200D_202C_200F_200C_202A_206C_200D_206E_206A_200B_202C_206E_202C_206C_206D_200B_206A_206F_206A_206F_200F_202C_206E_202E((object)_200E_206A_202C_200E_202B_200B_202A_200D_206D_200E_206F_200B_202E_200F_202A_200B_202B_206B_202D_200F_202B_206C_200B_202A_206B_200F_206A_202D_202A_206A_202C_206D_200E_202A_200F_202B_206E_200C_202E_200F_202E(step), 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>(-1496371967));
|
||||
_202D_200C_206B_202C_200D_200D_206B_206E_202A_202C_200B_202B_200D_206F_202C_206C_202B_200D_202C_200F_200C_202A_206C_200D_206E_206A_200B_202C_206E_202C_206C_206D_200B_206A_206F_206A_206F_200F_202C_206E_202E((object)_202C_206E_202A_202D_200E_202E_200E_206D_206E_206F_200D_200C_202C_200E_202E_200D_206A_202E_200D_202B_202D_206C_206E_202B_200F_206B_206B_202C_200F_202C_200E_200D_206D_206C_202E_206E_202B_200F_206E_206D_202E(step), 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>(98690158));
|
||||
return new global::_003C_003Ez__ReadOnlyArray<ITask>(new ITask[2]
|
||||
{
|
||||
new Questionable.Controller.Steps.Common.Mount.UnmountTask(),
|
||||
new CraftTask(_200E_206A_202C_200E_202B_200B_202A_200D_206D_200E_206F_200B_202E_200F_202A_200B_202B_206B_202D_200F_202B_206C_200B_202A_206B_200F_206A_202D_202A_206A_202C_206D_200E_202A_200F_202B_206E_200C_202E_200F_202E(step).Value, _202C_206E_202A_202D_200E_202E_200E_206D_206E_206F_200D_200C_202C_200E_202E_200D_206A_202E_200D_202B_202D_206C_206E_202B_200F_206B_206B_202C_200F_202C_200E_200D_206D_206C_202E_206E_202B_200F_206E_206D_202E(step).Value, _202A_206E_200B_206A_202C_206D_206E_206F_206C_200B_200F_206E_206D_202E_206E_200D_202A_202A_206E_202E_206B_202C_200B_200D_200C_206D_202D_202C_200C_206A_206E_206C_200E_206C_202A_200F_200D_202E_206D_200E_202E(step) == true)
|
||||
});
|
||||
case 2:
|
||||
return Array.Empty<ITask>();
|
||||
case 0:
|
||||
goto IL_00ce;
|
||||
}
|
||||
continue;
|
||||
IL_00ce:
|
||||
num = 511987701;
|
||||
}
|
||||
ArgumentNullException.ThrowIfNull(step.ItemId, "step.ItemId");
|
||||
ArgumentNullException.ThrowIfNull(step.ItemCount, "step.ItemCount");
|
||||
return new global::_003C_003Ez__ReadOnlyArray<ITask>(new ITask[2]
|
||||
{
|
||||
new Questionable.Controller.Steps.Common.Mount.UnmountTask(),
|
||||
new CraftTask(step.ItemId.Value, step.ItemCount.Value, step.RequireHq == true)
|
||||
});
|
||||
}
|
||||
|
||||
IEnumerable<ITask> ITaskFactory.CreateAllTasks(Questionable.Model.Quest quest, QuestSequence sequence, QuestStep step)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in CreateAllTasks
|
||||
return this.CreateAllTasks(quest, sequence, step);
|
||||
}
|
||||
|
||||
static EInteractionType _206A_202B_202D_206A_206B_200B_202A_202A_206B_202D_206A_206A_206C_206D_206A_200C_206B_200F_202A_206C_200B_206C_206C_202C_206A_200F_206F_206B_206A_206A_206D_206C_202A_206F_206D_206B_200B_200C_202D_206D_202E(QuestStep P_0)
|
||||
{
|
||||
return P_0.InteractionType;
|
||||
}
|
||||
|
||||
static uint? _200E_206A_202C_200E_202B_200B_202A_200D_206D_200E_206F_200B_202E_200F_202A_200B_202B_206B_202D_200F_202B_206C_200B_202A_206B_200F_206A_202D_202A_206A_202C_206D_200E_202A_200F_202B_206E_200C_202E_200F_202E(QuestStep P_0)
|
||||
{
|
||||
return P_0.ItemId;
|
||||
}
|
||||
|
||||
static void _202D_200C_206B_202C_200D_200D_206B_206E_202A_202C_200B_202B_200D_206F_202C_206C_202B_200D_202C_200F_200C_202A_206C_200D_206E_206A_200B_202C_206E_202C_206C_206D_200B_206A_206F_206A_206F_200F_202C_206E_202E(object P_0, string P_1)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(P_0, P_1);
|
||||
}
|
||||
|
||||
static int? _202C_206E_202A_202D_200E_202E_200E_206D_206E_206F_200D_200C_202C_200E_202E_200D_206A_202E_200D_202B_202D_206C_206E_202B_200F_206B_206B_202C_200F_202C_200E_200D_206D_206C_202E_206E_202B_200F_206E_206D_202E(QuestStep P_0)
|
||||
{
|
||||
return P_0.ItemCount;
|
||||
}
|
||||
|
||||
static bool? _202A_206E_200B_206A_202C_206D_206E_206F_206C_200B_200F_206E_206D_202E_206E_200D_202A_202A_206E_202E_206B_202C_200B_200D_200C_206D_202D_202C_200C_206A_206E_206C_200E_206C_202A_200F_200D_202E_206D_200E_202E(QuestStep P_0)
|
||||
{
|
||||
return P_0.RequireHq;
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed record CraftTask(uint ItemId, int ItemCount, bool RequireHq) : ITask
|
||||
{
|
||||
[CompilerGenerated]
|
||||
private Type EqualityContract
|
||||
{
|
||||
[CompilerGenerated]
|
||||
get
|
||||
{
|
||||
return _202D_200C_200D_202D_202E_206F_206E_202D_206C_206F_200C_202A_200F_200D_200B_200C_206D_206B_200E_202A_206F_202A_206C_200B_200E_202A_202D_202D_200F_200E_202A_206F_206B_206A_200B_206C_202D_200E_202C_200E_202E(typeof(CraftTask).TypeHandle);
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public override string ToString()
|
||||
{
|
||||
return $"Craft {ItemCount}x {ItemId}{(RequireHq ? " (HQ)" : "")} (with Artisan)";
|
||||
DefaultInterpolatedStringHandler defaultInterpolatedStringHandler = new DefaultInterpolatedStringHandler(23, 3);
|
||||
defaultInterpolatedStringHandler.AppendLiteral(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>(-1781620549));
|
||||
defaultInterpolatedStringHandler.AppendFormatted(ItemCount);
|
||||
defaultInterpolatedStringHandler.AppendLiteral(global::_003CModule_003E._202E_206C_200F_206B_206A_202A_202C_206F_200C_206C_202B_206B_206D_206D_206D_202D_206E_202E_206C_206E_206D_202C_206F_200D_202D_202E_206A_206D_202A_206A_202B_200D_200C_206D_202B_200B_200D_200C_206E_206B_202E<string>(350814621));
|
||||
defaultInterpolatedStringHandler.AppendFormatted(ItemId);
|
||||
defaultInterpolatedStringHandler.AppendFormatted(RequireHq ? 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>(-6445935) : 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>(-1720149641));
|
||||
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>(-1276730098));
|
||||
return defaultInterpolatedStringHandler.ToStringAndClear();
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
private bool PrintMembers(StringBuilder builder)
|
||||
{
|
||||
_206D_206E_206C_200D_200B_200B_206A_200C_202B_202D_206B_200F_206D_206A_202B_200C_206C_202B_206F_206C_206B_200D_200B_202B_202D_202C_202E_206D_200F_206A_206F_202C_200E_202C_206B_200E_202E_206E_206F_202B_202E();
|
||||
_206A_200B_202B_200E_206F_202B_202D_202E_206C_202B_206C_200B_200D_202B_202E_206F_206F_202A_206A_206A_200C_206A_202C_200F_202D_200D_200B_206B_200F_206E_200E_206C_202C_206C_206F_202B_200C_202C_202E_206D_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));
|
||||
_206A_200B_202B_200E_206F_202B_202D_202E_206C_202B_206C_200B_200D_202B_202E_206F_206F_202A_206A_206A_200C_206A_202C_200F_202D_200D_200B_206B_200F_206E_200E_206C_202C_206C_206F_202B_200C_202C_202E_206D_202E(builder, ItemId.ToString());
|
||||
_206A_200B_202B_200E_206F_202B_202D_202E_206C_202B_206C_200B_200D_202B_202E_206F_206F_202A_206A_206A_200C_206A_202C_200F_202D_200D_200B_206B_200F_206E_200E_206C_202C_206C_206F_202B_200C_202C_202E_206D_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>(-503598644));
|
||||
_206A_200B_202B_200E_206F_202B_202D_202E_206C_202B_206C_200B_200D_202B_202E_206F_206F_202A_206A_206A_200C_206A_202C_200F_202D_200D_200B_206B_200F_206E_200E_206C_202C_206C_206F_202B_200C_202C_202E_206D_202E(builder, ItemCount.ToString());
|
||||
_206A_200B_202B_200E_206F_202B_202D_202E_206C_202B_206C_200B_200D_202B_202E_206F_206F_202A_206A_206A_200C_206A_202C_200F_202D_200D_200B_206B_200F_206E_200E_206C_202C_206C_206F_202B_200C_202C_202E_206D_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>(1102929611));
|
||||
_206A_200B_202B_200E_206F_202B_202D_202E_206C_202B_206C_200B_200D_202B_202E_206F_206F_202A_206A_206A_200C_206A_202C_200F_202D_200D_200B_206B_200F_206E_200E_206C_202C_206C_206F_202B_200C_202C_202E_206D_202E(builder, RequireHq.ToString());
|
||||
return true;
|
||||
}
|
||||
|
||||
[CompilerGenerated]
|
||||
public bool Equals(CraftTask? other)
|
||||
{
|
||||
int num = (((object)this == other) ? 528344161 : 528344167);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 528344166;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 6:
|
||||
num = 528344167;
|
||||
break;
|
||||
case 5:
|
||||
num = ((!EqualityComparer<uint>.Default.Equals(ItemId, other.ItemId)) ? 528344166 : 528344162);
|
||||
break;
|
||||
case 4:
|
||||
num = ((!EqualityComparer<int>.Default.Equals(ItemCount, other.ItemCount)) ? 528344166 : 528344165);
|
||||
break;
|
||||
case 7:
|
||||
return true;
|
||||
case 1:
|
||||
num = (((object)other == null) ? 528344166 : 528344164);
|
||||
break;
|
||||
case 2:
|
||||
num = ((!_206D_200F_206B_200C_206B_202E_206F_202E_202D_200F_200C_206F_206B_200C_206D_200B_202C_206A_206F_200C_200F_200F_200D_202E_202E_202B_206A_202E_200F_202B_200F_202A_200D_206D_202A_206D_206D_202A_206A_202E(EqualityContract, other.EqualityContract)) ? 528344166 : 528344163);
|
||||
break;
|
||||
case 0:
|
||||
return false;
|
||||
case 3:
|
||||
return EqualityComparer<bool>.Default.Equals(RequireHq, other.RequireHq);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool IEquatable<CraftTask>.Equals(CraftTask? other)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in Equals
|
||||
return this.Equals(other);
|
||||
}
|
||||
|
||||
static Type _202D_200C_200D_202D_202E_206F_206E_202D_206C_206F_200C_202A_200F_200D_200B_200C_206D_206B_200E_202A_206F_202A_206C_200B_200E_202A_202D_202D_200F_200E_202A_206F_206B_206A_200B_206C_202D_200E_202C_200E_202E(RuntimeTypeHandle P_0)
|
||||
{
|
||||
return Type.GetTypeFromHandle(P_0);
|
||||
}
|
||||
|
||||
static void _206D_206E_206C_200D_200B_200B_206A_200C_202B_202D_206B_200F_206D_206A_202B_200C_206C_202B_206F_206C_206B_200D_200B_202B_202D_202C_202E_206D_200F_206A_206F_202C_200E_202C_206B_200E_202E_206E_206F_202B_202E()
|
||||
{
|
||||
RuntimeHelpers.EnsureSufficientExecutionStack();
|
||||
}
|
||||
|
||||
static StringBuilder _206A_200B_202B_200E_206F_202B_202D_202E_206C_202B_206C_200B_200D_202B_202E_206F_206F_202A_206A_206A_200C_206A_202C_200F_202D_200D_200B_206B_200F_206E_200E_206C_202C_206C_206F_202B_200C_202C_202E_206D_202E(StringBuilder P_0, string P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static bool _206D_200F_206B_200C_206B_202E_206F_202E_202D_200F_200C_206F_206B_200C_206D_200B_202C_206A_206F_200C_200F_200F_200D_202E_202E_202B_206A_202E_200F_202B_200F_202A_200D_206D_202A_206D_206D_202A_206A_202E(Type P_0, Type P_1)
|
||||
{
|
||||
return P_0 == P_1;
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class DoCraft(IDataManager dataManager, IObjectTable objectTable, ArtisanIpc artisanIpc, ILogger<DoCraft> logger) : TaskExecutor<CraftTask>()
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
protected override bool Start()
|
||||
{
|
||||
if (HasRequestedItems())
|
||||
int num = ((!HasRequestedItems()) ? (-227279258) : (-227279244));
|
||||
uint num8 = default(uint);
|
||||
RecipeLookup? rowOrDefault = default(RecipeLookup?);
|
||||
uint num7 = default(uint);
|
||||
uint? num9 = default(uint?);
|
||||
EClassJob? eClassJob = default(EClassJob?);
|
||||
while (true)
|
||||
{
|
||||
logger.LogInformation("Already own {ItemCount}x {ItemId}{HqSuffix}", base.Task.ItemCount, base.Task.ItemId, base.Task.RequireHq ? " (HQ)" : "");
|
||||
return false;
|
||||
}
|
||||
RecipeLookup? rowOrDefault = dataManager.GetExcelSheet<RecipeLookup>().GetRowOrDefault(base.Task.ItemId);
|
||||
if (!rowOrDefault.HasValue)
|
||||
{
|
||||
throw new TaskException($"Item {base.Task.ItemId} is not craftable");
|
||||
}
|
||||
uint num = (EClassJob?)(objectTable[0] as ICharacter)?.ClassJob.RowId switch
|
||||
{
|
||||
EClassJob.Carpenter => rowOrDefault.Value.CRP.RowId,
|
||||
EClassJob.Blacksmith => rowOrDefault.Value.BSM.RowId,
|
||||
EClassJob.Armorer => rowOrDefault.Value.ARM.RowId,
|
||||
EClassJob.Goldsmith => rowOrDefault.Value.GSM.RowId,
|
||||
EClassJob.Leatherworker => rowOrDefault.Value.LTW.RowId,
|
||||
EClassJob.Weaver => rowOrDefault.Value.WVR.RowId,
|
||||
EClassJob.Alchemist => rowOrDefault.Value.ALC.RowId,
|
||||
EClassJob.Culinarian => rowOrDefault.Value.CUL.RowId,
|
||||
_ => 0u,
|
||||
};
|
||||
if (num == 0)
|
||||
{
|
||||
num = new uint[8]
|
||||
int num2 = num;
|
||||
int num3 = -227279260;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
EClassJob? obj;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
rowOrDefault.Value.CRP.RowId,
|
||||
rowOrDefault.Value.BSM.RowId,
|
||||
rowOrDefault.Value.ARM.RowId,
|
||||
rowOrDefault.Value.GSM.RowId,
|
||||
rowOrDefault.Value.LTW.RowId,
|
||||
rowOrDefault.Value.WVR.RowId,
|
||||
rowOrDefault.Value.ALC.RowId,
|
||||
rowOrDefault.Value.WVR.RowId
|
||||
}.FirstOrDefault((uint x) => x != 0);
|
||||
}
|
||||
if (num == 0)
|
||||
{
|
||||
throw new TaskException($"Unable to determine recipe for item {base.Task.ItemId}");
|
||||
}
|
||||
int num2 = base.Task.ItemCount - GetOwnedItemCount();
|
||||
logger.LogInformation("Starting craft for item {ItemId} with recipe {RecipeId} for {RemainingItemCount} items{HqSuffix}", base.Task.ItemId, num, num2, base.Task.RequireHq ? " (HQ required)" : "");
|
||||
if (!artisanIpc.CraftItem((ushort)num, num2))
|
||||
{
|
||||
throw new TaskException($"Failed to start Artisan craft for recipe {num}");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public unsafe override ETaskResult Update()
|
||||
{
|
||||
if (HasRequestedItems() && !artisanIpc.IsCrafting())
|
||||
{
|
||||
AgentRecipeNote* ptr = AgentRecipeNote.Instance();
|
||||
if (ptr != null && ptr->IsAgentActive())
|
||||
case 7:
|
||||
num8 = rowOrDefault.Value.CUL.RowId;
|
||||
num = -227279248;
|
||||
break;
|
||||
case 13:
|
||||
num8 = 0u;
|
||||
num = -227279248;
|
||||
break;
|
||||
case 18:
|
||||
num = ((num7 != 0) ? (-227279246) : (-227279252));
|
||||
break;
|
||||
case 8:
|
||||
{
|
||||
uint addonId = ptr->GetAddonId();
|
||||
if (addonId == 0)
|
||||
DefaultInterpolatedStringHandler defaultInterpolatedStringHandler = new DefaultInterpolatedStringHandler(36, 1);
|
||||
defaultInterpolatedStringHandler.AppendLiteral(global::_003CModule_003E._206C_202A_206D_206A_206E_202A_202B_206F_206D_200F_202D_200F_202D_206A_202C_202B_206D_206A_200E_200E_202D_202D_200D_200C_200D_200D_206D_206E_202A_200F_206E_206C_206D_206A_206D_202B_200F_200D_206E_200C_202E<string>(-1859404714));
|
||||
defaultInterpolatedStringHandler.AppendFormatted(base.Task.ItemId);
|
||||
throw new TaskException(defaultInterpolatedStringHandler.ToStringAndClear());
|
||||
}
|
||||
case 11:
|
||||
num = -227279244;
|
||||
break;
|
||||
case 16:
|
||||
_202B_206D_206C_202D_202E_200D_202E_202D_206D_200E_206A_202E_200C_206A_206D_206F_206C_206B_206C_206B_200D_200E_200F_206F_206D_200D_200E_202C_200F_206E_206E_202A_200C_206D_202E_200C_202E_206F_206E_206A_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>(-695579807), new object[3]
|
||||
{
|
||||
return ETaskResult.StillRunning;
|
||||
}
|
||||
AtkUnitBase* addonById = AtkStage.Instance()->RaptureAtkUnitManager->GetAddonById((ushort)addonId);
|
||||
if (addonById != null)
|
||||
base.Task.ItemCount,
|
||||
base.Task.ItemId,
|
||||
base.Task.RequireHq ? 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>(-6445935) : 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>(-1694032531)
|
||||
});
|
||||
return false;
|
||||
case 17:
|
||||
goto IL_01b2;
|
||||
case 19:
|
||||
{
|
||||
DefaultInterpolatedStringHandler defaultInterpolatedStringHandler3 = new DefaultInterpolatedStringHandler(41, 1);
|
||||
defaultInterpolatedStringHandler3.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>(-1243369350));
|
||||
defaultInterpolatedStringHandler3.AppendFormatted(num7);
|
||||
throw new TaskException(defaultInterpolatedStringHandler3.ToStringAndClear());
|
||||
}
|
||||
case 3:
|
||||
goto IL_0209;
|
||||
case 9:
|
||||
goto IL_0230;
|
||||
case 1:
|
||||
goto IL_0257;
|
||||
case 15:
|
||||
return true;
|
||||
case 20:
|
||||
num7 = num8;
|
||||
num = ((num7 != 0) ? (-227279242) : (-227279256));
|
||||
break;
|
||||
case 14:
|
||||
goto IL_02a1;
|
||||
case 22:
|
||||
{
|
||||
int num10 = base.Task.ItemCount - GetOwnedItemCount();
|
||||
_202B_206D_206C_202D_202E_200D_202E_202D_206D_200E_206A_202E_200C_206A_206D_206F_206C_206B_206C_206B_200D_200E_200F_206F_206D_200D_200E_202C_200F_206E_206E_202A_200C_206D_202E_200C_202E_206F_206E_206A_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>(1999201105), new object[4]
|
||||
{
|
||||
logger.LogInformation("Closing crafting window");
|
||||
addonById->FireCallbackInt(-1);
|
||||
return ETaskResult.TaskComplete;
|
||||
base.Task.ItemId,
|
||||
num7,
|
||||
num10,
|
||||
base.Task.RequireHq ? 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>(-495381767) : 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>(-87324410)
|
||||
});
|
||||
num = (artisanIpc.CraftItem((ushort)num7, num10) ? (-227279253) : (-227279241));
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
rowOrDefault = dataManager.GetExcelSheet<RecipeLookup>().GetRowOrDefault(base.Task.ItemId);
|
||||
num = (rowOrDefault.HasValue ? (-227279236) : (-227279264));
|
||||
break;
|
||||
case 0:
|
||||
goto IL_03bc;
|
||||
case 23:
|
||||
num = -227279255;
|
||||
break;
|
||||
case 4:
|
||||
{
|
||||
DefaultInterpolatedStringHandler defaultInterpolatedStringHandler2 = new DefaultInterpolatedStringHandler(22, 1);
|
||||
defaultInterpolatedStringHandler2.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>(335057319));
|
||||
defaultInterpolatedStringHandler2.AppendFormatted(base.Task.ItemId);
|
||||
defaultInterpolatedStringHandler2.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>(-37094116));
|
||||
throw new TaskException(defaultInterpolatedStringHandler2.ToStringAndClear());
|
||||
}
|
||||
case 24:
|
||||
{
|
||||
IPlayerCharacter playerCharacter = _200F_202D_206E_206B_206B_206E_200B_206C_206D_206D_206E_202C_206A_202D_206C_200F_206A_200B_200E_206D_206E_202C_202C_202C_206A_206E_202B_200F_206A_206F_206D_202E_202A_206F_206B_206F_206D_200F_202B_202E_202E(objectTable);
|
||||
num9 = ((playerCharacter != null) ? new uint?(_202D_206F_202B_200D_200B_202C_206F_202D_206E_200F_200E_202D_206D_206E_202D_200E_200F_206D_202D_202C_202A_200C_206C_200D_200D_200F_202A_206A_202C_202A_202C_200E_202D_200D_202D_200F_206F_206D_206E_202B_202E((ICharacter)playerCharacter).RowId) : ((uint?)null));
|
||||
num = (num9.HasValue ? (-227279250) : (-227279263));
|
||||
break;
|
||||
}
|
||||
case 5:
|
||||
obj = null;
|
||||
goto IL_04bb;
|
||||
case 10:
|
||||
obj = (EClassJob)num9.GetValueOrDefault();
|
||||
goto IL_04bb;
|
||||
case 21:
|
||||
goto IL_04e1;
|
||||
case 6:
|
||||
switch (eClassJob.GetValueOrDefault())
|
||||
{
|
||||
case EClassJob.Culinarian:
|
||||
break;
|
||||
case EClassJob.Armorer:
|
||||
goto IL_01b2;
|
||||
case EClassJob.Leatherworker:
|
||||
goto IL_0209;
|
||||
case EClassJob.Weaver:
|
||||
goto IL_0230;
|
||||
case EClassJob.Carpenter:
|
||||
goto IL_0257;
|
||||
case EClassJob.Blacksmith:
|
||||
goto IL_02a1;
|
||||
case EClassJob.Goldsmith:
|
||||
goto IL_03bc;
|
||||
case EClassJob.Alchemist:
|
||||
goto IL_04e1;
|
||||
default:
|
||||
goto IL_053a;
|
||||
}
|
||||
goto case 7;
|
||||
case 12:
|
||||
{
|
||||
num7 = new uint[8]
|
||||
{
|
||||
rowOrDefault.Value.CRP.RowId,
|
||||
rowOrDefault.Value.BSM.RowId,
|
||||
rowOrDefault.Value.ARM.RowId,
|
||||
rowOrDefault.Value.GSM.RowId,
|
||||
rowOrDefault.Value.LTW.RowId,
|
||||
rowOrDefault.Value.WVR.RowId,
|
||||
rowOrDefault.Value.ALC.RowId,
|
||||
rowOrDefault.Value.CUL.RowId
|
||||
}.FirstOrDefault((uint x) => x != 0);
|
||||
num = -227279242;
|
||||
break;
|
||||
}
|
||||
IL_053a:
|
||||
num = -227279245;
|
||||
break;
|
||||
IL_04e1:
|
||||
num8 = rowOrDefault.Value.ALC.RowId;
|
||||
num = -227279248;
|
||||
break;
|
||||
IL_04bb:
|
||||
eClassJob = obj;
|
||||
num = ((!eClassJob.HasValue) ? (-227279255) : (-227279262));
|
||||
break;
|
||||
IL_02a1:
|
||||
num8 = rowOrDefault.Value.BSM.RowId;
|
||||
num = -227279248;
|
||||
break;
|
||||
IL_0257:
|
||||
num8 = rowOrDefault.Value.CRP.RowId;
|
||||
num = -227279248;
|
||||
break;
|
||||
IL_0230:
|
||||
num8 = rowOrDefault.Value.WVR.RowId;
|
||||
num = -227279248;
|
||||
break;
|
||||
IL_03bc:
|
||||
num8 = rowOrDefault.Value.GSM.RowId;
|
||||
num = -227279248;
|
||||
break;
|
||||
IL_0209:
|
||||
num8 = rowOrDefault.Value.LTW.RowId;
|
||||
num = -227279248;
|
||||
break;
|
||||
IL_01b2:
|
||||
num8 = rowOrDefault.Value.ARM.RowId;
|
||||
num = -227279248;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe override ETaskResult Update()
|
||||
{
|
||||
int num = (artisanIpc.IsCrafting() ? (-1658987480) : (-1658987481));
|
||||
uint addonId = default(uint);
|
||||
AgentRecipeNote* ptr = default(AgentRecipeNote*);
|
||||
AtkUnitBase* addonById = default(AtkUnitBase*);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1658987473;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 5:
|
||||
num = -1658987481;
|
||||
break;
|
||||
case 4:
|
||||
addonId = ptr->GetAddonId();
|
||||
num = ((addonId != 0) ? (-1658987476) : (-1658987473));
|
||||
break;
|
||||
case 3:
|
||||
addonById = AtkStage.Instance()->RaptureAtkUnitManager->GetAddonById((ushort)addonId);
|
||||
num = ((addonById == null) ? (-1658987480) : (-1658987479));
|
||||
break;
|
||||
case 0:
|
||||
return ETaskResult.StillRunning;
|
||||
case 8:
|
||||
num = ((!HasRequestedItems()) ? (-1658987475) : (-1658987474));
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
int ownedItemCount = GetOwnedItemCount();
|
||||
_206F_200B_206F_200D_202B_202A_206C_200C_202D_202B_200F_206D_206A_206E_200D_206B_206E_202D_202C_206C_202C_206D_206C_202E_200E_202B_206B_206A_206D_200D_202B_200D_200C_206D_202E_206D_206E_202E_202A_200C_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>(-1100170255), new object[3]
|
||||
{
|
||||
ownedItemCount,
|
||||
base.Task.ItemCount,
|
||||
base.Task.ItemId
|
||||
});
|
||||
DefaultInterpolatedStringHandler defaultInterpolatedStringHandler = new DefaultInterpolatedStringHandler(52, 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>(-1173795697));
|
||||
defaultInterpolatedStringHandler.AppendFormatted(ownedItemCount);
|
||||
defaultInterpolatedStringHandler.AppendLiteral(global::_003CModule_003E._202E_206C_200F_206B_206A_202A_202C_206F_200C_206C_202B_206B_206D_206D_206D_202D_206E_202E_206C_206E_206D_202C_206F_200D_202D_202E_206A_206D_202A_206A_202B_200D_200C_206D_202B_200B_200D_200C_206E_206B_202E<string>(-1680133376));
|
||||
defaultInterpolatedStringHandler.AppendFormatted(base.Task.ItemCount);
|
||||
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>(1889609828));
|
||||
throw new TaskException(defaultInterpolatedStringHandler.ToStringAndClear());
|
||||
}
|
||||
case 1:
|
||||
ptr = AgentRecipeNote.Instance();
|
||||
num = ((ptr == null) ? (-1658987480) : (-1658987482));
|
||||
break;
|
||||
case 6:
|
||||
_202B_206D_206C_202D_202E_200D_202E_202D_206D_200E_206A_202E_200C_206A_206D_206F_206C_206B_206C_206B_200D_200E_200F_206F_206D_200D_200E_202C_200F_206E_206E_202A_200C_206D_202E_200C_202E_206F_206E_206A_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>(1809407100), Array.Empty<object>());
|
||||
addonById->FireCallbackInt(-1);
|
||||
return ETaskResult.TaskComplete;
|
||||
case 9:
|
||||
num = ((!ptr->IsAgentActive()) ? (-1658987480) : (-1658987477));
|
||||
break;
|
||||
case 7:
|
||||
return ETaskResult.StillRunning;
|
||||
}
|
||||
}
|
||||
return ETaskResult.StillRunning;
|
||||
}
|
||||
|
||||
private bool HasRequestedItems()
|
||||
|
|
@ -126,24 +455,88 @@ internal static class Craft
|
|||
return GetOwnedItemCount() >= base.Task.ItemCount;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
private unsafe int GetOwnedItemCount()
|
||||
{
|
||||
InventoryManager* ptr = InventoryManager.Instance();
|
||||
if (base.Task.RequireHq)
|
||||
int num = ((!base.Task.RequireHq) ? (-130787652) : (-130787651));
|
||||
while (true)
|
||||
{
|
||||
int inventoryItemCount = ptr->GetInventoryItemCount(base.Task.ItemId, isHq: true, checkEquipped: false, checkArmory: true, 0);
|
||||
logger.LogTrace("HQ item count for {ItemId}: {Count}", base.Task.ItemId, inventoryItemCount);
|
||||
return inventoryItemCount;
|
||||
int num2 = num;
|
||||
int num3 = -130787652;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 2:
|
||||
goto IL_005a;
|
||||
case 1:
|
||||
{
|
||||
int inventoryItemCount3 = ptr->GetInventoryItemCount(base.Task.ItemId, isHq: true, checkEquipped: false, checkArmory: true, 0);
|
||||
_206A_202B_206B_206B_202B_206B_200F_200D_206F_200E_206D_200F_206F_200B_206A_200F_206D_200D_200E_202B_202A_206E_200F_206A_206C_206B_206A_200D_202D_206D_200D_202D_202C_202C_200F_202E_200C_206E_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>(-961372782), new object[2]
|
||||
{
|
||||
base.Task.ItemId,
|
||||
inventoryItemCount3
|
||||
});
|
||||
return inventoryItemCount3;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
int inventoryItemCount = ptr->GetInventoryItemCount(base.Task.ItemId, isHq: false, checkEquipped: false, checkArmory: true, 0);
|
||||
int inventoryItemCount2 = ptr->GetInventoryItemCount(base.Task.ItemId, isHq: true, checkEquipped: false, checkArmory: true, 0);
|
||||
ILogger<DoCraft> logger = logger;
|
||||
string text = 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>(-1941678534);
|
||||
object[] obj = new object[4]
|
||||
{
|
||||
base.Task.ItemId,
|
||||
inventoryItemCount,
|
||||
inventoryItemCount2,
|
||||
null
|
||||
};
|
||||
num3 = inventoryItemCount2;
|
||||
num4 = inventoryItemCount;
|
||||
obj[3] = (num4 | num3) + (num4 & num3);
|
||||
_206A_202B_206B_206B_202B_206B_200F_200D_206F_200E_206D_200F_206F_200B_206A_200F_206D_200D_200E_202B_202A_206E_200F_206A_206C_206B_206A_200D_202D_206D_200D_202D_202C_202C_200F_202E_200C_206E_206E_202E((ILogger)logger, text, obj);
|
||||
num3 = inventoryItemCount2;
|
||||
num4 = inventoryItemCount;
|
||||
int num5 = num4 ^ num3;
|
||||
int num6 = num4 & num3;
|
||||
return num5 + (num6 + num6);
|
||||
}
|
||||
}
|
||||
continue;
|
||||
IL_005a:
|
||||
num = -130787651;
|
||||
}
|
||||
int inventoryItemCount2 = ptr->GetInventoryItemCount(base.Task.ItemId, isHq: false, checkEquipped: false, checkArmory: true, 0);
|
||||
int inventoryItemCount3 = ptr->GetInventoryItemCount(base.Task.ItemId, isHq: true, checkEquipped: false, checkArmory: true, 0);
|
||||
logger.LogTrace("Total item count for {ItemId}: {NqCount} NQ + {HqCount} HQ = {Total}", base.Task.ItemId, inventoryItemCount2, inventoryItemCount3, inventoryItemCount2 + inventoryItemCount3);
|
||||
return inventoryItemCount2 + inventoryItemCount3;
|
||||
}
|
||||
|
||||
public override bool ShouldInterruptOnDamage()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static void _202B_206D_206C_202D_202E_200D_202E_202D_206D_200E_206A_202E_200C_206A_206D_206F_206C_206B_206C_206B_200D_200E_200F_206F_206D_200D_200E_202C_200F_206E_206E_202A_200C_206D_202E_200C_202E_206F_206E_206A_202E(ILogger P_0, string P_1, object[] P_2)
|
||||
{
|
||||
P_0.LogDebug(P_1, P_2);
|
||||
}
|
||||
|
||||
static IPlayerCharacter _200F_202D_206E_206B_206B_206E_200B_206C_206D_206D_206E_202C_206A_202D_206C_200F_206A_200B_200E_206D_206E_202C_202C_202C_206A_206E_202B_200F_206A_206F_206D_202E_202A_206F_206B_206F_206D_200F_202B_202E_202E(IObjectTable P_0)
|
||||
{
|
||||
return P_0.LocalPlayer;
|
||||
}
|
||||
|
||||
static RowRef<ClassJob> _202D_206F_202B_200D_200B_202C_206F_202D_206E_200F_200E_202D_206D_206E_202D_200E_200F_206D_202D_202C_202A_200C_206C_200D_200D_200F_202A_206A_202C_202A_202C_200E_202D_200D_202D_200F_206F_206D_206E_202B_202E(ICharacter P_0)
|
||||
{
|
||||
return P_0.ClassJob;
|
||||
}
|
||||
|
||||
static void _206F_200B_206F_200D_202B_202A_206C_200C_202D_202B_200F_206D_206A_206E_200D_206B_206E_202D_202C_206C_202C_206D_206C_202E_200E_202B_206B_206A_206D_200D_202B_200D_200C_206D_202E_206D_206E_202E_202A_200C_202E(ILogger P_0, string P_1, object[] P_2)
|
||||
{
|
||||
P_0.LogError(P_1, P_2);
|
||||
}
|
||||
|
||||
static void _206A_202B_206B_206B_202B_206B_200F_200D_206F_200E_206D_200F_206F_200B_206A_200F_206D_200D_200E_202B_202A_206E_200F_206A_206C_206B_206A_200D_202D_206D_200D_202D_202C_202C_200F_202E_200C_206E_206E_202E(ILogger P_0, string P_1, object[] P_2)
|
||||
{
|
||||
P_0.LogTrace(P_1, P_2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue