forked from aly/qstbak
106 lines
6.3 KiB
C#
106 lines
6.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Runtime.CompilerServices;
|
|
using Dalamud.Plugin.Services;
|
|
using Questionable.Functions;
|
|
|
|
namespace Questionable.Controller.DebugCommands;
|
|
|
|
internal sealed class UnlockLinksCommandHandler : IDebugCommandHandler
|
|
{
|
|
private readonly GameFunctions _gameFunctions;
|
|
|
|
private readonly IChatGui _chatGui;
|
|
|
|
private IReadOnlyList<uint> _previouslyUnlockedUnlockLinks = Array.Empty<uint>();
|
|
|
|
public string CommandName
|
|
{
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
get
|
|
{
|
|
return 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>(1519844067);
|
|
}
|
|
}
|
|
|
|
public UnlockLinksCommandHandler(GameFunctions gameFunctions, IChatGui chatGui)
|
|
{
|
|
_gameFunctions = gameFunctions;
|
|
_chatGui = chatGui;
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.NoInlining)]
|
|
public void Execute(string[] arguments)
|
|
{
|
|
IReadOnlyList<uint> unlockLinks = _gameFunctions.GetUnlockLinks();
|
|
int num = ((unlockLinks.Count < 0) ? (-529327854) : (-529327856));
|
|
List<uint> list = default(List<uint>);
|
|
while (true)
|
|
{
|
|
int num2 = num;
|
|
int num3 = -529327853;
|
|
int num4 = num2;
|
|
int num5 = num4 + num3;
|
|
int num6 = num4 & num3;
|
|
switch (num5 - (num6 + num6))
|
|
{
|
|
case 2:
|
|
num = -529327856;
|
|
break;
|
|
case 5:
|
|
_206B_202A_200C_200E_202B_206D_202D_206A_202C_200F_206B_206D_206C_206A_206E_202C_206E_200B_202E_200C_202D_202A_206C_206B_206C_202A_202E_200C_202E_200E_206E_206D_202A_200E_206D_200D_206D_202D_202B_206B_202E(_chatGui, _206A_200D_200D_202A_202A_200B_200C_206E_200D_200F_200D_202A_202C_206A_206F_200B_206F_200D_200D_206F_200B_206A_200F_202C_200E_202C_206A_202E_206E_200D_200C_200B_206B_202A_202B_200C_202E_202C_200D_206B_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>(1421488541), string.Join(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>(-1095822044), list)), 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>(-1179749275), (ushort?)(ushort)576);
|
|
num = -529327849;
|
|
break;
|
|
case 4:
|
|
_previouslyUnlockedUnlockLinks = unlockLinks;
|
|
return;
|
|
case 1:
|
|
_206B_202A_200F_200D_200B_200B_202E_200D_202D_200C_202A_206B_206B_202A_206F_200B_202A_202E_200D_200E_202D_206C_200F_206C_206B_202B_206A_202E_206A_202C_200B_206D_202D_200C_206A_200F_202C_206A_206E_202B_202E(_chatGui, 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>(929710911), 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>(-1179749275), (ushort?)(ushort)576);
|
|
num = -529327849;
|
|
break;
|
|
case 0:
|
|
num = ((list.Count <= 0) ? (-529327849) : (-529327850));
|
|
break;
|
|
case 3:
|
|
{
|
|
IChatGui chatGui = _chatGui;
|
|
DefaultInterpolatedStringHandler defaultInterpolatedStringHandler = new DefaultInterpolatedStringHandler(27, 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>(278706240));
|
|
defaultInterpolatedStringHandler.AppendFormatted(unlockLinks.Count);
|
|
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>(1528398919));
|
|
_206B_202A_200C_200E_202B_206D_202D_206A_202C_200F_206B_206D_206C_206A_206E_202C_206E_200B_202E_200C_202D_202A_206C_206B_206C_202A_202E_200C_202E_200E_206E_206D_202A_200E_206D_200D_206D_202D_202B_206B_202E(chatGui, defaultInterpolatedStringHandler.ToStringAndClear(), 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>(467221712), (ushort?)(ushort)576);
|
|
list = unlockLinks.Except(_previouslyUnlockedUnlockLinks).ToList();
|
|
num = ((_previouslyUnlockedUnlockLinks.Count <= 0) ? (-529327849) : (-529327853));
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
void IDebugCommandHandler.Execute(string[] arguments)
|
|
{
|
|
//ILSpy generated this explicit interface implementation from .override directive in Execute
|
|
this.Execute(arguments);
|
|
}
|
|
|
|
public void Reset()
|
|
{
|
|
_previouslyUnlockedUnlockLinks = Array.Empty<uint>();
|
|
}
|
|
|
|
static void _206B_202A_200C_200E_202B_206D_202D_206A_202C_200F_206B_206D_206C_206A_206E_202C_206E_200B_202E_200C_202D_202A_206C_206B_206C_202A_202E_200C_202E_200E_206E_206D_202A_200E_206D_200D_206D_202D_202B_206B_202E(IChatGui P_0, string P_1, string P_2, ushort? P_3)
|
|
{
|
|
P_0.Print(P_1, P_2, P_3);
|
|
}
|
|
|
|
static string _206A_200D_200D_202A_202A_200B_200C_206E_200D_200F_200D_202A_202C_206A_206F_200B_206F_200D_200D_206F_200B_206A_200F_202C_200E_202C_206A_202E_206E_200D_200C_200B_206B_202A_202B_200C_202E_202C_200D_206B_202E(string P_0, string P_1)
|
|
{
|
|
return P_0 + P_1;
|
|
}
|
|
|
|
static void _206B_202A_200F_200D_200B_200B_202E_200D_202D_200C_202A_206B_206B_202A_206F_200B_202A_202E_200D_200E_202D_206C_200F_206C_206B_202B_206A_202E_206A_202C_200B_206D_202D_200C_206A_200F_202C_206A_206E_202B_202E(IChatGui P_0, string P_1, string P_2, ushort? P_3)
|
|
{
|
|
P_0.PrintError(P_1, P_2, P_3);
|
|
}
|
|
}
|