muffin v7.5.11
This commit is contained in:
parent
addf2d530f
commit
3102923ce2
522 changed files with 41082 additions and 211592 deletions
Binary file not shown.
|
|
@ -3,8 +3,6 @@ using System.Collections.Generic;
|
|||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Security.Cryptography;
|
||||
using System.Threading;
|
||||
using Questionable.Model.IO;
|
||||
|
|
@ -18,129 +16,26 @@ internal static class AssemblyFateDefinitionLoader
|
|||
|
||||
internal static TimeSpan? DecodeDuration { get; private set; }
|
||||
|
||||
internal static Stream FateDefinitionSchema
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
get
|
||||
{
|
||||
return _206B_200B_202A_202A_200E_206D_200D_206B_202C_200B_200F_202D_202D_206D_200D_200B_202A_202B_200F_202D_202B_200E_206B_206D_202C_206E_206C_202C_206D_200C_202A_206E_200B_200C_202A_200E_206D_200D_200C_206B_202E(_206D_202B_206F_206C_200B_202C_206C_200D_200D_200D_206D_200E_202A_200D_202C_206F_200C_206B_202E_202B_202B_200B_202E_202E_202E_206D_202D_206C_202B_206A_202C_200E_202A_202A_206E_206B_206E_202C_200D_200D_202E(_200C_202A_202B_206F_206B_200B_202E_202C_206E_200E_206C_200C_200E_206D_206F_206B_200D_206B_206B_200C_200E_202B_202D_206B_206E_202A_202E_206C_206B_202C_200E_200C_206F_206C_206B_206C_206F_202E_206F_200D_202E(typeof(AssemblyFateDefinitionLoader).TypeHandle)), global::_003CModule_003E._206C_200E_206E_202D_200B_206B_200F_202E_206B_202C_200C_206B_202B_206E_202C_200C_200D_202D_206D_200F_206F_202E_206E_206B_202A_202C_206E_206B_206C_206D_200F_206F_202B_206A_200D_202D_200E_206A_202C_206A_202E<string>(657022072));
|
||||
}
|
||||
}
|
||||
internal static Stream FateDefinitionSchema => typeof(AssemblyFateDefinitionLoader).Assembly.GetManifestResourceStream("Questionable.FatePaths.FateDefinitionSchema");
|
||||
|
||||
internal static IReadOnlyDictionary<ushort, FateDefinition> GetDefinitions()
|
||||
{
|
||||
return Definitions.Value;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
private static IReadOnlyDictionary<ushort, FateDefinition> LoadDefinitions()
|
||||
{
|
||||
Stopwatch stopwatch = _200F_202C_206F_200F_202B_202D_200C_202A_202A_206E_202B_202D_206D_202B_200F_200F_206E_206A_200F_200E_202E_206A_206C_206E_206E_206E_202B_206B_200F_206B_206F_200B_206A_206C_202E_206F_202A_200C_206B_206D_202E();
|
||||
Stream stream = _206B_200B_202A_202A_200E_206D_200D_206B_202C_200B_200F_202D_202D_206D_200D_200B_202A_202B_200F_202D_202B_200E_206B_206D_202C_206E_206C_202C_206D_200C_202A_206E_200B_200C_202A_200E_206D_200D_200C_206B_202E(_206D_202B_206F_206C_200B_202C_206C_200D_200D_200D_206D_200E_202A_200D_202C_206F_200C_206B_202E_202B_202B_200B_202E_202E_202E_206D_202D_206C_202B_206A_202C_200E_202A_202A_206E_206B_206E_202C_200D_200D_202E(_200C_202A_202B_206F_206B_200B_202E_202C_206E_200E_206C_200C_200E_206D_206F_206B_200D_206B_206B_200C_200E_202B_202D_206B_206E_202A_202E_206C_206B_202C_200E_200C_206F_206C_206B_206C_206F_202E_206F_200D_202E(typeof(AssemblyFateDefinitionLoader).TypeHandle)), global::_003CModule_003E._206A_200C_202A_206F_206C_206A_202D_206C_206B_200E_200D_202D_200E_206B_202D_206F_206A_200B_202B_206B_200E_202E_206E_202E_206C_206A_200C_206F_206E_200B_202D_200F_206A_206A_200C_200B_200E_206B_202C_202E_202E<string>(1087605776));
|
||||
try
|
||||
Stopwatch stopwatch = Stopwatch.StartNew();
|
||||
using Stream stream = typeof(AssemblyFateDefinitionLoader).Assembly.GetManifestResourceStream("Questionable.FatePaths.FateBundle");
|
||||
byte[] array = PathBundleSecret.Key();
|
||||
List<KeyValuePair<string, FateDefinition>> list = PathBundle.Deserialize<FateDefinition>(stream, array);
|
||||
CryptographicOperations.ZeroMemory(array);
|
||||
Dictionary<ushort, FateDefinition> dictionary = new Dictionary<ushort, FateDefinition>(list.Count);
|
||||
foreach (var (s, value) in list)
|
||||
{
|
||||
byte[] array = PathBundleSecret.Key();
|
||||
List<KeyValuePair<string, FateDefinition>> list = PathBundle.Deserialize<FateDefinition>(stream, array);
|
||||
_206B_202D_202C_200F_206D_202E_202C_200F_206B_202C_206E_202A_200B_206E_206E_206E_200B_200D_206F_206B_206B_202C_202E_202E_202D_206A_200C_202E_202C_202E_206F_202D_202A_206D_202C_202D_206D_206B_202C_202E((Span<byte>)array);
|
||||
Dictionary<ushort, FateDefinition> dictionary = new Dictionary<ushort, FateDefinition>(list.Count);
|
||||
using (List<KeyValuePair<string, FateDefinition>>.Enumerator enumerator = list.GetEnumerator())
|
||||
{
|
||||
int num = 2495585;
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 2495585;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 2:
|
||||
num = 2495585;
|
||||
break;
|
||||
case 3:
|
||||
var (s, value) = (KeyValuePair<string, FateDefinition>)(ref enumerator.Current);
|
||||
dictionary[ushort.Parse(s, _206C_206D_202D_200D_200C_202C_206D_206B_200B_200C_200F_202B_206B_200E_206A_202E_200E_206A_200D_206D_202D_206F_206D_200E_200E_200B_206B_200B_206E_202D_202B_202B_206D_202D_206D_202E_202C_202B_200D_206D_202E())] = value;
|
||||
num = 2495585;
|
||||
break;
|
||||
case 0:
|
||||
num = (enumerator.MoveNext() ? 2495586 : 2495584);
|
||||
break;
|
||||
case 1:
|
||||
goto end_IL_005c;
|
||||
}
|
||||
continue;
|
||||
end_IL_005c:
|
||||
break;
|
||||
}
|
||||
}
|
||||
DecodeDuration = _206C_202E_200B_202B_202D_202D_202D_202E_206E_202C_200D_202C_200D_202A_200C_202A_206C_200F_206D_206B_202E_202B_200C_206C_200F_200B_202E_206E_202B_200D_200E_206F_202D_200B_200E_202D_200C_202B_200E_202D_202E(stopwatch);
|
||||
return dictionary;
|
||||
dictionary[ushort.Parse(s, CultureInfo.InvariantCulture)] = value;
|
||||
}
|
||||
finally
|
||||
{
|
||||
int num = ((stream == null) ? (-1196840161) : (-1196840164));
|
||||
while (true)
|
||||
{
|
||||
int num7 = num;
|
||||
int num3 = -1196840163;
|
||||
int num4 = num7;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
num = -1196840164;
|
||||
break;
|
||||
case 1:
|
||||
_206C_206E_202A_206A_202A_202B_202B_206D_206E_200E_202A_202E_200F_202B_206D_206E_200F_206F_200E_200B_200D_202E_202D_206D_206E_202B_200D_202E_200C_206D_202A_202C_202A_202B_200B_200E_200C_202E_206A_206F_202E((IDisposable)stream);
|
||||
num = -1196840161;
|
||||
break;
|
||||
case 2:
|
||||
goto end_IL_0143;
|
||||
}
|
||||
continue;
|
||||
end_IL_0143:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static Type _200C_202A_202B_206F_206B_200B_202E_202C_206E_200E_206C_200C_200E_206D_206F_206B_200D_206B_206B_200C_200E_202B_202D_206B_206E_202A_202E_206C_206B_202C_200E_200C_206F_206C_206B_206C_206F_202E_206F_200D_202E(RuntimeTypeHandle P_0)
|
||||
{
|
||||
return Type.GetTypeFromHandle(P_0);
|
||||
}
|
||||
|
||||
static Assembly _206D_202B_206F_206C_200B_202C_206C_200D_200D_200D_206D_200E_202A_200D_202C_206F_200C_206B_202E_202B_202B_200B_202E_202E_202E_206D_202D_206C_202B_206A_202C_200E_202A_202A_206E_206B_206E_202C_200D_200D_202E(Type P_0)
|
||||
{
|
||||
return P_0.Assembly;
|
||||
}
|
||||
|
||||
static Stream _206B_200B_202A_202A_200E_206D_200D_206B_202C_200B_200F_202D_202D_206D_200D_200B_202A_202B_200F_202D_202B_200E_206B_206D_202C_206E_206C_202C_206D_200C_202A_206E_200B_200C_202A_200E_206D_200D_200C_206B_202E(Assembly P_0, string P_1)
|
||||
{
|
||||
return P_0.GetManifestResourceStream(P_1);
|
||||
}
|
||||
|
||||
static Stopwatch _200F_202C_206F_200F_202B_202D_200C_202A_202A_206E_202B_202D_206D_202B_200F_200F_206E_206A_200F_200E_202E_206A_206C_206E_206E_206E_202B_206B_200F_206B_206F_200B_206A_206C_202E_206F_202A_200C_206B_206D_202E()
|
||||
{
|
||||
return Stopwatch.StartNew();
|
||||
}
|
||||
|
||||
static void _206B_202D_202C_200F_206D_202E_202C_200F_206B_202C_206E_202A_200B_206E_206E_206E_200B_200D_206F_206B_206B_202C_202E_202E_202D_206A_200C_202E_202C_202E_206F_202D_202A_206D_202C_202D_206D_206B_202C_202E(Span<byte> P_0)
|
||||
{
|
||||
CryptographicOperations.ZeroMemory(P_0);
|
||||
}
|
||||
|
||||
static CultureInfo _206C_206D_202D_200D_200C_202C_206D_206B_200B_200C_200F_202B_206B_200E_206A_202E_200E_206A_200D_206D_202D_206F_206D_200E_200E_200B_206B_200B_206E_202D_202B_202B_206D_202D_206D_202E_202C_202B_200D_206D_202E()
|
||||
{
|
||||
return CultureInfo.InvariantCulture;
|
||||
}
|
||||
|
||||
static TimeSpan _206C_202E_200B_202B_202D_202D_202D_202E_206E_202C_200D_202C_200D_202A_200C_202A_206C_200F_206D_206B_202E_202B_200C_206C_200F_200B_202E_206E_202B_200D_200E_206F_202D_200B_200E_202D_200C_202B_200E_202D_202E(Stopwatch P_0)
|
||||
{
|
||||
return P_0.Elapsed;
|
||||
}
|
||||
|
||||
static void _206C_206E_202A_206A_202A_202B_202B_206D_206E_200E_202A_202E_200F_202B_206D_206E_200F_206F_200E_200B_200D_202E_202D_206D_206E_202B_200D_202E_200C_206D_202A_202C_202A_202B_200B_200E_200C_202E_206A_206F_202E(IDisposable P_0)
|
||||
{
|
||||
P_0.Dispose();
|
||||
DecodeDuration = stopwatch.Elapsed;
|
||||
return dictionary;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,64 +1,30 @@
|
|||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Questionable.FatePaths;
|
||||
|
||||
internal static class PathBundleSecret
|
||||
{
|
||||
private static readonly byte[] A;
|
||||
private static readonly byte[] A = new byte[32]
|
||||
{
|
||||
184, 146, 158, 4, 12, 188, 14, 129, 154, 207,
|
||||
124, 249, 11, 86, 207, 158, 174, 9, 114, 165,
|
||||
243, 163, 70, 242, 33, 231, 45, 140, 119, 185,
|
||||
162, 26
|
||||
};
|
||||
|
||||
private static readonly byte[] B;
|
||||
private static readonly byte[] B = new byte[32]
|
||||
{
|
||||
150, 86, 230, 115, 69, 121, 30, 79, 176, 162,
|
||||
216, 139, 248, 83, 68, 111, 173, 223, 203, 79,
|
||||
42, 143, 208, 219, 192, 216, 102, 249, 57, 147,
|
||||
95, 21
|
||||
};
|
||||
|
||||
internal static byte[] Key()
|
||||
{
|
||||
byte[] array = new byte[A.Length];
|
||||
int num = 0;
|
||||
int num2 = -1653942217;
|
||||
while (true)
|
||||
for (int i = 0; i < array.Length; i++)
|
||||
{
|
||||
int num3 = num2;
|
||||
int num4 = -1653942219;
|
||||
int num5 = num3;
|
||||
switch ((num5 | num4) - (num5 & num4))
|
||||
{
|
||||
case 3:
|
||||
num2 = -1653942217;
|
||||
break;
|
||||
case 2:
|
||||
num2 = ((num < array.Length) ? (-1653942220) : (-1653942219));
|
||||
break;
|
||||
case 0:
|
||||
return array;
|
||||
case 1:
|
||||
{
|
||||
int num6 = num;
|
||||
byte num7 = A[num];
|
||||
num4 = B[num];
|
||||
num5 = num7;
|
||||
array[num6] = (byte)((num5 | num4) - (num5 & num4));
|
||||
int num8 = num;
|
||||
num4 = 1;
|
||||
num5 = num8;
|
||||
num = (num5 | num4) + (num5 & num4);
|
||||
num2 = -1653942217;
|
||||
break;
|
||||
}
|
||||
}
|
||||
array[i] = (byte)(A[i] ^ B[i]);
|
||||
}
|
||||
}
|
||||
|
||||
static PathBundleSecret()
|
||||
{
|
||||
byte[] array = new byte[32];
|
||||
_206D_202B_202B_206F_202C_206D_200C_206E_202C_202E_200D_200F_202B_200C_200C_206D_202C_206F_206A_202E_206F_206B_200C_200D_206E_200C_206C_200B_200E_200F_202C_200F_200D_200D_200F_202E_200B_200D_206D_202A_202E((Array)array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
|
||||
A = array;
|
||||
byte[] array2 = new byte[32];
|
||||
_206D_202B_202B_206F_202C_206D_200C_206E_202C_202E_200D_200F_202B_200C_200C_206D_202C_206F_206A_202E_206F_206B_200C_200D_206E_200C_206C_200B_200E_200F_202C_200F_200D_200D_200F_202E_200B_200D_206D_202A_202E((Array)array2, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
|
||||
B = array2;
|
||||
}
|
||||
|
||||
static void _206D_202B_202B_206F_202C_206D_200C_206E_202C_202E_200D_200F_202B_200C_200C_206D_202C_206F_206A_202E_206F_206B_200C_200D_206E_200C_206C_200B_200E_200F_202C_200F_200D_200D_200F_202E_200B_200D_206D_202A_202E(Array P_0, RuntimeFieldHandle P_1)
|
||||
{
|
||||
RuntimeHelpers.InitializeArray(P_0, P_1);
|
||||
return array;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -3,8 +3,6 @@ using System.Collections.Generic;
|
|||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Security.Cryptography;
|
||||
using System.Threading;
|
||||
using Questionable.Model.Gathering;
|
||||
|
|
@ -18,129 +16,26 @@ internal static class AssemblyGatheringLocationLoader
|
|||
|
||||
internal static TimeSpan? DecodeDuration { get; private set; }
|
||||
|
||||
internal static Stream GatheringSchema
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
get
|
||||
{
|
||||
return _202D_200C_200E_200F_202A_200B_206C_202B_200D_200D_202D_202D_200B_200D_202A_202A_200B_206E_200B_202D_202D_200D_202A_206A_206E_202C_200F_206C_200F_206E_206C_200D_206B_206A_202C_206D_206C_202E_200F_200C_202E(_202A_202D_206A_206D_206A_200D_200F_200D_206E_202D_200C_200D_202A_202C_206F_200C_200C_200B_200D_200F_206F_202A_206A_200F_206E_200B_200E_206C_200E_200D_202C_200B_202D_202C_206C_206E_202A_206E_206D_206B_202E(_200E_202C_200C_200B_206D_206E_202A_206F_206B_202A_202C_200F_206B_202E_206D_206F_202E_202D_200F_206B_206D_206E_206B_206D_206C_200C_200F_202A_202B_200E_206E_202B_200B_202A_202E_202C_200C_202E_206D_202C_202E(typeof(AssemblyGatheringLocationLoader).TypeHandle)), global::_003CModule_003E._202B_200D_206E_200E_206C_206E_206B_200F_202C_202C_202C_206F_202E_202A_202C_206B_206A_200F_206B_206F_202C_206C_202A_202E_202D_206D_202B_200D_200B_202A_206E_200B_206A_206D_202B_206D_206A_202D_206E_206B_202E<string>(657022072));
|
||||
}
|
||||
}
|
||||
internal static Stream GatheringSchema => typeof(AssemblyGatheringLocationLoader).Assembly.GetManifestResourceStream("Questionable.GatheringPaths.GatheringLocationSchema");
|
||||
|
||||
internal static IReadOnlyDictionary<ushort, GatheringRoot> GetLocations()
|
||||
{
|
||||
return Locations.Value;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
private static IReadOnlyDictionary<ushort, GatheringRoot> LoadLocations()
|
||||
{
|
||||
Stopwatch stopwatch = _202A_202A_202D_206C_206F_200F_206B_200C_200B_202E_206D_200E_206C_206A_200D_202B_202B_206D_200B_200C_200E_202E_202A_206F_206A_206D_206F_202B_206F_200C_206A_202B_206A_202D_206F_206D_202D_206D_202B_202A_202E();
|
||||
Stream stream = _202D_200C_200E_200F_202A_200B_206C_202B_200D_200D_202D_202D_200B_200D_202A_202A_200B_206E_200B_202D_202D_200D_202A_206A_206E_202C_200F_206C_200F_206E_206C_200D_206B_206A_202C_206D_206C_202E_200F_200C_202E(_202A_202D_206A_206D_206A_200D_200F_200D_206E_202D_200C_200D_202A_202C_206F_200C_200C_200B_200D_200F_206F_202A_206A_200F_206E_200B_200E_206C_200E_200D_202C_200B_202D_202C_206C_206E_202A_206E_206D_206B_202E(_200E_202C_200C_200B_206D_206E_202A_206F_206B_202A_202C_200F_206B_202E_206D_206F_202E_202D_200F_206B_206D_206E_206B_206D_206C_200C_200F_202A_202B_200E_206E_202B_200B_202A_202E_202C_200C_202E_206D_202C_202E(typeof(AssemblyGatheringLocationLoader).TypeHandle)), global::_003CModule_003E._206C_202D_202B_202A_206F_206F_202A_202E_206E_206C_200B_202C_206B_202A_206A_202E_206C_200B_202E_200C_200D_202A_206D_206D_206F_206D_202E_206C_202C_200F_206F_202A_200E_200F_206B_200B_200D_206E_206F_206F_202E<string>(-1881698));
|
||||
try
|
||||
Stopwatch stopwatch = Stopwatch.StartNew();
|
||||
using Stream stream = typeof(AssemblyGatheringLocationLoader).Assembly.GetManifestResourceStream("Questionable.GatheringPaths.GatheringBundle");
|
||||
byte[] array = PathBundleSecret.Key();
|
||||
List<KeyValuePair<string, GatheringRoot>> list = PathBundle.Deserialize<GatheringRoot>(stream, array);
|
||||
CryptographicOperations.ZeroMemory(array);
|
||||
Dictionary<ushort, GatheringRoot> dictionary = new Dictionary<ushort, GatheringRoot>(list.Count);
|
||||
foreach (var (s, value) in list)
|
||||
{
|
||||
byte[] array = PathBundleSecret.Key();
|
||||
List<KeyValuePair<string, GatheringRoot>> list = PathBundle.Deserialize<GatheringRoot>(stream, array);
|
||||
_206E_200D_206E_200B_202D_202E_202D_206C_206B_206F_200E_200E_206D_200D_206F_200C_206B_202B_206B_202D_202C_206B_200B_200B_200C_202C_200E_206F_200D_200C_200F_206E_202C_206E_206E_206F_206C_202A_206A_202E_202E((Span<byte>)array);
|
||||
Dictionary<ushort, GatheringRoot> dictionary = new Dictionary<ushort, GatheringRoot>(list.Count);
|
||||
using (List<KeyValuePair<string, GatheringRoot>>.Enumerator enumerator = list.GetEnumerator())
|
||||
{
|
||||
int num = 2495585;
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 2495585;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 2:
|
||||
num = 2495585;
|
||||
break;
|
||||
case 3:
|
||||
var (s, value) = (KeyValuePair<string, GatheringRoot>)(ref enumerator.Current);
|
||||
dictionary[ushort.Parse(s, _206B_202B_200D_200E_202E_202D_202D_206E_206D_206A_200E_206D_202B_206D_200C_202D_206B_200F_200D_202B_202E_202E_206C_202B_200F_206F_206C_200D_200F_200B_206E_200C_202E_206B_202D_206E_200B_200D_200B_206E_202E())] = value;
|
||||
num = 2495585;
|
||||
break;
|
||||
case 0:
|
||||
num = (enumerator.MoveNext() ? 2495586 : 2495584);
|
||||
break;
|
||||
case 1:
|
||||
goto end_IL_005c;
|
||||
}
|
||||
continue;
|
||||
end_IL_005c:
|
||||
break;
|
||||
}
|
||||
}
|
||||
DecodeDuration = _200C_206E_202D_202A_206D_202C_200B_202E_200C_200F_202D_206B_200B_206A_200C_202B_206F_202C_202E_202A_206F_200C_206D_202A_200F_206C_202D_202A_206C_206A_206A_202D_206E_206C_206E_206A_206A_206E_206F_202B_202E(stopwatch);
|
||||
return dictionary;
|
||||
dictionary[ushort.Parse(s, CultureInfo.InvariantCulture)] = value;
|
||||
}
|
||||
finally
|
||||
{
|
||||
int num = ((stream == null) ? (-1196840161) : (-1196840164));
|
||||
while (true)
|
||||
{
|
||||
int num7 = num;
|
||||
int num3 = -1196840163;
|
||||
int num4 = num7;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
num = -1196840164;
|
||||
break;
|
||||
case 1:
|
||||
_202B_202A_200B_200F_206F_206C_206E_200E_206D_202C_202C_202C_206B_206D_202C_206D_202D_200D_200F_202C_206C_202A_202E_202B_206A_200C_202E_202C_202A_206D_206C_202B_206E_206A_202C_206A_202D_202C_202E_200F_202E((IDisposable)stream);
|
||||
num = -1196840161;
|
||||
break;
|
||||
case 2:
|
||||
goto end_IL_0143;
|
||||
}
|
||||
continue;
|
||||
end_IL_0143:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static Type _200E_202C_200C_200B_206D_206E_202A_206F_206B_202A_202C_200F_206B_202E_206D_206F_202E_202D_200F_206B_206D_206E_206B_206D_206C_200C_200F_202A_202B_200E_206E_202B_200B_202A_202E_202C_200C_202E_206D_202C_202E(RuntimeTypeHandle P_0)
|
||||
{
|
||||
return Type.GetTypeFromHandle(P_0);
|
||||
}
|
||||
|
||||
static Assembly _202A_202D_206A_206D_206A_200D_200F_200D_206E_202D_200C_200D_202A_202C_206F_200C_200C_200B_200D_200F_206F_202A_206A_200F_206E_200B_200E_206C_200E_200D_202C_200B_202D_202C_206C_206E_202A_206E_206D_206B_202E(Type P_0)
|
||||
{
|
||||
return P_0.Assembly;
|
||||
}
|
||||
|
||||
static Stream _202D_200C_200E_200F_202A_200B_206C_202B_200D_200D_202D_202D_200B_200D_202A_202A_200B_206E_200B_202D_202D_200D_202A_206A_206E_202C_200F_206C_200F_206E_206C_200D_206B_206A_202C_206D_206C_202E_200F_200C_202E(Assembly P_0, string P_1)
|
||||
{
|
||||
return P_0.GetManifestResourceStream(P_1);
|
||||
}
|
||||
|
||||
static Stopwatch _202A_202A_202D_206C_206F_200F_206B_200C_200B_202E_206D_200E_206C_206A_200D_202B_202B_206D_200B_200C_200E_202E_202A_206F_206A_206D_206F_202B_206F_200C_206A_202B_206A_202D_206F_206D_202D_206D_202B_202A_202E()
|
||||
{
|
||||
return Stopwatch.StartNew();
|
||||
}
|
||||
|
||||
static void _206E_200D_206E_200B_202D_202E_202D_206C_206B_206F_200E_200E_206D_200D_206F_200C_206B_202B_206B_202D_202C_206B_200B_200B_200C_202C_200E_206F_200D_200C_200F_206E_202C_206E_206E_206F_206C_202A_206A_202E_202E(Span<byte> P_0)
|
||||
{
|
||||
CryptographicOperations.ZeroMemory(P_0);
|
||||
}
|
||||
|
||||
static CultureInfo _206B_202B_200D_200E_202E_202D_202D_206E_206D_206A_200E_206D_202B_206D_200C_202D_206B_200F_200D_202B_202E_202E_206C_202B_200F_206F_206C_200D_200F_200B_206E_200C_202E_206B_202D_206E_200B_200D_200B_206E_202E()
|
||||
{
|
||||
return CultureInfo.InvariantCulture;
|
||||
}
|
||||
|
||||
static TimeSpan _200C_206E_202D_202A_206D_202C_200B_202E_200C_200F_202D_206B_200B_206A_200C_202B_206F_202C_202E_202A_206F_200C_206D_202A_200F_206C_202D_202A_206C_206A_206A_202D_206E_206C_206E_206A_206A_206E_206F_202B_202E(Stopwatch P_0)
|
||||
{
|
||||
return P_0.Elapsed;
|
||||
}
|
||||
|
||||
static void _202B_202A_200B_200F_206F_206C_206E_200E_206D_202C_202C_202C_206B_206D_202C_206D_202D_200D_200F_202C_206C_202A_202E_202B_206A_200C_202E_202C_202A_206D_206C_202B_206E_206A_202C_206A_202D_202C_202E_200F_202E(IDisposable P_0)
|
||||
{
|
||||
P_0.Dispose();
|
||||
DecodeDuration = stopwatch.Elapsed;
|
||||
return dictionary;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,64 +1,30 @@
|
|||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Questionable.GatheringPaths;
|
||||
|
||||
internal static class PathBundleSecret
|
||||
{
|
||||
private static readonly byte[] A;
|
||||
private static readonly byte[] A = new byte[32]
|
||||
{
|
||||
145, 72, 249, 36, 189, 185, 130, 238, 193, 10,
|
||||
202, 232, 4, 205, 253, 37, 116, 120, 105, 80,
|
||||
155, 225, 237, 122, 124, 183, 185, 180, 222, 128,
|
||||
163, 58
|
||||
};
|
||||
|
||||
private static readonly byte[] B;
|
||||
private static readonly byte[] B = new byte[32]
|
||||
{
|
||||
38, 241, 153, 134, 236, 129, 153, 181, 53, 177,
|
||||
92, 29, 47, 248, 180, 1, 80, 8, 68, 19,
|
||||
82, 214, 85, 67, 101, 195, 46, 138, 196, 69,
|
||||
206, 117
|
||||
};
|
||||
|
||||
internal static byte[] Key()
|
||||
{
|
||||
byte[] array = new byte[A.Length];
|
||||
int num = 0;
|
||||
int num2 = -1653942217;
|
||||
while (true)
|
||||
for (int i = 0; i < array.Length; i++)
|
||||
{
|
||||
int num3 = num2;
|
||||
int num4 = -1653942219;
|
||||
int num5 = num3;
|
||||
switch ((num5 | num4) - (num5 & num4))
|
||||
{
|
||||
case 3:
|
||||
num2 = -1653942217;
|
||||
break;
|
||||
case 2:
|
||||
num2 = ((num < array.Length) ? (-1653942220) : (-1653942219));
|
||||
break;
|
||||
case 0:
|
||||
return array;
|
||||
case 1:
|
||||
{
|
||||
int num6 = num;
|
||||
byte num7 = A[num];
|
||||
num4 = B[num];
|
||||
num5 = num7;
|
||||
array[num6] = (byte)((num5 | num4) - (num5 & num4));
|
||||
int num8 = num;
|
||||
num4 = 1;
|
||||
num5 = num8;
|
||||
num = (num5 | num4) + (num5 & num4);
|
||||
num2 = -1653942217;
|
||||
break;
|
||||
}
|
||||
}
|
||||
array[i] = (byte)(A[i] ^ B[i]);
|
||||
}
|
||||
}
|
||||
|
||||
static PathBundleSecret()
|
||||
{
|
||||
byte[] array = new byte[32];
|
||||
_200C_200B_206F_200D_202D_200C_200D_202D_206E_206B_202D_206A_206A_206E_206E_200F_200C_202B_206E_202A_200E_200D_202C_202D_202E_202B_200C_206F_206D_206F_202A_206A_206D_200C_206C_202B_206F_200E_202C_206F_202E((Array)array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
|
||||
A = array;
|
||||
byte[] array2 = new byte[32];
|
||||
_200C_200B_206F_200D_202D_200C_200D_202D_206E_206B_202D_206A_206A_206E_206E_200F_200C_202B_206E_202A_200E_200D_202C_202D_202E_202B_200C_206F_206D_206F_202A_206A_206D_200C_206C_202B_206F_200E_202C_206F_202E((Array)array2, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
|
||||
B = array2;
|
||||
}
|
||||
|
||||
static void _200C_200B_206F_200D_202D_200C_200D_202D_206E_206B_202D_206A_206A_206E_206E_200F_200C_202B_206E_202A_200E_200D_202C_202D_202E_202B_200C_206F_206D_206F_202A_206A_206D_200C_206C_202B_206F_200E_202C_206F_202E(Array P_0, RuntimeFieldHandle P_1)
|
||||
{
|
||||
RuntimeHelpers.InitializeArray(P_0, P_1);
|
||||
return array;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ internal sealed class _003C_003Ez__ReadOnlyArray<T> : IEnumerable, ICollection,
|
|||
}
|
||||
set
|
||||
{
|
||||
throw _206B_206D_206B_202E_200D_206A_202C_200D_202C_206E_206B_202C_200F_202B_206C_206F_206A_200C_202B_206C_202D_206D_206A_202A_202B_206B_200E_206C_206E_202E_206F_200D_200B_200C_200B_200C_202E_200C_206F_206B_202E();
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -44,7 +44,7 @@ internal sealed class _003C_003Ez__ReadOnlyArray<T> : IEnumerable, ICollection,
|
|||
}
|
||||
set
|
||||
{
|
||||
throw _206B_206D_206B_202E_200D_206A_202C_200D_202C_206E_206B_202C_200F_202B_206C_206F_206A_200C_202B_206C_202D_206D_206A_202A_202B_206B_200E_206C_206E_202E_206F_200D_200B_200C_200B_200C_202E_200C_206F_206B_202E();
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -55,47 +55,47 @@ internal sealed class _003C_003Ez__ReadOnlyArray<T> : IEnumerable, ICollection,
|
|||
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return _206B_206C_206A_206E_200B_202D_200B_202E_200C_200E_202E_200D_202C_202A_202B_200F_202C_200D_206E_200E_200C_200E_200F_202D_200F_202E_200E_200D_202A_200F_200F_202B_206D_202D_206B_202B_200D_202E_206E_202E_202E((IEnumerable)_items);
|
||||
return ((IEnumerable)_items).GetEnumerator();
|
||||
}
|
||||
|
||||
void ICollection.CopyTo(Array array, int index)
|
||||
{
|
||||
_200E_202C_200B_206C_202D_206C_206A_206D_200B_206A_202D_200B_200B_200C_206D_200C_200E_202D_200D_206B_206C_206A_206F_206D_206D_202A_206D_206E_202C_206A_202B_206B_206D_202D_202D_206A_206F_206D_200E_206A_202E((ICollection)_items, array, index);
|
||||
((ICollection)_items).CopyTo(array, index);
|
||||
}
|
||||
|
||||
int IList.Add(object? value)
|
||||
{
|
||||
throw _206B_206D_206B_202E_200D_206A_202C_200D_202C_206E_206B_202C_200F_202B_206C_206F_206A_200C_202B_206C_202D_206D_206A_202A_202B_206B_200E_206C_206E_202E_206F_200D_200B_200C_200B_200C_202E_200C_206F_206B_202E();
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
void IList.Clear()
|
||||
{
|
||||
throw _206B_206D_206B_202E_200D_206A_202C_200D_202C_206E_206B_202C_200F_202B_206C_206F_206A_200C_202B_206C_202D_206D_206A_202A_202B_206B_200E_206C_206E_202E_206F_200D_200B_200C_200B_200C_202E_200C_206F_206B_202E();
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
bool IList.Contains(object? value)
|
||||
{
|
||||
return _200D_202E_202D_202E_206D_202B_206D_202A_200E_202A_202C_200F_202B_202C_206B_200C_202A_202D_202B_200C_200D_202E_202B_202B_200E_206A_202B_200C_206B_206C_206C_206A_206D_200B_202D_206F_200D_200E_200E_206D_202E((IList)_items, value);
|
||||
return ((IList)_items).Contains(value);
|
||||
}
|
||||
|
||||
int IList.IndexOf(object? value)
|
||||
{
|
||||
return _202D_200D_202C_202B_200B_206E_206B_200C_202E_200B_206E_206B_206B_200D_206A_202A_206E_200B_202C_202B_200E_200B_200F_202C_202C_202A_200C_206E_202A_206F_206C_200E_206B_200F_202E_200E_206D_206F_200C_202A_202E((IList)_items, value);
|
||||
return ((IList)_items).IndexOf(value);
|
||||
}
|
||||
|
||||
void IList.Insert(int index, object? value)
|
||||
{
|
||||
throw _206B_206D_206B_202E_200D_206A_202C_200D_202C_206E_206B_202C_200F_202B_206C_206F_206A_200C_202B_206C_202D_206D_206A_202A_202B_206B_200E_206C_206E_202E_206F_200D_200B_200C_200B_200C_202E_200C_206F_206B_202E();
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
void IList.Remove(object? value)
|
||||
{
|
||||
throw _206B_206D_206B_202E_200D_206A_202C_200D_202C_206E_206B_202C_200F_202B_206C_206F_206A_200C_202B_206C_202D_206D_206A_202A_202B_206B_200E_206C_206E_202E_206F_200D_200B_200C_200B_200C_202E_200C_206F_206B_202E();
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
void IList.RemoveAt(int index)
|
||||
{
|
||||
throw _206B_206D_206B_202E_200D_206A_202C_200D_202C_206E_206B_202C_200F_202B_206C_206F_206A_200C_202B_206C_202D_206D_206A_202A_202B_206B_200E_206C_206E_202E_206F_200D_200B_200C_200B_200C_202E_200C_206F_206B_202E();
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
IEnumerator<T> IEnumerable<T>.GetEnumerator()
|
||||
|
|
@ -105,12 +105,12 @@ internal sealed class _003C_003Ez__ReadOnlyArray<T> : IEnumerable, ICollection,
|
|||
|
||||
void ICollection<T>.Add(T item)
|
||||
{
|
||||
throw _206B_206D_206B_202E_200D_206A_202C_200D_202C_206E_206B_202C_200F_202B_206C_206F_206A_200C_202B_206C_202D_206D_206A_202A_202B_206B_200E_206C_206E_202E_206F_200D_200B_200C_200B_200C_202E_200C_206F_206B_202E();
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
void ICollection<T>.Clear()
|
||||
{
|
||||
throw _206B_206D_206B_202E_200D_206A_202C_200D_202C_206E_206B_202C_200F_202B_206C_206F_206A_200C_202B_206C_202D_206D_206A_202A_202B_206B_200E_206C_206E_202E_206F_200D_200B_200C_200B_200C_202E_200C_206F_206B_202E();
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
bool ICollection<T>.Contains(T item)
|
||||
|
|
@ -125,7 +125,7 @@ internal sealed class _003C_003Ez__ReadOnlyArray<T> : IEnumerable, ICollection,
|
|||
|
||||
bool ICollection<T>.Remove(T item)
|
||||
{
|
||||
throw _206B_206D_206B_202E_200D_206A_202C_200D_202C_206E_206B_202C_200F_202B_206C_206F_206A_200C_202B_206C_202D_206D_206A_202A_202B_206B_200E_206C_206E_202E_206F_200D_200B_200C_200B_200C_202E_200C_206F_206B_202E();
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
int IList<T>.IndexOf(T item)
|
||||
|
|
@ -135,36 +135,11 @@ internal sealed class _003C_003Ez__ReadOnlyArray<T> : IEnumerable, ICollection,
|
|||
|
||||
void IList<T>.Insert(int index, T item)
|
||||
{
|
||||
throw _206B_206D_206B_202E_200D_206A_202C_200D_202C_206E_206B_202C_200F_202B_206C_206F_206A_200C_202B_206C_202D_206D_206A_202A_202B_206B_200E_206C_206E_202E_206F_200D_200B_200C_200B_200C_202E_200C_206F_206B_202E();
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
void IList<T>.RemoveAt(int index)
|
||||
{
|
||||
throw _206B_206D_206B_202E_200D_206A_202C_200D_202C_206E_206B_202C_200F_202B_206C_206F_206A_200C_202B_206C_202D_206D_206A_202A_202B_206B_200E_206C_206E_202E_206F_200D_200B_200C_200B_200C_202E_200C_206F_206B_202E();
|
||||
}
|
||||
|
||||
static IEnumerator _206B_206C_206A_206E_200B_202D_200B_202E_200C_200E_202E_200D_202C_202A_202B_200F_202C_200D_206E_200E_200C_200E_200F_202D_200F_202E_200E_200D_202A_200F_200F_202B_206D_202D_206B_202B_200D_202E_206E_202E_202E(IEnumerable P_0)
|
||||
{
|
||||
return P_0.GetEnumerator();
|
||||
}
|
||||
|
||||
static void _200E_202C_200B_206C_202D_206C_206A_206D_200B_206A_202D_200B_200B_200C_206D_200C_200E_202D_200D_206B_206C_206A_206F_206D_206D_202A_206D_206E_202C_206A_202B_206B_206D_202D_202D_206A_206F_206D_200E_206A_202E(ICollection P_0, Array P_1, int P_2)
|
||||
{
|
||||
P_0.CopyTo(P_1, P_2);
|
||||
}
|
||||
|
||||
static NotSupportedException _206B_206D_206B_202E_200D_206A_202C_200D_202C_206E_206B_202C_200F_202B_206C_206F_206A_200C_202B_206C_202D_206D_206A_202A_202B_206B_200E_206C_206E_202E_206F_200D_200B_200C_200B_200C_202E_200C_206F_206B_202E()
|
||||
{
|
||||
return new NotSupportedException();
|
||||
}
|
||||
|
||||
static bool _200D_202E_202D_202E_206D_202B_206D_202A_200E_202A_202C_200F_202B_202C_206B_200C_202A_202D_202B_200C_200D_202E_202B_202B_200E_206A_202B_200C_206B_206C_206C_206A_206D_200B_202D_206F_200D_200E_200E_206D_202E(IList P_0, object P_1)
|
||||
{
|
||||
return P_0.Contains(P_1);
|
||||
}
|
||||
|
||||
static int _202D_200D_202C_202B_200B_206E_206B_200C_202E_200B_206E_206B_206B_200D_206A_202A_206E_200B_202C_202B_200E_200B_200F_202C_202C_202A_200C_206E_202A_206F_206C_200E_206B_200F_202E_200E_206D_206F_200C_202A_202E(IList P_0, object P_1)
|
||||
{
|
||||
return P_0.IndexOf(P_1);
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using Dalamud.Game.ClientState.Conditions;
|
||||
using Dalamud.Plugin.Services;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
|
|
@ -19,219 +18,88 @@ public static class BuddyActions
|
|||
public unsafe static bool TrySummonCompanion()
|
||||
{
|
||||
ActionManager* ptr = ActionManager.Instance();
|
||||
int num = ((ptr != null) ? 1651046355 : 1651046352);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1651046354;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
goto IL_004b;
|
||||
case 2:
|
||||
return false;
|
||||
case 1:
|
||||
return ptr->UseAction(ActionType.GeneralAction, 24u, 3758096384uL, 0u, ActionManager.UseActionMode.None, 0u, null);
|
||||
}
|
||||
continue;
|
||||
IL_004b:
|
||||
num = 1651046352;
|
||||
return false;
|
||||
}
|
||||
return ptr->UseAction(ActionType.GeneralAction, 24u, 3758096384uL, 0u, ActionManager.UseActionMode.None, 0u, null);
|
||||
}
|
||||
|
||||
public unsafe static bool TryDismissCompanion()
|
||||
{
|
||||
ActionManager* ptr = ActionManager.Instance();
|
||||
int num = ((ptr != null) ? (-1011078578) : (-1011078577));
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1011078578;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
return ptr->UseAction(ActionType.GeneralAction, 25u, 3758096384uL, 0u, ActionManager.UseActionMode.None, 0u, null);
|
||||
case 1:
|
||||
return false;
|
||||
case 2:
|
||||
goto IL_0062;
|
||||
}
|
||||
continue;
|
||||
IL_0062:
|
||||
num = -1011078577;
|
||||
return false;
|
||||
}
|
||||
return ptr->UseAction(ActionType.GeneralAction, 25u, 3758096384uL, 0u, ActionManager.UseActionMode.None, 0u, null);
|
||||
}
|
||||
|
||||
public static bool TrySetOrder(byte order)
|
||||
{
|
||||
int num = (BuddyStateHelper.IsCompanionSummoned() ? (-1422028975) : (-1422028974));
|
||||
while (true)
|
||||
if (!BuddyStateHelper.IsCompanionSummoned())
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1422028976;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 1:
|
||||
GameMain.ExecuteCommand(500, order);
|
||||
return true;
|
||||
case 2:
|
||||
return false;
|
||||
case 0:
|
||||
goto IL_005a;
|
||||
}
|
||||
continue;
|
||||
IL_005a:
|
||||
num = -1422028974;
|
||||
return false;
|
||||
}
|
||||
GameMain.ExecuteCommand(500, order);
|
||||
return true;
|
||||
}
|
||||
|
||||
public unsafe static bool IsCompanionUnlocked()
|
||||
{
|
||||
UIState* ptr = UIState.Instance();
|
||||
int num = ((ptr == null) ? (-114934898) : (-114934899));
|
||||
while (true)
|
||||
if (ptr != null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -114934897;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 1:
|
||||
return false;
|
||||
case 2:
|
||||
return ptr->IsUnlockLinkUnlocked(8u);
|
||||
case 0:
|
||||
goto IL_0055;
|
||||
}
|
||||
continue;
|
||||
IL_0055:
|
||||
num = -114934899;
|
||||
return ptr->IsUnlockLinkUnlocked(8u);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public unsafe static bool CanSummonCompanion(ICondition condition)
|
||||
{
|
||||
int num = (IsCompanionUnlocked() ? (-985374925) : (-985374926));
|
||||
InventoryManager* ptr = default(InventoryManager*);
|
||||
while (true)
|
||||
if (!IsCompanionUnlocked())
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -985374920;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 9:
|
||||
return false;
|
||||
case 4:
|
||||
num = (_206B_200F_206E_202A_202E_202C_202D_202D_206F_202A_206D_200D_202C_202E_206D_200E_202C_202E_202C_200B_200C_206B_206F_200F_200E_202B_206D_206F_200D_202D_206B_206E_206B_206D_200B_202B_200C_200F_200D_200E_202E(condition, ConditionFlag.BoundByDuty) ? (-985374920) : (-985374917));
|
||||
break;
|
||||
case 7:
|
||||
return false;
|
||||
case 1:
|
||||
num = ((!_206B_200F_206E_202A_202E_202C_202D_202D_206F_202A_206D_200D_202C_202E_206D_200E_202C_202E_202C_200B_200C_206B_206F_200F_200E_202B_206D_206F_200D_202D_206B_206E_206B_206D_200B_202B_200C_200F_200D_200E_202E(condition, ConditionFlag.InCombat)) ? (-985374918) : (-985374920));
|
||||
break;
|
||||
case 11:
|
||||
num = ((!BuddyStateHelper.IsCompanionSummoned()) ? (-985374916) : (-985374913));
|
||||
break;
|
||||
case 3:
|
||||
num = (_206B_200F_206E_202A_202E_202C_202D_202D_206F_202A_206D_200D_202C_202E_206D_200E_202C_202E_202C_200B_200C_206B_206F_200F_200E_202B_206D_206F_200D_202D_206B_206E_206B_206D_200B_202B_200C_200F_200D_200E_202E(condition, ConditionFlag.Mounted) ? (-985374920) : (-985374919));
|
||||
break;
|
||||
case 10:
|
||||
return false;
|
||||
case 5:
|
||||
return true;
|
||||
case 8:
|
||||
num = -985374926;
|
||||
break;
|
||||
case 6:
|
||||
num = ((ptr->GetInventoryItemCount(4868u, isHq: false, checkEquipped: true, checkArmory: true, 0) != 0) ? (-985374915) : (-985374927));
|
||||
break;
|
||||
case 0:
|
||||
return false;
|
||||
case 2:
|
||||
ptr = InventoryManager.Instance();
|
||||
num = ((ptr == null) ? (-985374927) : (-985374914));
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (BuddyStateHelper.IsCompanionSummoned())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (condition[ConditionFlag.BoundByDuty] || condition[ConditionFlag.Mounted] || condition[ConditionFlag.InCombat])
|
||||
{
|
||||
return false;
|
||||
}
|
||||
InventoryManager* ptr = InventoryManager.Instance();
|
||||
if (ptr == null || ptr->GetInventoryItemCount(4868u, isHq: false, checkEquipped: true, checkArmory: true, 0) == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool IsFeedAddonReady(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
return gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(2118248575), out addonPtr);
|
||||
return gameGui.TryGetReadyAddon<AtkUnitBase>("BuddyFeed", out addonPtr);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TrySelectFeedItem(IGameGui gameGui, int index)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(1623486615), out addonPtr) ? 590168373 : 590168372);
|
||||
while (true)
|
||||
if (!gameGui.TryGetReadyAddon<AtkUnitBase>("BuddyFeed", out var addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 590168373;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
AddonCallback.Fire(addonPtr, 0, index);
|
||||
return true;
|
||||
case 1:
|
||||
return false;
|
||||
case 2:
|
||||
goto IL_0066;
|
||||
}
|
||||
continue;
|
||||
IL_0066:
|
||||
num = 590168372;
|
||||
return false;
|
||||
}
|
||||
AddonCallback.Fire(addonPtr, 0, index);
|
||||
return true;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TryConfirmFeed(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(184774238), out addonPtr) ? 596817817 : 596817818);
|
||||
while (true)
|
||||
if (!gameGui.TryGetReadyAddon<AtkUnitBase>("SelectYesno", out var addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 596817819;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0054;
|
||||
case 2:
|
||||
AddonCallback.ClickYes(addonPtr);
|
||||
return true;
|
||||
case 1:
|
||||
return false;
|
||||
}
|
||||
continue;
|
||||
IL_0054:
|
||||
num = 596817818;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static bool _206B_200F_206E_202A_202E_202C_202D_202D_206F_202A_206D_200D_202C_202E_206D_200E_202C_202E_202C_200B_200C_206B_206F_200F_200E_202B_206D_206F_200D_202D_206B_206E_206B_206D_200B_202B_200C_200F_200D_200E_202E(ICondition P_0, ConditionFlag P_1)
|
||||
{
|
||||
return P_0[P_1];
|
||||
AddonCallback.ClickYes(addonPtr);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using Dalamud.Plugin.Services;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
using FFXIVClientStructs.FFXIV.Component.GUI;
|
||||
|
|
@ -13,138 +12,57 @@ public static class BuddyEquipActions
|
|||
public unsafe static bool TryOpenBuddyAddon()
|
||||
{
|
||||
ActionManager* ptr = ActionManager.Instance();
|
||||
int num = ((ptr != null) ? 1019459524 : 1019459527);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1019459526;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
goto IL_004b;
|
||||
case 2:
|
||||
return ptr->UseAction(ActionType.GeneralAction, 26u, 3758096384uL, 0u, ActionManager.UseActionMode.None, 0u, null);
|
||||
case 1:
|
||||
return false;
|
||||
}
|
||||
continue;
|
||||
IL_004b:
|
||||
num = 1019459527;
|
||||
return false;
|
||||
}
|
||||
return ptr->UseAction(ActionType.GeneralAction, 26u, 3758096384uL, 0u, ActionManager.UseActionMode.None, 0u, null);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool IsBuddyAddonReady(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
return gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(583695867), out addonPtr);
|
||||
return gameGui.TryGetReadyAddon<AtkUnitBase>("Buddy", out addonPtr);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TrySelectBardingSlot(IGameGui gameGui, int slot)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(-70251581), out addonPtr) ? (-765945705) : (-765945708));
|
||||
while (true)
|
||||
if (!gameGui.TryGetReadyAddon<AtkUnitBase>("Buddy", out var addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -765945707;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0052;
|
||||
case 2:
|
||||
AddonCallback.Fire(addonPtr, 0, 2);
|
||||
AddonCallback.Fire(addonPtr, 1, slot);
|
||||
return true;
|
||||
case 1:
|
||||
return false;
|
||||
}
|
||||
continue;
|
||||
IL_0052:
|
||||
num = -765945708;
|
||||
return false;
|
||||
}
|
||||
AddonCallback.Fire(addonPtr, 0, 2);
|
||||
AddonCallback.Fire(addonPtr, 1, slot);
|
||||
return true;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TryEquipBarding(IGameGui gameGui, int bardingIndex)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(1272603864), out addonPtr) ? (-427454791) : (-427454790));
|
||||
while (true)
|
||||
if (!gameGui.TryGetReadyAddon<AtkUnitBase>("Buddy", out var addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -427454792;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0052;
|
||||
case 2:
|
||||
return false;
|
||||
case 1:
|
||||
AddonCallback.Fire(addonPtr, 2, bardingIndex);
|
||||
return true;
|
||||
}
|
||||
continue;
|
||||
IL_0052:
|
||||
num = -427454790;
|
||||
return false;
|
||||
}
|
||||
AddonCallback.Fire(addonPtr, 2, bardingIndex);
|
||||
return true;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TryUnequipBarding(IGameGui gameGui, int slot)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(1272603864), out addonPtr) ? 170791386 : 170791385);
|
||||
while (true)
|
||||
if (!gameGui.TryGetReadyAddon<AtkUnitBase>("Buddy", out var addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 170791387;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0052;
|
||||
case 1:
|
||||
AddonCallback.Fire(addonPtr, 3, slot);
|
||||
return true;
|
||||
case 2:
|
||||
return false;
|
||||
}
|
||||
continue;
|
||||
IL_0052:
|
||||
num = 170791385;
|
||||
return false;
|
||||
}
|
||||
AddonCallback.Fire(addonPtr, 3, slot);
|
||||
return true;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TryCloseBuddyAddon(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(583695867), out addonPtr) ? (-1191072356) : (-1191072353));
|
||||
while (true)
|
||||
if (!gameGui.TryGetAddonByName<AtkUnitBase>("Buddy", out var addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1191072355;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 1:
|
||||
AddonCallback.Fire(addonPtr, -1);
|
||||
return true;
|
||||
case 2:
|
||||
return false;
|
||||
case 0:
|
||||
goto IL_0066;
|
||||
}
|
||||
continue;
|
||||
IL_0066:
|
||||
num = -1191072353;
|
||||
return false;
|
||||
}
|
||||
AddonCallback.Fire(addonPtr, -1);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,520 +8,213 @@ public static class BuddyStateHelper
|
|||
public unsafe static bool IsCompanionSummoned()
|
||||
{
|
||||
UIState* ptr = UIState.Instance();
|
||||
int num = ((ptr != null) ? (-1349796682) : (-1349796683));
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1349796684;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 2:
|
||||
return ptr->Buddy.CompanionInfo.TimeLeft > 0f;
|
||||
case 1:
|
||||
return false;
|
||||
case 0:
|
||||
goto IL_0063;
|
||||
}
|
||||
continue;
|
||||
IL_0063:
|
||||
num = -1349796683;
|
||||
return false;
|
||||
}
|
||||
return ptr->Buddy.CompanionInfo.TimeLeft > 0f;
|
||||
}
|
||||
|
||||
public unsafe static bool IsCompanionMounted()
|
||||
{
|
||||
UIState* ptr = UIState.Instance();
|
||||
int num = ((ptr != null) ? (-1440023216) : (-1440023213));
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1440023215;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0049;
|
||||
case 1:
|
||||
return ptr->Buddy.CompanionInfo.Mounted;
|
||||
case 2:
|
||||
return false;
|
||||
}
|
||||
continue;
|
||||
IL_0049:
|
||||
num = -1440023213;
|
||||
return false;
|
||||
}
|
||||
return ptr->Buddy.CompanionInfo.Mounted;
|
||||
}
|
||||
|
||||
public unsafe static string GetCompanionName()
|
||||
{
|
||||
UIState* ptr = UIState.Instance();
|
||||
int num = ((ptr != null) ? 1483608628 : 1483608631);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1483608630;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
goto IL_004b;
|
||||
case 2:
|
||||
return ptr->Buddy.CompanionInfo.NameString;
|
||||
case 1:
|
||||
return string.Empty;
|
||||
}
|
||||
continue;
|
||||
IL_004b:
|
||||
num = 1483608631;
|
||||
return string.Empty;
|
||||
}
|
||||
return ptr->Buddy.CompanionInfo.NameString;
|
||||
}
|
||||
|
||||
public unsafe static byte GetCompanionColorStainId()
|
||||
{
|
||||
UIState* ptr = UIState.Instance();
|
||||
int num = ((ptr != null) ? 345206792 : 345206793);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 345206792;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
return ptr->Buddy.CompanionInfo.CurrentColorStainId;
|
||||
case 1:
|
||||
return 0;
|
||||
case 2:
|
||||
goto IL_005c;
|
||||
}
|
||||
continue;
|
||||
IL_005c:
|
||||
num = 345206793;
|
||||
return 0;
|
||||
}
|
||||
return ptr->Buddy.CompanionInfo.CurrentColorStainId;
|
||||
}
|
||||
|
||||
public unsafe static byte GetCompanionRank()
|
||||
{
|
||||
UIState* ptr = UIState.Instance();
|
||||
int num = ((ptr != null) ? 424961589 : 424961588);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 424961589;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
return ptr->Buddy.CompanionInfo.Rank;
|
||||
case 1:
|
||||
return 0;
|
||||
case 2:
|
||||
goto IL_005c;
|
||||
}
|
||||
continue;
|
||||
IL_005c:
|
||||
num = 424961588;
|
||||
return 0;
|
||||
}
|
||||
return ptr->Buddy.CompanionInfo.Rank;
|
||||
}
|
||||
|
||||
public unsafe static uint GetCompanionCurrentXP()
|
||||
{
|
||||
UIState* ptr = UIState.Instance();
|
||||
int num = ((ptr != null) ? (-7933264) : (-7933261));
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -7933262;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 2:
|
||||
return ptr->Buddy.CompanionInfo.CurrentXP;
|
||||
case 1:
|
||||
return 0u;
|
||||
case 0:
|
||||
goto IL_005c;
|
||||
}
|
||||
continue;
|
||||
IL_005c:
|
||||
num = -7933261;
|
||||
return 0u;
|
||||
}
|
||||
return ptr->Buddy.CompanionInfo.CurrentXP;
|
||||
}
|
||||
|
||||
public unsafe static byte GetCompanionStars()
|
||||
{
|
||||
UIState* ptr = UIState.Instance();
|
||||
int num = ((ptr != null) ? 1600521884 : 1600521887);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1600521885;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0049;
|
||||
case 2:
|
||||
return 0;
|
||||
case 1:
|
||||
return ptr->Buddy.CompanionInfo.Stars;
|
||||
}
|
||||
continue;
|
||||
IL_0049:
|
||||
num = 1600521887;
|
||||
return 0;
|
||||
}
|
||||
return ptr->Buddy.CompanionInfo.Stars;
|
||||
}
|
||||
|
||||
public unsafe static byte GetCompanionSkillPoints()
|
||||
{
|
||||
UIState* ptr = UIState.Instance();
|
||||
int num = ((ptr != null) ? 624298941 : 624298942);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 624298940;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 1:
|
||||
return ptr->Buddy.CompanionInfo.SkillPoints;
|
||||
case 2:
|
||||
return 0;
|
||||
case 0:
|
||||
goto IL_005c;
|
||||
}
|
||||
continue;
|
||||
IL_005c:
|
||||
num = 624298942;
|
||||
return 0;
|
||||
}
|
||||
return ptr->Buddy.CompanionInfo.SkillPoints;
|
||||
}
|
||||
|
||||
public unsafe static byte GetDefenderLevel()
|
||||
{
|
||||
UIState* ptr = UIState.Instance();
|
||||
int num = ((ptr != null) ? (-1160271461) : (-1160271462));
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1160271461;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 2:
|
||||
goto IL_004c;
|
||||
case 1:
|
||||
return 0;
|
||||
case 0:
|
||||
return ptr->Buddy.CompanionInfo.Levels[0];
|
||||
}
|
||||
continue;
|
||||
IL_004c:
|
||||
num = -1160271462;
|
||||
return 0;
|
||||
}
|
||||
return ptr->Buddy.CompanionInfo.Levels[0];
|
||||
}
|
||||
|
||||
public unsafe static byte GetAttackerLevel()
|
||||
{
|
||||
UIState* ptr = UIState.Instance();
|
||||
int num = ((ptr != null) ? 35779603 : 35779600);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 35779602;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_004c;
|
||||
case 1:
|
||||
return ptr->Buddy.CompanionInfo.Levels[1];
|
||||
case 2:
|
||||
return 0;
|
||||
}
|
||||
continue;
|
||||
IL_004c:
|
||||
num = 35779600;
|
||||
return 0;
|
||||
}
|
||||
return ptr->Buddy.CompanionInfo.Levels[1];
|
||||
}
|
||||
|
||||
public unsafe static byte GetHealerLevel()
|
||||
{
|
||||
UIState* ptr = UIState.Instance();
|
||||
int num = ((ptr != null) ? (-1648020324) : (-1648020321));
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1648020323;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 1:
|
||||
return ptr->Buddy.CompanionInfo.Levels[2];
|
||||
case 2:
|
||||
return 0;
|
||||
case 0:
|
||||
goto IL_006b;
|
||||
}
|
||||
continue;
|
||||
IL_006b:
|
||||
num = -1648020321;
|
||||
return 0;
|
||||
}
|
||||
return ptr->Buddy.CompanionInfo.Levels[2];
|
||||
}
|
||||
|
||||
public unsafe static (byte Head, byte Chest, byte Feet) GetEquippedBardingIds()
|
||||
{
|
||||
UIState* ptr = UIState.Instance();
|
||||
int num = ((ptr != null) ? (-214194545) : (-214194548));
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -214194546;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_004c;
|
||||
case 1:
|
||||
{
|
||||
Span<byte> buddyEquipRowIds = ptr->Buddy.CompanionInfo.BuddyEquipRowIds;
|
||||
return (Head: buddyEquipRowIds[0], Chest: buddyEquipRowIds[1], Feet: buddyEquipRowIds[2]);
|
||||
}
|
||||
case 2:
|
||||
return (Head: 0, Chest: 0, Feet: 0);
|
||||
}
|
||||
continue;
|
||||
IL_004c:
|
||||
num = -214194548;
|
||||
return (Head: 0, Chest: 0, Feet: 0);
|
||||
}
|
||||
Span<byte> buddyEquipRowIds = ptr->Buddy.CompanionInfo.BuddyEquipRowIds;
|
||||
return (Head: buddyEquipRowIds[0], Chest: buddyEquipRowIds[1], Feet: buddyEquipRowIds[2]);
|
||||
}
|
||||
|
||||
public unsafe static bool IsBardingUnlocked(uint bardingId)
|
||||
{
|
||||
UIState* ptr = UIState.Instance();
|
||||
int num = ((ptr == null) ? 1179942104 : 1179942107);
|
||||
while (true)
|
||||
if (ptr != null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1179942105;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
goto IL_004b;
|
||||
case 2:
|
||||
return ptr->Buddy.CompanionInfo.IsBuddyEquipUnlocked(bardingId);
|
||||
case 1:
|
||||
return false;
|
||||
}
|
||||
continue;
|
||||
IL_004b:
|
||||
num = 1179942107;
|
||||
return ptr->Buddy.CompanionInfo.IsBuddyEquipUnlocked(bardingId);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public unsafe static byte GetActiveCommand()
|
||||
{
|
||||
UIState* ptr = UIState.Instance();
|
||||
int num = ((ptr != null) ? 360275929 : 360275930);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 360275928;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 1:
|
||||
return ptr->Buddy.CompanionInfo.ActiveCommand;
|
||||
case 2:
|
||||
return 0;
|
||||
case 0:
|
||||
goto IL_005c;
|
||||
}
|
||||
continue;
|
||||
IL_005c:
|
||||
num = 360275930;
|
||||
return 0;
|
||||
}
|
||||
return ptr->Buddy.CompanionInfo.ActiveCommand;
|
||||
}
|
||||
|
||||
public unsafe static byte GetFavoriteFeed()
|
||||
{
|
||||
UIState* ptr = UIState.Instance();
|
||||
int num = ((ptr != null) ? 816585553 : 816585552);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 816585553;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
return ptr->Buddy.CompanionInfo.FavoriteFeed;
|
||||
case 1:
|
||||
return 0;
|
||||
case 2:
|
||||
goto IL_005e;
|
||||
}
|
||||
continue;
|
||||
IL_005e:
|
||||
num = 816585552;
|
||||
return 0;
|
||||
}
|
||||
return ptr->Buddy.CompanionInfo.FavoriteFeed;
|
||||
}
|
||||
|
||||
public unsafe static bool IsPetSummoned()
|
||||
{
|
||||
UIState* ptr = UIState.Instance();
|
||||
int num = ((ptr != null) ? 318028987 : 318028984);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 318028985;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 2:
|
||||
num = ((ptr->Buddy.PetInfo.Pet == null) ? 318028985 : 318028986);
|
||||
break;
|
||||
case 3:
|
||||
return ptr->Buddy.PetInfo.Pet->EntityId != 0;
|
||||
case 0:
|
||||
return false;
|
||||
case 1:
|
||||
return false;
|
||||
case 4:
|
||||
num = 318028984;
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (ptr->Buddy.PetInfo.Pet != null)
|
||||
{
|
||||
return ptr->Buddy.PetInfo.Pet->EntityId != 0;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public unsafe static byte GetPetOrder()
|
||||
{
|
||||
UIState* ptr = UIState.Instance();
|
||||
int num = ((ptr != null) ? (-105624424) : (-105624421));
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -105624422;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0049;
|
||||
case 1:
|
||||
return 0;
|
||||
case 2:
|
||||
return ptr->Buddy.PetInfo.Order;
|
||||
}
|
||||
continue;
|
||||
IL_0049:
|
||||
num = -105624421;
|
||||
return 0;
|
||||
}
|
||||
return ptr->Buddy.PetInfo.Order;
|
||||
}
|
||||
|
||||
public unsafe static byte GetPetStance()
|
||||
{
|
||||
UIState* ptr = UIState.Instance();
|
||||
int num = ((ptr != null) ? 25937805 : 25937806);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 25937807;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0049;
|
||||
case 2:
|
||||
return ptr->Buddy.PetInfo.Stance;
|
||||
case 1:
|
||||
return 0;
|
||||
}
|
||||
continue;
|
||||
IL_0049:
|
||||
num = 25937806;
|
||||
return 0;
|
||||
}
|
||||
return ptr->Buddy.PetInfo.Stance;
|
||||
}
|
||||
|
||||
public unsafe static bool IsBattleBuddyPresent()
|
||||
{
|
||||
UIState* ptr = UIState.Instance();
|
||||
int num = ((ptr != null) ? (-506116548) : (-506116552));
|
||||
int num7 = default(int);
|
||||
Span<FFXIVClientStructs.FFXIV.Client.Game.UI.Buddy.BuddyMember> battleBuddies = default(Span<FFXIVClientStructs.FFXIV.Client.Game.UI.Buddy.BuddyMember>);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -506116551;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
return false;
|
||||
}
|
||||
Span<FFXIVClientStructs.FFXIV.Client.Game.UI.Buddy.BuddyMember> battleBuddies = ptr->Buddy.BattleBuddies;
|
||||
for (int i = 0; i < battleBuddies.Length; i++)
|
||||
{
|
||||
if (battleBuddies[i].EntityId != 0)
|
||||
{
|
||||
case 3:
|
||||
return true;
|
||||
case 6:
|
||||
{
|
||||
int num8 = num7;
|
||||
num3 = 1;
|
||||
num4 = num8;
|
||||
num7 = (num4 | num3) + (num4 & num3);
|
||||
num = -506116546;
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
num = ((battleBuddies[num7].EntityId == 0) ? (-506116545) : (-506116550));
|
||||
break;
|
||||
case 1:
|
||||
return false;
|
||||
case 2:
|
||||
num = -506116552;
|
||||
break;
|
||||
case 7:
|
||||
num = ((num7 < battleBuddies.Length) ? (-506116551) : (-506116547));
|
||||
break;
|
||||
case 4:
|
||||
return false;
|
||||
case 5:
|
||||
battleBuddies = ptr->Buddy.BattleBuddies;
|
||||
num7 = 0;
|
||||
num = -506116546;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public unsafe static bool HasDutyHelpers()
|
||||
{
|
||||
UIState* ptr = UIState.Instance();
|
||||
int num = ((ptr != null) ? 132041618 : 132041619);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 132041618;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 2:
|
||||
goto IL_0049;
|
||||
case 1:
|
||||
return false;
|
||||
case 0:
|
||||
return ptr->Buddy.DutyHelperInfo.HasHelpers;
|
||||
}
|
||||
continue;
|
||||
IL_0049:
|
||||
num = 132041619;
|
||||
return false;
|
||||
}
|
||||
return ptr->Buddy.DutyHelperInfo.HasHelpers;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Dalamud.Plugin;
|
||||
using Dalamud.Plugin.Ipc;
|
||||
using Dalamud.Plugin.Ipc.Exceptions;
|
||||
|
|
@ -21,218 +19,73 @@ public sealed class PluginFeaturePauser : IDisposable
|
|||
|
||||
public bool IsPaused => _pausedFeatures != null;
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public PluginFeaturePauser(IDalamudPluginInterface pluginInterface, string getEnabledEndpoint, string setEnabledEndpoint, ILogger logger)
|
||||
{
|
||||
_200B_202A_202E_202D_200B_202D_206D_206F_202A_206D_206C_200C_206E_206F_206F_206A_206B_202D_200B_202B_206E_206D_202D_202D_202B_202E_206E_206A_202D_206C_200D_200B_206A_206E_200C_206F_206A_206F_206D_206F_202E((object)pluginInterface, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(766607579));
|
||||
_202B_206D_202B_206C_200E_202A_206D_206D_206F_200D_202D_206A_202C_206E_200C_206B_206C_202D_206F_200D_206F_206E_200B_206E_206E_200D_200F_206F_202D_200B_200C_202C_200C_206B_202D_206E_206C_202C_200F_206C_202E(getEnabledEndpoint, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(1664369552));
|
||||
_202B_206D_202B_206C_200E_202A_206D_206D_206F_200D_202D_206A_202C_206E_200C_206B_206C_202D_206F_200D_206F_206E_200B_206E_206E_200D_200F_206F_202D_200B_200C_202C_200C_206B_202D_206E_206C_202C_200F_206C_202E(setEnabledEndpoint, global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(1390048610));
|
||||
_200B_202A_202E_202D_200B_202D_206D_206F_202A_206D_206C_200C_206E_206F_206F_206A_206B_202D_200B_202B_206E_206D_202D_202D_202B_202E_206E_206A_202D_206C_200D_200B_206A_206E_200C_206F_206A_206F_206D_206F_202E((object)logger, global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(1584978576));
|
||||
ArgumentNullException.ThrowIfNull(pluginInterface, "pluginInterface");
|
||||
ArgumentException.ThrowIfNullOrEmpty(getEnabledEndpoint, "getEnabledEndpoint");
|
||||
ArgumentException.ThrowIfNullOrEmpty(setEnabledEndpoint, "setEnabledEndpoint");
|
||||
ArgumentNullException.ThrowIfNull(logger, "logger");
|
||||
_getEnabled = pluginInterface.GetIpcSubscriber<string, bool?>(getEnabledEndpoint);
|
||||
_setEnabled = pluginInterface.GetIpcSubscriber<string, bool, object>(setEnabledEndpoint);
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public void Disable(IEnumerable<string> features)
|
||||
{
|
||||
int num = ((_pausedFeatures != null) ? (-124220902) : (-124220903));
|
||||
while (true)
|
||||
if (_pausedFeatures == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -124220901;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
_pausedFeatures = new HashSet<string>();
|
||||
}
|
||||
foreach (string feature in features)
|
||||
{
|
||||
if (_pausedFeatures.Contains(feature))
|
||||
{
|
||||
case 0:
|
||||
num = -124220903;
|
||||
break;
|
||||
case 2:
|
||||
_pausedFeatures = new HashSet<string>();
|
||||
num = -124220902;
|
||||
break;
|
||||
case 1:
|
||||
continue;
|
||||
}
|
||||
try
|
||||
{
|
||||
IEnumerator<string> enumerator = features.GetEnumerator();
|
||||
try
|
||||
if (_getEnabled.InvokeFunc(feature) == true)
|
||||
{
|
||||
while (_200B_200C_206B_200F_200D_206E_202E_206E_202B_200D_202D_206C_206F_200D_200C_206E_206E_206A_202B_200E_202A_202A_200F_200D_202A_200D_202C_206B_200C_202D_200D_200F_202E_202B_200B_202E_206E_202C_200F_206F_202E((IEnumerator)enumerator))
|
||||
{
|
||||
string current = enumerator.Current;
|
||||
if (_pausedFeatures.Contains(current))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
try
|
||||
{
|
||||
num = ((_getEnabled.InvokeFunc(current) != true) ? 879033807 : 879033804);
|
||||
while (true)
|
||||
{
|
||||
int num5 = num;
|
||||
num3 = 879033805;
|
||||
num4 = num5;
|
||||
int num6 = num4 + num3;
|
||||
int num7 = num4 & num3;
|
||||
switch (num6 - (num7 + num7))
|
||||
{
|
||||
case 0:
|
||||
num = 879033804;
|
||||
break;
|
||||
case 1:
|
||||
_setEnabled.InvokeAction(current, arg2: false);
|
||||
_pausedFeatures.Add(current);
|
||||
_200E_202B_202C_200F_202C_202B_200C_206D_202E_202E_200B_206B_206A_202E_200E_202D_202E_200C_206C_202D_202E_202D_200C_200D_206F_202E_200C_202E_206C_206C_200E_202B_200D_206A_202A_206B_202C_206C_200E_202E(_logger, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(-2022871407), new object[1] { current });
|
||||
num = 879033807;
|
||||
break;
|
||||
case 2:
|
||||
goto end_IL_00c8;
|
||||
}
|
||||
continue;
|
||||
end_IL_00c8:
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
num = ((ex is IpcError) ? 285871159 : 285871156);
|
||||
while (true)
|
||||
{
|
||||
int num8 = num;
|
||||
num3 = 285871157;
|
||||
num4 = num8;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
num = 285871156;
|
||||
break;
|
||||
case 1:
|
||||
_200C_200F_202D_202D_202E_206E_202B_200F_206F_202B_202A_206C_200F_200C_206E_206F_206C_202E_202B_206F_202C_206A_206F_200C_200D_206D_206B_206D_206C_202B_202E_202E_206E_206F_206A_200D_200C_206D_206F_202D_202E(_logger, ex, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(-578647561), new object[1] { current });
|
||||
num = 285871159;
|
||||
break;
|
||||
case 2:
|
||||
goto end_IL_0170;
|
||||
}
|
||||
continue;
|
||||
end_IL_0170:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
finally
|
||||
{
|
||||
num = ((enumerator == null) ? 1678269636 : 1678269639);
|
||||
while (true)
|
||||
{
|
||||
int num9 = num;
|
||||
num3 = 1678269637;
|
||||
num4 = num9;
|
||||
int num10 = num4 + num3;
|
||||
int num11 = num4 & num3;
|
||||
switch (num10 - (num11 + num11))
|
||||
{
|
||||
case 1:
|
||||
goto end_IL_0207;
|
||||
case 2:
|
||||
_206D_200B_200D_200B_206C_206B_202D_202B_202E_200E_206B_202D_202A_200D_206A_200B_206F_206D_206B_202C_206A_200E_202B_206B_202C_202A_206A_200F_200E_200B_202C_206B_206F_200B_200D_202C_200B_206F_206B_202E((IDisposable)enumerator);
|
||||
num = 1678269636;
|
||||
break;
|
||||
case 0:
|
||||
num = 1678269639;
|
||||
break;
|
||||
}
|
||||
continue;
|
||||
end_IL_0207:
|
||||
break;
|
||||
}
|
||||
_setEnabled.InvokeAction(feature, arg2: false);
|
||||
_pausedFeatures.Add(feature);
|
||||
_logger.LogInformation("Paused external feature: {Feature}", feature);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (!(ex is IpcError))
|
||||
{
|
||||
_logger.LogWarning(ex, "Failed to pause external feature {Feature}", feature);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public void Restore()
|
||||
{
|
||||
int num = ((_pausedFeatures != null) ? (-1219556396) : (-1219556395));
|
||||
while (true)
|
||||
if (_pausedFeatures == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1219556396;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 2:
|
||||
goto IL_0051;
|
||||
case 1:
|
||||
return;
|
||||
case 0:
|
||||
{
|
||||
HashSet<string> hashSet = new HashSet<string>();
|
||||
foreach (string pausedFeature in _pausedFeatures)
|
||||
{
|
||||
try
|
||||
{
|
||||
_setEnabled.InvokeAction(pausedFeature, arg2: true);
|
||||
_200E_202B_202C_200F_202C_202B_200C_206D_202E_202E_200B_206B_206A_202E_200E_202D_202E_200C_206C_202D_202E_202D_200C_200D_206F_202E_200C_202E_206C_206C_200E_202B_200D_206A_202A_206B_202C_206C_200E_202E(_logger, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(1936594651), new object[1] { pausedFeature });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
hashSet.Add(pausedFeature);
|
||||
_200C_200F_202D_202D_202E_206E_202B_200F_206F_202B_202A_206C_200F_200C_206E_206F_206C_202E_202B_206F_202C_206A_206F_200C_200D_206D_206B_206D_206C_202B_202E_202E_206E_206F_206A_200D_200C_206D_206F_202D_202E(_logger, ex, global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(902723695), new object[1] { pausedFeature });
|
||||
}
|
||||
}
|
||||
_pausedFeatures = ((hashSet.Count == 0) ? null : hashSet);
|
||||
return;
|
||||
}
|
||||
}
|
||||
continue;
|
||||
IL_0051:
|
||||
num = -1219556395;
|
||||
return;
|
||||
}
|
||||
HashSet<string> hashSet = new HashSet<string>();
|
||||
foreach (string pausedFeature in _pausedFeatures)
|
||||
{
|
||||
try
|
||||
{
|
||||
_setEnabled.InvokeAction(pausedFeature, arg2: true);
|
||||
_logger.LogInformation("Restored external feature: {Feature}", pausedFeature);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
hashSet.Add(pausedFeature);
|
||||
_logger.LogWarning(exception, "Failed to restore external feature {Feature}, keeping it for retry", pausedFeature);
|
||||
}
|
||||
}
|
||||
_pausedFeatures = ((hashSet.Count == 0) ? null : hashSet);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Restore();
|
||||
}
|
||||
|
||||
void IDisposable.Dispose()
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in Dispose
|
||||
this.Dispose();
|
||||
}
|
||||
|
||||
static void _200B_202A_202E_202D_200B_202D_206D_206F_202A_206D_206C_200C_206E_206F_206F_206A_206B_202D_200B_202B_206E_206D_202D_202D_202B_202E_206E_206A_202D_206C_200D_200B_206A_206E_200C_206F_206A_206F_206D_206F_202E(object P_0, string P_1)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(P_0, P_1);
|
||||
}
|
||||
|
||||
static void _202B_206D_202B_206C_200E_202A_206D_206D_206F_200D_202D_206A_202C_206E_200C_206B_206C_202D_206F_200D_206F_206E_200B_206E_206E_200D_200F_206F_202D_200B_200C_202C_200C_206B_202D_206E_206C_202C_200F_206C_202E(string P_0, string P_1)
|
||||
{
|
||||
ArgumentException.ThrowIfNullOrEmpty(P_0, P_1);
|
||||
}
|
||||
|
||||
static void _200E_202B_202C_200F_202C_202B_200C_206D_202E_202E_200B_206B_206A_202E_200E_202D_202E_200C_206C_202D_202E_202D_200C_200D_206F_202E_200C_202E_206C_206C_200E_202B_200D_206A_202A_206B_202C_206C_200E_202E(ILogger P_0, string P_1, object[] P_2)
|
||||
{
|
||||
P_0.LogInformation(P_1, P_2);
|
||||
}
|
||||
|
||||
static void _200C_200F_202D_202D_202E_206E_202B_200F_206F_202B_202A_206C_200F_200C_206E_206F_206C_202E_202B_206F_202C_206A_206F_200C_200D_206D_206B_206D_206C_202B_202E_202E_206E_206F_206A_200D_200C_206D_206F_202D_202E(ILogger P_0, Exception P_1, string P_2, object[] P_3)
|
||||
{
|
||||
P_0.LogWarning(P_1, P_2, P_3);
|
||||
}
|
||||
|
||||
static bool _200B_200C_206B_200F_200D_206E_202E_206E_202B_200D_202D_206C_206F_200D_200C_206E_206E_206A_202B_200E_202A_202A_200F_200D_202A_200D_202C_206B_200C_202D_200D_200F_202E_202B_200B_202E_206E_202C_200F_206F_202E(IEnumerator P_0)
|
||||
{
|
||||
return P_0.MoveNext();
|
||||
}
|
||||
|
||||
static void _206D_200B_200D_200B_206C_206B_202D_202B_202E_200E_206B_202D_202A_200D_206A_200B_206F_206D_206B_202C_206A_200E_202B_206B_202C_202A_206A_200F_200E_200B_202C_206B_206F_200B_200D_202C_200B_206F_206B_202E(IDisposable P_0)
|
||||
{
|
||||
P_0.Dispose();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,255 +19,116 @@ public static class WaterSurfaceDetector
|
|||
|
||||
public static (float Rotation, Vector3 HitPoint)? FindFishableRotation(Vector3 position, int searchSteps = 36)
|
||||
{
|
||||
float num = MathF.PI * 2f / (float)searchSteps;
|
||||
float num = (float)Math.PI * 2f / (float)searchSteps;
|
||||
List<int> list = new List<int>();
|
||||
int num2 = 0;
|
||||
int num3 = -766816580;
|
||||
Vector3? hitPoint = default(Vector3?);
|
||||
float num9 = default(float);
|
||||
while (true)
|
||||
for (int i = 0; i < searchSteps; i++)
|
||||
{
|
||||
int num4 = num3;
|
||||
int num5 = -766816580;
|
||||
int num6 = num4;
|
||||
int num7 = num6 + num5;
|
||||
int num8 = num6 & num5;
|
||||
switch (num7 - (num8 + num8))
|
||||
float rotation = (float)i * num;
|
||||
if (CheckFishableAtRotation(position, rotation, out var _))
|
||||
{
|
||||
case 3:
|
||||
return null;
|
||||
case 0:
|
||||
num3 = ((num2 < searchSteps) ? (-766816579) : (-766816582));
|
||||
break;
|
||||
case 9:
|
||||
num3 = ((!hitPoint.HasValue) ? (-766816584) : (-766816588));
|
||||
break;
|
||||
case 1:
|
||||
{
|
||||
float rotation = (float)num2 * num;
|
||||
num3 = ((!CheckFishableAtRotation(position, rotation, out var _)) ? (-766816578) : (-766816583));
|
||||
break;
|
||||
}
|
||||
case 8:
|
||||
return (num9, hitPoint.Value);
|
||||
case 6:
|
||||
num3 = ((list.Count != 0) ? (-766816581) : (-766816577));
|
||||
break;
|
||||
case 4:
|
||||
return null;
|
||||
case 2:
|
||||
{
|
||||
int num10 = num2;
|
||||
num5 = 1;
|
||||
num6 = num10;
|
||||
num2 = (num6 | num5) + (num6 & num5);
|
||||
num3 = -766816580;
|
||||
break;
|
||||
}
|
||||
case 5:
|
||||
list.Add(num2);
|
||||
num3 = -766816578;
|
||||
break;
|
||||
case 7:
|
||||
{
|
||||
List<int> list2 = (from g in FindContiguousGroups(list, searchSteps)
|
||||
orderby g.Count descending
|
||||
select g).First();
|
||||
num9 = ((float)list2[0] + (float)(list2.Count - 1) / 2f) % (float)searchSteps * num;
|
||||
num3 = ((!CheckFishableAtRotation(position, num9, out hitPoint)) ? (-766816584) : (-766816587));
|
||||
break;
|
||||
}
|
||||
case 10:
|
||||
num3 = -766816580;
|
||||
break;
|
||||
list.Add(i);
|
||||
}
|
||||
}
|
||||
if (list.Count == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
List<int> list2 = (from g in FindContiguousGroups(list, searchSteps)
|
||||
orderby g.Count descending
|
||||
select g).First();
|
||||
float num2 = ((float)list2[0] + (float)(list2.Count - 1) / 2f) % (float)searchSteps * num;
|
||||
if (CheckFishableAtRotation(position, num2, out var hitPoint2) && hitPoint2.HasValue)
|
||||
{
|
||||
return (num2, hitPoint2.Value);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private unsafe static bool CheckFishableAtRotation(Vector3 position, float rotation, out Vector3? hitPoint)
|
||||
{
|
||||
hitPoint = null;
|
||||
Framework* ptr = Framework.Instance();
|
||||
int num = ((ptr == null) ? (-9575683) : (-9575687));
|
||||
BGCollisionModule* bGCollisionModule = default(BGCollisionModule*);
|
||||
Matrix4x4 matrix = default(Matrix4x4);
|
||||
Vector3 vector3 = default(Vector3);
|
||||
RaycastHit raycastHit2 = default(RaycastHit);
|
||||
RaycastHit raycastHit = default(RaycastHit);
|
||||
while (true)
|
||||
if (ptr == null || ptr->BGCollisionModule == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -9575688;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
ReadOnlySpan<int> readOnlySpan;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
bGCollisionModule = ptr->BGCollisionModule;
|
||||
float num8 = _200B_202E_206E_202C_202E_202E_202E_200D_206A_202D_206E_206B_202C_206E_202E_206D_206D_200E_206B_202B_202D_202E_206D_202A_206F_200E_202C_206A_206F_206A_202C_200B_200F_206F_206A_202E_202E_206F_200F_202B_202E(rotation);
|
||||
float num9 = _202A_206D_202E_200E_200F_202D_206D_202A_206C_206C_206A_200D_206B_206E_206D_200E_206B_202B_206F_206F_206E_206D_206B_202B_200E_200D_206F_202B_206E_202E_206F_200D_202E_202D_206A_202B_200F_206C_202D_206F_202E(rotation);
|
||||
matrix = new Matrix4x4
|
||||
{
|
||||
M11 = num8,
|
||||
M13 = 0f - num9,
|
||||
M22 = 1f,
|
||||
M31 = num9,
|
||||
M33 = num8
|
||||
};
|
||||
vector3 = Vector3.Transform(new Vector3(0f, 0f, 2f), matrix) + position;
|
||||
vector3.Y += 2f;
|
||||
Vector3 vector4 = new Vector3(position.X, position.Y + 0.87f, position.Z);
|
||||
Vector3 vector5 = Vector3.Normalize(vector3 - vector4);
|
||||
float maxDistance = Vector3.Distance(vector4, vector3);
|
||||
byte* intPtr2 = stackalloc byte[16];
|
||||
readOnlySpan = new int[4] { 16384, 0, 16384, 0 };
|
||||
// IL cpblk instruction
|
||||
Unsafe.CopyBlockUnaligned(intPtr2, ref readOnlySpan[0], 16);
|
||||
int* flags2 = (int*)intPtr2;
|
||||
num = ((!bGCollisionModule->RaycastMaterialFilter(&raycastHit2, &vector4, &vector5, maxDistance, 1, flags2)) ? (-9575686) : (-9575681));
|
||||
break;
|
||||
}
|
||||
case 5:
|
||||
return false;
|
||||
case 1:
|
||||
num = ((ptr->BGCollisionModule != null) ? (-9575688) : (-9575683));
|
||||
break;
|
||||
case 6:
|
||||
num = -9575687;
|
||||
break;
|
||||
case 7:
|
||||
return false;
|
||||
case 4:
|
||||
hitPoint = raycastHit.Point;
|
||||
return true;
|
||||
case 3:
|
||||
return false;
|
||||
case 2:
|
||||
{
|
||||
Vector3 vector = Vector3.Transform(new Vector3(0f, -80f, 40f), matrix);
|
||||
float num7 = vector.Length();
|
||||
Vector3 vector2 = vector / num7;
|
||||
byte* intPtr = stackalloc byte[16];
|
||||
readOnlySpan = new int[4] { 32768, 0, 32768, 0 };
|
||||
// IL cpblk instruction
|
||||
Unsafe.CopyBlockUnaligned(intPtr, ref readOnlySpan[0], 16);
|
||||
int* flags = (int*)intPtr;
|
||||
num = ((!bGCollisionModule->RaycastMaterialFilter(&raycastHit, &vector3, &vector2, num7, 1, flags)) ? (-9575685) : (-9575684));
|
||||
break;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
BGCollisionModule* bGCollisionModule = ptr->BGCollisionModule;
|
||||
float num = MathF.Cos(rotation);
|
||||
float num2 = MathF.Sin(rotation);
|
||||
Matrix4x4 matrix = new Matrix4x4
|
||||
{
|
||||
M11 = num,
|
||||
M13 = 0f - num2,
|
||||
M22 = 1f,
|
||||
M31 = num2,
|
||||
M33 = num
|
||||
};
|
||||
Vector3 vector = Vector3.Transform(new Vector3(0f, 0f, 2f), matrix) + position;
|
||||
vector.Y += 2f;
|
||||
Vector3 vector2 = new Vector3(position.X, position.Y + 0.87f, position.Z);
|
||||
Vector3 vector3 = Vector3.Normalize(vector - vector2);
|
||||
float maxDistance = Vector3.Distance(vector2, vector);
|
||||
byte* intPtr = stackalloc byte[16];
|
||||
ReadOnlySpan<int> readOnlySpan = new int[4] { 16384, 0, 16384, 0 };
|
||||
// IL cpblk instruction
|
||||
Unsafe.CopyBlockUnaligned(intPtr, ref readOnlySpan[0], 16);
|
||||
int* flags = (int*)intPtr;
|
||||
RaycastHit raycastHit = default(RaycastHit);
|
||||
if (bGCollisionModule->RaycastMaterialFilter(&raycastHit, &vector2, &vector3, maxDistance, 1, flags))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
Vector3 vector4 = Vector3.Transform(new Vector3(0f, -80f, 40f), matrix);
|
||||
float num3 = vector4.Length();
|
||||
Vector3 vector5 = vector4 / num3;
|
||||
byte* intPtr2 = stackalloc byte[16];
|
||||
readOnlySpan = new int[4] { 32768, 0, 32768, 0 };
|
||||
// IL cpblk instruction
|
||||
Unsafe.CopyBlockUnaligned(intPtr2, ref readOnlySpan[0], 16);
|
||||
int* flags2 = (int*)intPtr2;
|
||||
RaycastHit raycastHit2 = default(RaycastHit);
|
||||
if (bGCollisionModule->RaycastMaterialFilter(&raycastHit2, &vector, &vector5, num3, 1, flags2))
|
||||
{
|
||||
hitPoint = raycastHit2.Point;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private static List<List<int>> FindContiguousGroups(List<int> angles, int maxSteps)
|
||||
{
|
||||
int num = ((angles.Count != 0) ? 1779780775 : 1779780774);
|
||||
List<int> list3 = default(List<int>);
|
||||
List<int> list5 = default(List<int>);
|
||||
int num8 = default(int);
|
||||
List<List<int>> list2 = default(List<List<int>>);
|
||||
while (true)
|
||||
if (angles.Count == 0)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1779780780;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
return new List<List<int>>();
|
||||
}
|
||||
List<int> list = angles.OrderBy((int a) => a).ToList();
|
||||
List<List<int>> list2 = new List<List<int>>();
|
||||
List<int> list3 = new List<int> { list[0] };
|
||||
for (int num = 1; num < list.Count; num++)
|
||||
{
|
||||
if (list[num] - list[num - 1] == 1)
|
||||
{
|
||||
case 4:
|
||||
list3.Add(list5[num8]);
|
||||
num = 1779780783;
|
||||
break;
|
||||
case 6:
|
||||
num = ((list5[0] != 0) ? 1779780777 : 1779780772);
|
||||
break;
|
||||
case 0:
|
||||
{
|
||||
int num12 = list5[num8];
|
||||
List<int> list6 = list5;
|
||||
int num13 = num8;
|
||||
num3 = 1;
|
||||
num4 = num13;
|
||||
num = ((num12 - list6[~(~num4 + num3)] != 1) ? 1779780779 : 1779780776);
|
||||
break;
|
||||
list3.Add(list[num]);
|
||||
continue;
|
||||
}
|
||||
case 1:
|
||||
list2.Add(list3);
|
||||
num = ((list2.Count <= 1) ? 1779780777 : 1779780778);
|
||||
break;
|
||||
case 9:
|
||||
num = ((num8 < list5.Count) ? 1779780780 : 1779780781);
|
||||
break;
|
||||
case 2:
|
||||
num = 1779780774;
|
||||
break;
|
||||
case 8:
|
||||
list2.Add(list3);
|
||||
int num2 = 1;
|
||||
List<int> list4 = new List<int>(num2);
|
||||
CollectionsMarshal.SetCount(list4, num2);
|
||||
CollectionsMarshal.AsSpan(list4)[0] = list[num];
|
||||
list3 = list4;
|
||||
}
|
||||
list2.Add(list3);
|
||||
if (list2.Count > 1 && list[0] == 0)
|
||||
{
|
||||
if (list[list.Count - 1] == maxSteps - 1)
|
||||
{
|
||||
List<int> list7 = list5;
|
||||
int num14 = list7[list7.Count - 1];
|
||||
num3 = 1;
|
||||
num4 = maxSteps;
|
||||
num = ((num14 != ~(~num4 + num3)) ? 1779780777 : 1779780768);
|
||||
break;
|
||||
}
|
||||
case 5:
|
||||
return list2;
|
||||
case 10:
|
||||
return new List<List<int>>();
|
||||
case 11:
|
||||
list5 = angles.OrderBy((int a) => a).ToList();
|
||||
list2 = new List<List<int>>();
|
||||
list3 = new List<int> { list5[0] };
|
||||
num8 = 1;
|
||||
num = 1779780773;
|
||||
break;
|
||||
case 7:
|
||||
{
|
||||
list2.Add(list3);
|
||||
int num11 = 1;
|
||||
List<int> list4 = new List<int>(num11);
|
||||
CollectionsMarshal.SetCount(list4, num11);
|
||||
CollectionsMarshal.AsSpan(list4)[0] = list5[num8];
|
||||
list3 = list4;
|
||||
num = 1779780783;
|
||||
break;
|
||||
}
|
||||
case 12:
|
||||
{
|
||||
List<List<int>> list = list2;
|
||||
List<int> item = list[list.Count - 1].Concat(list2[0]).ToList();
|
||||
List<int> item = list2[list2.Count - 1].Concat(list2[0]).ToList();
|
||||
list2.RemoveAt(list2.Count - 1);
|
||||
list2.RemoveAt(0);
|
||||
list2.Add(item);
|
||||
num = 1779780777;
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
int num7 = num8;
|
||||
num3 = 1;
|
||||
num4 = num7;
|
||||
int num9 = num4 ^ num3;
|
||||
int num10 = num4 & num3;
|
||||
num8 = num9 + (num10 + num10);
|
||||
num = 1779780773;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static float _200B_202E_206E_202C_202E_202E_202E_200D_206A_202D_206E_206B_202C_206E_202E_206D_206D_200E_206B_202B_202D_202E_206D_202A_206F_200E_202C_206A_206F_206A_202C_200B_200F_206F_206A_202E_202E_206F_200F_202B_202E(float P_0)
|
||||
{
|
||||
return MathF.Cos(P_0);
|
||||
}
|
||||
|
||||
static float _202A_206D_202E_200E_200F_202D_206D_202A_206C_206C_206A_200D_206B_206E_206D_200E_206B_202B_206F_206F_206E_206D_206B_202B_200E_200D_206F_202B_206E_202E_206F_200D_202E_202D_206A_202B_200F_206C_202D_206F_202E(float P_0)
|
||||
{
|
||||
return MathF.Sin(P_0);
|
||||
return list2;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,28 +10,15 @@ public static class ClassJobHelper
|
|||
{
|
||||
ClassJob row = dataManager.GetExcelSheet<ClassJob>().GetRow((uint)classJob);
|
||||
ushort num = (ushort)row.UnlockQuest.RowId;
|
||||
int num2 = ((num == 0) ? 1968883418 : 1968883419);
|
||||
while (true)
|
||||
if (num != 0)
|
||||
{
|
||||
int num3 = num2;
|
||||
int num4 = 1968883416;
|
||||
int num5 = num3;
|
||||
switch ((num5 | num4) - (num5 & num4))
|
||||
{
|
||||
case 1:
|
||||
return false;
|
||||
case 3:
|
||||
return QuestManager.IsQuestComplete(num);
|
||||
case 4:
|
||||
return PlayerStateHelper.GetClassJobLevel(row.ExpArrayIndex) > 0;
|
||||
case 2:
|
||||
num2 = ((row.ExpArrayIndex >= 0) ? 1968883420 : 1968883417);
|
||||
break;
|
||||
case 0:
|
||||
num2 = 1968883419;
|
||||
break;
|
||||
}
|
||||
return QuestManager.IsQuestComplete(num);
|
||||
}
|
||||
if (row.ExpArrayIndex < 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return PlayerStateHelper.GetClassJobLevel(row.ExpArrayIndex) > 0;
|
||||
}
|
||||
|
||||
public static bool IsJobUnlocked(EClassJob classJob, IDataManager dataManager)
|
||||
|
|
|
|||
|
|
@ -7,249 +7,78 @@ public static class ConditionHelper
|
|||
{
|
||||
public static bool IsBoundByDuty(ICondition condition)
|
||||
{
|
||||
int num = (_206D_202D_206B_202B_206A_206D_206B_206B_200E_206B_202C_206C_200E_202C_206D_202C_200B_206D_206A_206D_200C_206C_206C_202E_202D_206A_206B_200F_206F_202A_202B_202A_200B_206C_206E_200D_200D_200D_200E_200C_202E(condition, ConditionFlag.BoundByDuty) ? 982422876 : 982422878);
|
||||
while (true)
|
||||
if (!condition[ConditionFlag.BoundByDuty] && !condition[ConditionFlag.BoundByDuty56])
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 982422877;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 2:
|
||||
num = 982422878;
|
||||
break;
|
||||
case 0:
|
||||
return _206D_202D_206B_202B_206A_206D_206B_206B_200E_206B_202C_206C_200E_202C_206D_202C_200B_206D_206A_206D_200C_206C_206C_202E_202D_206A_206B_200F_206F_202A_202B_202A_200B_206C_206E_200D_200D_200D_200E_200C_202E(condition, ConditionFlag.BoundByDuty95);
|
||||
case 1:
|
||||
return true;
|
||||
case 3:
|
||||
num = (_206D_202D_206B_202B_206A_206D_206B_206B_200E_206B_202C_206C_200E_202C_206D_202C_200B_206D_206A_206D_200C_206C_206C_202E_202D_206A_206B_200F_206F_202A_202B_202A_200B_206C_206E_200D_200D_200D_200E_200C_202E(condition, ConditionFlag.BoundByDuty56) ? 982422876 : 982422877);
|
||||
break;
|
||||
}
|
||||
return condition[ConditionFlag.BoundByDuty95];
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static bool IsInCombat(ICondition condition)
|
||||
{
|
||||
return _206D_202D_206B_202B_206A_206D_206B_206B_200E_206B_202C_206C_200E_202C_206D_202C_200B_206D_206A_206D_200C_206C_206C_202E_202D_206A_206B_200F_206F_202A_202B_202A_200B_206C_206E_200D_200D_200D_200E_200C_202E(condition, ConditionFlag.InCombat);
|
||||
return condition[ConditionFlag.InCombat];
|
||||
}
|
||||
|
||||
public static bool IsInCutscene(ICondition condition)
|
||||
{
|
||||
int num = (_206D_202D_206B_202B_206A_206D_206B_206B_200E_206B_202C_206C_200E_202C_206D_202C_200B_206D_206A_206D_200C_206C_206C_202E_202D_206A_206B_200F_206F_202A_202B_202A_200B_206C_206E_200D_200D_200D_200E_200C_202E(condition, ConditionFlag.OccupiedInCutSceneEvent) ? 298384256 : 298384257);
|
||||
while (true)
|
||||
if (!condition[ConditionFlag.OccupiedInCutSceneEvent] && !condition[ConditionFlag.WatchingCutscene])
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 298384256;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 3:
|
||||
num = 298384257;
|
||||
break;
|
||||
case 1:
|
||||
num = (_206D_202D_206B_202B_206A_206D_206B_206B_200E_206B_202C_206C_200E_202C_206D_202C_200B_206D_206A_206D_200C_206C_206C_202E_202D_206A_206B_200F_206F_202A_202B_202A_200B_206C_206E_200D_200D_200D_200E_200C_202E(condition, ConditionFlag.WatchingCutscene) ? 298384256 : 298384258);
|
||||
break;
|
||||
case 0:
|
||||
return true;
|
||||
case 2:
|
||||
return _206D_202D_206B_202B_206A_206D_206B_206B_200E_206B_202C_206C_200E_202C_206D_202C_200B_206D_206A_206D_200C_206C_206C_202E_202D_206A_206B_200F_206F_202A_202B_202A_200B_206C_206E_200D_200D_200D_200E_200C_202E(condition, ConditionFlag.WatchingCutscene78);
|
||||
}
|
||||
return condition[ConditionFlag.WatchingCutscene78];
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static bool IsBetweenAreas(ICondition condition)
|
||||
{
|
||||
int num = (_206D_202D_206B_202B_206A_206D_206B_206B_200E_206B_202C_206C_200E_202C_206D_202C_200B_206D_206A_206D_200C_206C_206C_202E_202D_206A_206B_200F_206F_202A_202B_202A_200B_206C_206E_200D_200D_200D_200E_200C_202E(condition, ConditionFlag.BetweenAreas) ? 617778151 : 617778150);
|
||||
while (true)
|
||||
if (!condition[ConditionFlag.BetweenAreas])
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 617778151;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 2:
|
||||
goto IL_0048;
|
||||
case 0:
|
||||
return true;
|
||||
case 1:
|
||||
return _206D_202D_206B_202B_206A_206D_206B_206B_200E_206B_202C_206C_200E_202C_206D_202C_200B_206D_206A_206D_200C_206C_206C_202E_202D_206A_206B_200F_206F_202A_202B_202A_200B_206C_206E_200D_200D_200D_200E_200C_202E(condition, ConditionFlag.BetweenAreas51);
|
||||
}
|
||||
continue;
|
||||
IL_0048:
|
||||
num = 617778150;
|
||||
return condition[ConditionFlag.BetweenAreas51];
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static bool IsCrafting(ICondition condition)
|
||||
{
|
||||
int num = (_206D_202D_206B_202B_206A_206D_206B_206B_200E_206B_202C_206C_200E_202C_206D_202C_200B_206D_206A_206D_200C_206C_206C_202E_202D_206A_206B_200F_206F_202A_202B_202A_200B_206C_206E_200D_200D_200D_200E_200C_202E(condition, ConditionFlag.Crafting) ? (-531070532) : (-531070529));
|
||||
while (true)
|
||||
if (!condition[ConditionFlag.Crafting] && !condition[ConditionFlag.PreparingToCraft])
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -531070530;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 3:
|
||||
num = -531070529;
|
||||
break;
|
||||
case 2:
|
||||
return true;
|
||||
case 0:
|
||||
return _206D_202D_206B_202B_206A_206D_206B_206B_200E_206B_202C_206C_200E_202C_206D_202C_200B_206D_206A_206D_200C_206C_206C_202E_202D_206A_206B_200F_206F_202A_202B_202A_200B_206C_206E_200D_200D_200D_200E_200C_202E(condition, ConditionFlag.ExecutingCraftingAction);
|
||||
case 1:
|
||||
num = (_206D_202D_206B_202B_206A_206D_206B_206B_200E_206B_202C_206C_200E_202C_206D_202C_200B_206D_206A_206D_200C_206C_206C_202E_202D_206A_206B_200F_206F_202A_202B_202A_200B_206C_206E_200D_200D_200D_200E_200C_202E(condition, ConditionFlag.PreparingToCraft) ? (-531070532) : (-531070530));
|
||||
break;
|
||||
}
|
||||
return condition[ConditionFlag.ExecutingCraftingAction];
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static bool IsGathering(ICondition condition)
|
||||
{
|
||||
int num = (_206D_202D_206B_202B_206A_206D_206B_206B_200E_206B_202C_206C_200E_202C_206D_202C_200B_206D_206A_206D_200C_206C_206C_202E_202D_206A_206B_200F_206F_202A_202B_202A_200B_206C_206E_200D_200D_200D_200E_200C_202E(condition, ConditionFlag.Gathering) ? (-1745581447) : (-1745581446));
|
||||
while (true)
|
||||
if (!condition[ConditionFlag.Gathering])
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1745581448;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0047;
|
||||
case 2:
|
||||
return _206D_202D_206B_202B_206A_206D_206B_206B_200E_206B_202C_206C_200E_202C_206D_202C_200B_206D_206A_206D_200C_206C_206C_202E_202D_206A_206B_200F_206F_202A_202B_202A_200B_206C_206E_200D_200D_200D_200E_200C_202E(condition, ConditionFlag.ExecutingGatheringAction);
|
||||
case 1:
|
||||
return true;
|
||||
}
|
||||
continue;
|
||||
IL_0047:
|
||||
num = -1745581446;
|
||||
return condition[ConditionFlag.ExecutingGatheringAction];
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static bool IsOccupied(ICondition condition)
|
||||
{
|
||||
int num = (_206D_202D_206B_202B_206A_206D_206B_206B_200E_206B_202C_206C_200E_202C_206D_202C_200B_206D_206A_206D_200C_206C_206C_202E_202D_206A_206B_200F_206F_202A_202B_202A_200B_206C_206E_200D_200D_200D_200E_200C_202E(condition, ConditionFlag.Occupied) ? 149420092 : 149420094);
|
||||
while (true)
|
||||
if (!condition[ConditionFlag.Occupied] && !condition[ConditionFlag.Occupied30] && !condition[ConditionFlag.Occupied33] && !condition[ConditionFlag.Occupied38])
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 149420092;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 5:
|
||||
num = 149420094;
|
||||
break;
|
||||
case 4:
|
||||
num = (_206D_202D_206B_202B_206A_206D_206B_206B_200E_206B_202C_206C_200E_202C_206D_202C_200B_206D_206A_206D_200C_206C_206C_202E_202D_206A_206B_200F_206F_202A_202B_202A_200B_206C_206E_200D_200D_200D_200E_200C_202E(condition, ConditionFlag.Occupied38) ? 149420092 : 149420093);
|
||||
break;
|
||||
case 3:
|
||||
num = (_206D_202D_206B_202B_206A_206D_206B_206B_200E_206B_202C_206C_200E_202C_206D_202C_200B_206D_206A_206D_200C_206C_206C_202E_202D_206A_206B_200F_206F_202A_202B_202A_200B_206C_206E_200D_200D_200D_200E_200C_202E(condition, ConditionFlag.Occupied33) ? 149420092 : 149420088);
|
||||
break;
|
||||
case 0:
|
||||
return true;
|
||||
case 2:
|
||||
num = (_206D_202D_206B_202B_206A_206D_206B_206B_200E_206B_202C_206C_200E_202C_206D_202C_200B_206D_206A_206D_200C_206C_206C_202E_202D_206A_206B_200F_206F_202A_202B_202A_200B_206C_206E_200D_200D_200D_200E_200C_202E(condition, ConditionFlag.Occupied30) ? 149420092 : 149420095);
|
||||
break;
|
||||
case 1:
|
||||
return _206D_202D_206B_202B_206A_206D_206B_206B_200E_206B_202C_206C_200E_202C_206D_202C_200B_206D_206A_206D_200C_206C_206C_202E_202D_206A_206B_200F_206F_202A_202B_202A_200B_206C_206E_200D_200D_200D_200E_200C_202E(condition, ConditionFlag.Occupied39);
|
||||
}
|
||||
return condition[ConditionFlag.Occupied39];
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static bool IsLockedIn(ICondition condition)
|
||||
{
|
||||
int num = (IsBoundByDuty(condition) ? 829421731 : 829421732);
|
||||
while (true)
|
||||
if (!IsBoundByDuty(condition) && !IsInCutscene(condition) && !IsBetweenAreas(condition) && !IsOccupied(condition) && !condition[ConditionFlag.Unconscious] && !condition[ConditionFlag.Jumping])
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 829421734;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 1:
|
||||
num = (IsBetweenAreas(condition) ? 829421731 : 829421730);
|
||||
break;
|
||||
case 0:
|
||||
num = (_206D_202D_206B_202B_206A_206D_206B_206B_200E_206B_202C_206C_200E_202C_206D_202C_200B_206D_206A_206D_200C_206C_206C_202E_202D_206A_206B_200F_206F_202A_202B_202A_200B_206C_206E_200D_200D_200D_200E_200C_202E(condition, ConditionFlag.Unconscious) ? 829421731 : 829421733);
|
||||
break;
|
||||
case 4:
|
||||
num = (IsOccupied(condition) ? 829421731 : 829421734);
|
||||
break;
|
||||
case 3:
|
||||
num = (_206D_202D_206B_202B_206A_206D_206B_206B_200E_206B_202C_206C_200E_202C_206D_202C_200B_206D_206A_206D_200C_206C_206C_202E_202D_206A_206B_200F_206F_202A_202B_202A_200B_206C_206E_200D_200D_200D_200E_200C_202E(condition, ConditionFlag.Jumping) ? 829421731 : 829421728);
|
||||
break;
|
||||
case 2:
|
||||
num = (IsInCutscene(condition) ? 829421731 : 829421735);
|
||||
break;
|
||||
case 6:
|
||||
return _206D_202D_206B_202B_206A_206D_206B_206B_200E_206B_202C_206C_200E_202C_206D_202C_200B_206D_206A_206D_200C_206C_206C_202E_202D_206A_206B_200F_206F_202A_202B_202A_200B_206C_206E_200D_200D_200D_200E_200C_202E(condition, ConditionFlag.Jumping61);
|
||||
case 7:
|
||||
num = 829421732;
|
||||
break;
|
||||
case 5:
|
||||
return true;
|
||||
}
|
||||
return condition[ConditionFlag.Jumping61];
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static bool IsUnavailable(ICondition condition)
|
||||
{
|
||||
int num = (IsLockedIn(condition) ? 721479038 : 721479035);
|
||||
while (true)
|
||||
if (!IsLockedIn(condition) && !IsCrafting(condition) && !IsGathering(condition) && !condition[ConditionFlag.Mounted] && !condition[ConditionFlag.Mounting] && !condition[ConditionFlag.Mounting71] && !condition[ConditionFlag.ChocoboRacing] && !condition[ConditionFlag.PlayingLordOfVerminion] && !condition[ConditionFlag.Performing] && !condition[ConditionFlag.UsingFashionAccessory])
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 721479037;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 7:
|
||||
num = (_206D_202D_206B_202B_206A_206D_206B_206B_200E_206B_202C_206C_200E_202C_206D_202C_200B_206D_206A_206D_200C_206C_206C_202E_202D_206A_206B_200F_206F_202A_202B_202A_200B_206C_206E_200D_200D_200D_200E_200C_202E(condition, ConditionFlag.UsingFashionAccessory) ? 721479038 : 721479030);
|
||||
break;
|
||||
case 2:
|
||||
num = (_206D_202D_206B_202B_206A_206D_206B_206B_200E_206B_202C_206C_200E_202C_206D_202C_200B_206D_206A_206D_200C_206C_206C_202E_202D_206A_206B_200F_206F_202A_202B_202A_200B_206C_206E_200D_200D_200D_200E_200C_202E(condition, ConditionFlag.Mounted) ? 721479038 : 721479029);
|
||||
break;
|
||||
case 3:
|
||||
return true;
|
||||
case 6:
|
||||
num = (IsCrafting(condition) ? 721479038 : 721479032);
|
||||
break;
|
||||
case 0:
|
||||
num = (_206D_202D_206B_202B_206A_206D_206B_206B_200E_206B_202C_206C_200E_202C_206D_202C_200B_206D_206A_206D_200C_206C_206C_202E_202D_206A_206B_200F_206F_202A_202B_202A_200B_206C_206E_200D_200D_200D_200E_200C_202E(condition, ConditionFlag.PlayingLordOfVerminion) ? 721479038 : 721479031);
|
||||
break;
|
||||
case 5:
|
||||
num = (IsGathering(condition) ? 721479038 : 721479039);
|
||||
break;
|
||||
case 9:
|
||||
num = (_206D_202D_206B_202B_206A_206D_206B_206B_200E_206B_202C_206C_200E_202C_206D_202C_200B_206D_206A_206D_200C_206C_206C_202E_202D_206A_206B_200F_206F_202A_202B_202A_200B_206C_206E_200D_200D_200D_200E_200C_202E(condition, ConditionFlag.Mounting71) ? 721479038 : 721479036);
|
||||
break;
|
||||
case 8:
|
||||
num = (_206D_202D_206B_202B_206A_206D_206B_206B_200E_206B_202C_206C_200E_202C_206D_202C_200B_206D_206A_206D_200C_206C_206C_202E_202D_206A_206B_200F_206F_202A_202B_202A_200B_206C_206E_200D_200D_200D_200E_200C_202E(condition, ConditionFlag.Mounting) ? 721479038 : 721479028);
|
||||
break;
|
||||
case 1:
|
||||
num = (_206D_202D_206B_202B_206A_206D_206B_206B_200E_206B_202C_206C_200E_202C_206D_202C_200B_206D_206A_206D_200C_206C_206C_202E_202D_206A_206B_200F_206F_202A_202B_202A_200B_206C_206E_200D_200D_200D_200E_200C_202E(condition, ConditionFlag.ChocoboRacing) ? 721479038 : 721479037);
|
||||
break;
|
||||
case 4:
|
||||
num = 721479035;
|
||||
break;
|
||||
case 11:
|
||||
return _206D_202D_206B_202B_206A_206D_206B_206B_200E_206B_202C_206C_200E_202C_206D_202C_200B_206D_206A_206D_200C_206C_206C_202E_202D_206A_206B_200F_206F_202A_202B_202A_200B_206C_206E_200D_200D_200D_200E_200C_202E(condition, ConditionFlag.InFlight);
|
||||
case 10:
|
||||
num = (_206D_202D_206B_202B_206A_206D_206B_206B_200E_206B_202C_206C_200E_202C_206D_202C_200B_206D_206A_206D_200C_206C_206C_202E_202D_206A_206B_200F_206F_202A_202B_202A_200B_206C_206E_200D_200D_200D_200E_200C_202E(condition, ConditionFlag.Performing) ? 721479038 : 721479034);
|
||||
break;
|
||||
}
|
||||
return condition[ConditionFlag.InFlight];
|
||||
}
|
||||
}
|
||||
|
||||
static bool _206D_202D_206B_202B_206A_206D_206B_206B_200E_206B_202C_206C_200E_202C_206D_202C_200B_206D_206A_206D_200C_206C_206C_202E_202D_206A_206B_200F_206F_202A_202B_202A_200B_206C_206E_200D_200D_200D_200E_200C_202E(ICondition P_0, ConditionFlag P_1)
|
||||
{
|
||||
return P_0[P_1];
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -4,34 +4,18 @@ public static class ECombatRoleExtensions
|
|||
{
|
||||
public static ECombatRole GetCombatRole(this EClassJob classJob)
|
||||
{
|
||||
int num = ((!classJob.IsTank()) ? 1662519896 : 1662519898);
|
||||
while (true)
|
||||
if (classJob.IsTank())
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1662519899;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
return ECombatRole.None;
|
||||
case 1:
|
||||
return ECombatRole.Tank;
|
||||
case 2:
|
||||
num = 1662519898;
|
||||
break;
|
||||
case 3:
|
||||
num = ((!classJob.IsHealer()) ? 1662519903 : 1662519902);
|
||||
break;
|
||||
case 4:
|
||||
num = ((!classJob.IsDps()) ? 1662519899 : 1662519901);
|
||||
break;
|
||||
case 6:
|
||||
return ECombatRole.Dps;
|
||||
case 5:
|
||||
return ECombatRole.Healer;
|
||||
}
|
||||
return ECombatRole.Tank;
|
||||
}
|
||||
if (classJob.IsHealer())
|
||||
{
|
||||
return ECombatRole.Healer;
|
||||
}
|
||||
if (classJob.IsDps())
|
||||
{
|
||||
return ECombatRole.Dps;
|
||||
}
|
||||
return ECombatRole.None;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,8 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
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 FFXIVClientStructs.FFXIV.Client.Game;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game.Character;
|
||||
|
|
@ -48,116 +45,55 @@ public sealed class GameStateHelper
|
|||
|
||||
public bool IsFlyingUnlocked(uint territoryId)
|
||||
{
|
||||
uint value;
|
||||
int num = ((!_territoryToAetherCurrentCompFlgSet.TryGetValue(territoryId, out value)) ? 403824667 : 403824666);
|
||||
while (true)
|
||||
if (_territoryToAetherCurrentCompFlgSet.TryGetValue(territoryId, out var value))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 403824667;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 2:
|
||||
goto IL_004e;
|
||||
case 0:
|
||||
return false;
|
||||
case 1:
|
||||
return PlayerStateHelper.IsAetherCurrentZoneComplete(value);
|
||||
}
|
||||
continue;
|
||||
IL_004e:
|
||||
num = 403824666;
|
||||
return PlayerStateHelper.IsAetherCurrentZoneComplete(value);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool IsFlyingUnlockedInCurrentZone()
|
||||
{
|
||||
return IsFlyingUnlocked(_206E_200D_200F_206A_202B_200B_206B_206B_200E_200D_202A_206A_200D_206F_200E_200E_200E_206D_202A_206E_206C_200F_200D_206A_200D_200F_200E_206D_206E_206B_200E_200F_202E_200E_202C_200C_202A_206E_200F_206E_202E(_clientState));
|
||||
return IsFlyingUnlocked(_clientState.TerritoryType);
|
||||
}
|
||||
|
||||
public unsafe ushort? GetMountId()
|
||||
{
|
||||
IPlayerCharacter playerCharacter = _200F_206D_206D_202B_202B_200E_200D_200F_200C_202C_200E_202A_200E_202A_206D_202D_206D_200E_202B_200E_202C_202A_200D_206D_202E_202E_202A_202D_206D_206B_206A_202D_202D_200D_202C_206C_206B_200F_202B_202B_202E(_objectTable);
|
||||
int num = ((playerCharacter != null) ? 1199000575 : 1199000574);
|
||||
BattleChara* ptr = default(BattleChara*);
|
||||
while (true)
|
||||
IPlayerCharacter localPlayer = _objectTable.LocalPlayer;
|
||||
if (localPlayer == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1199000570;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 1:
|
||||
num = ((ptr->Mount.MountId != 0) ? 1199000568 : 1199000569);
|
||||
break;
|
||||
case 4:
|
||||
return null;
|
||||
case 5:
|
||||
ptr = (BattleChara*)_202B_206A_206C_202B_206B_202C_202C_206B_206F_206E_206D_206F_202E_200B_206D_202E_206A_206A_206A_200C_206E_200B_206C_200C_200D_206D_202C_206E_206D_202E_200B_202B_206C_202A_202E_206A_202E_206B_202E_202B_202E((IGameObject)playerCharacter);
|
||||
num = ((ptr == null) ? 1199000569 : 1199000571);
|
||||
break;
|
||||
case 3:
|
||||
return null;
|
||||
case 2:
|
||||
return ptr->Mount.MountId;
|
||||
case 0:
|
||||
num = 1199000574;
|
||||
break;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
BattleChara* address = (BattleChara*)localPlayer.Address;
|
||||
if (address == null || address->Mount.MountId == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return address->Mount.MountId;
|
||||
}
|
||||
|
||||
public unsafe bool HasStatusPreventingMount()
|
||||
{
|
||||
int num = ((!_202D_206E_206A_206C_206E_202D_200B_200D_200B_202E_200B_206E_200E_200D_200B_200E_202C_206F_206A_206C_202C_202B_200D_206E_202A_202D_202C_202D_200B_200F_200E_206E_200F_206E_206C_202A_206A_202D_202C_202E(_condition, ConditionFlag.Swimming)) ? (-1891317293) : (-1891317282));
|
||||
IPlayerCharacter playerCharacter = default(IPlayerCharacter);
|
||||
StatusManager* statusManager = default(StatusManager*);
|
||||
while (true)
|
||||
if (_condition[ConditionFlag.Swimming] && !IsFlyingUnlockedInCurrentZone())
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1891317286;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 8:
|
||||
return false;
|
||||
case 4:
|
||||
num = (IsFlyingUnlockedInCurrentZone() ? (-1891317293) : (-1891317288));
|
||||
break;
|
||||
case 7:
|
||||
{
|
||||
BattleChara* ptr = (BattleChara*)_202B_206A_206C_202B_206B_202C_202C_206B_206F_206E_206D_206F_202E_200B_206D_202E_206A_206A_206A_200C_206E_200B_206C_200C_200D_206D_202C_206E_206D_202E_200B_202B_206C_202A_202E_206A_202E_206B_202E_202B_202E((IGameObject)playerCharacter);
|
||||
statusManager = ptr->GetStatusManager();
|
||||
num = (statusManager->HasStatus(1151u) ? (-1891317287) : (-1891317296));
|
||||
break;
|
||||
}
|
||||
case 5:
|
||||
num = -1891317282;
|
||||
break;
|
||||
case 9:
|
||||
num = (PlayerStateHelper.IsAnyMountUnlocked() ? (-1891317286) : (-1891317285));
|
||||
break;
|
||||
case 10:
|
||||
num = ((!statusManager->HasStatus(1945u)) ? (-1891317284) : (-1891317287));
|
||||
break;
|
||||
case 6:
|
||||
return HasStatusPreventingMountOrSprint();
|
||||
case 3:
|
||||
return true;
|
||||
case 1:
|
||||
return true;
|
||||
case 0:
|
||||
playerCharacter = _200F_206D_206D_202B_202B_200E_200D_200F_200C_202C_200E_202A_200E_202A_206D_202D_206D_200E_202B_200E_202C_202A_200D_206D_202E_202E_202A_202D_206D_206B_206A_202D_202D_200D_202C_206C_206B_200F_202B_202B_202E(_objectTable);
|
||||
num = ((playerCharacter != null) ? (-1891317283) : (-1891317294));
|
||||
break;
|
||||
case 2:
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if (!PlayerStateHelper.IsAnyMountUnlocked())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
IPlayerCharacter localPlayer = _objectTable.LocalPlayer;
|
||||
if (localPlayer == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
BattleChara* address = (BattleChara*)localPlayer.Address;
|
||||
StatusManager* statusManager = address->GetStatusManager();
|
||||
if (statusManager->HasStatus(1151u) || statusManager->HasStatus(1945u))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return HasStatusPreventingMountOrSprint();
|
||||
}
|
||||
|
||||
public bool HasStatusPreventingSprint()
|
||||
|
|
@ -165,178 +101,87 @@ public sealed class GameStateHelper
|
|||
return HasStatusPreventingMountOrSprint();
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe bool Mount(uint preferredMountId = 0u)
|
||||
{
|
||||
int num = ((!_202D_206E_206A_206C_206E_202D_200B_200D_200B_202E_200B_206E_200E_200D_200B_200E_202C_206F_206A_206C_202C_202B_200D_206E_202A_202D_202C_202D_200B_200F_200E_206E_200F_206E_206C_202A_206A_202D_202C_202E(_condition, ConditionFlag.Mounted)) ? (-2056897107) : (-2056897108));
|
||||
while (true)
|
||||
if (_condition[ConditionFlag.Mounted])
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -2056897114;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
return true;
|
||||
}
|
||||
if (HasStatusPreventingMount())
|
||||
{
|
||||
_logger.LogDebug("Cannot mount: status or condition prevents it");
|
||||
return false;
|
||||
}
|
||||
if (preferredMountId != 0 && PlayerStateHelper.IsMountUnlocked(preferredMountId))
|
||||
{
|
||||
if (ActionManager.Instance()->GetActionStatus(ActionType.Mount, preferredMountId, 3758096384uL, checkRecastActive: true, checkCastingActive: true, null) == 0)
|
||||
{
|
||||
case 13:
|
||||
num = -2056897108;
|
||||
break;
|
||||
case 9:
|
||||
num = ((ActionManager.Instance()->GetActionStatus(ActionType.GeneralAction, 9u, 3758096384uL, checkRecastActive: true, checkCastingActive: true, null) != 0) ? (-2056897118) : (-2056897113));
|
||||
break;
|
||||
case 3:
|
||||
return false;
|
||||
case 8:
|
||||
num = ((!PlayerStateHelper.IsMountUnlocked(preferredMountId)) ? (-2056897105) : (-2056897116));
|
||||
break;
|
||||
case 4:
|
||||
return false;
|
||||
case 7:
|
||||
_202D_202E_206F_202A_206D_206A_206B_200C_202A_200D_206B_202C_202C_202C_206E_202E_206F_202E_200B_206C_206E_202A_206A_202D_200F_206B_200D_202D_206D_200F_202D_202C_206E_206D_200D_202B_202B_200C_202D_206A_202E((ILogger)_logger, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(-1476715702), new object[1] { preferredMountId });
|
||||
num = ((!ActionManager.Instance()->UseAction(ActionType.Mount, preferredMountId, 3758096384uL, 0u, ActionManager.UseActionMode.None, 0u, null)) ? (-2056897115) : (-2056897117));
|
||||
break;
|
||||
case 6:
|
||||
_200B_206F_202B_202C_200E_206D_206A_202A_202C_200B_202B_206D_206F_200D_206D_206A_206A_202E_200F_202C_200E_202E_200C_202E_206D_202C_200D_206E_200B_200E_206B_202C_200B_200E_206F_202E_202D_206C_202D_202E((ILogger)_logger, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(1773045698), Array.Empty<object>());
|
||||
_logger.LogDebug("Attempting preferred mount {Id}", preferredMountId);
|
||||
if (ActionManager.Instance()->UseAction(ActionType.Mount, preferredMountId, 3758096384uL, 0u, ActionManager.UseActionMode.None, 0u, null))
|
||||
{
|
||||
_logger.LogInformation("Mounted (preferred {Id})", preferredMountId);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (ActionManager.Instance()->GetActionStatus(ActionType.GeneralAction, 9u, 3758096384uL, checkRecastActive: true, checkCastingActive: true, null) == 0)
|
||||
{
|
||||
_logger.LogDebug("Attempting mount roulette");
|
||||
if (ActionManager.Instance()->UseAction(ActionType.GeneralAction, 9u, 3758096384uL, 0u, ActionManager.UseActionMode.None, 0u, null))
|
||||
{
|
||||
_logger.LogInformation("Mounted (roulette)");
|
||||
return true;
|
||||
case 10:
|
||||
return true;
|
||||
case 1:
|
||||
_202D_202E_206F_202A_206D_206A_206B_200C_202A_200D_206B_202C_202C_202C_206E_202E_206F_202E_200B_206C_206E_202A_206A_202D_200F_206B_200D_202D_206D_200F_202D_202C_206E_206D_200D_202B_202B_200C_202D_206A_202E((ILogger)_logger, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(-1930041306), Array.Empty<object>());
|
||||
num = ((!ActionManager.Instance()->UseAction(ActionType.GeneralAction, 9u, 3758096384uL, 0u, ActionManager.UseActionMode.None, 0u, null)) ? (-2056897118) : (-2056897120));
|
||||
break;
|
||||
case 2:
|
||||
num = ((ActionManager.Instance()->GetActionStatus(ActionType.Mount, preferredMountId, 3758096384uL, checkRecastActive: true, checkCastingActive: true, null) != 0) ? (-2056897115) : (-2056897119));
|
||||
break;
|
||||
case 5:
|
||||
_200B_206F_202B_202C_200E_206D_206A_202A_202C_200B_202B_206D_206F_200D_206D_206A_206A_202E_200F_202C_200E_202E_200C_202E_206D_202C_200D_206E_200B_200E_206B_202C_200B_200E_206F_202E_202D_206C_202D_202E((ILogger)_logger, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(-297265243), new object[1] { preferredMountId });
|
||||
return true;
|
||||
case 11:
|
||||
num = ((!HasStatusPreventingMount()) ? (-2056897114) : (-2056897110));
|
||||
break;
|
||||
case 0:
|
||||
num = ((preferredMountId == 0) ? (-2056897105) : (-2056897106));
|
||||
break;
|
||||
case 12:
|
||||
_202D_202E_206F_202A_206D_206A_206B_200C_202A_200D_206B_202C_202C_202C_206E_202E_206F_202E_200B_206C_206E_202A_206A_202D_200F_206B_200D_202D_206D_200F_202D_202C_206E_206D_200D_202B_202B_200C_202D_206A_202E((ILogger)_logger, global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-1799024315), Array.Empty<object>());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe bool Unmount()
|
||||
{
|
||||
int num = (_202D_206E_206A_206C_206E_202D_200B_200D_200B_202E_200B_206E_200E_200D_200B_200E_202C_206F_206A_206C_202C_202B_200D_206E_202A_202D_202C_202D_200B_200F_200E_206E_200F_206E_206C_202A_206A_202D_202C_202E(_condition, ConditionFlag.Mounted) ? (-837931161) : (-837931166));
|
||||
while (true)
|
||||
if (!_condition[ConditionFlag.Mounted])
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -837931167;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 2:
|
||||
num = -837931166;
|
||||
break;
|
||||
case 3:
|
||||
return true;
|
||||
case 1:
|
||||
_202D_202E_206F_202A_206D_206A_206B_200C_202A_200D_206B_202C_202C_202C_206E_202E_206F_202E_200B_206C_206E_202A_206A_202D_200F_206B_200D_202D_206D_200F_202D_202C_206E_206D_200D_202B_202B_200C_202D_206A_202E((ILogger)_logger, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(-714588632), Array.Empty<object>());
|
||||
return false;
|
||||
case 0:
|
||||
_202D_202E_206F_202A_206D_206A_206B_200C_202A_200D_206B_202C_202C_202C_206E_202E_206F_202E_200B_206C_206E_202A_206A_202D_200F_206B_200D_202D_206D_200F_202D_202C_206E_206D_200D_202B_202B_200C_202D_206A_202E((ILogger)_logger, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(-1741093506), Array.Empty<object>());
|
||||
num = ((!ActionManager.Instance()->UseAction(ActionType.GeneralAction, 23u, 3758096384uL, 0u, ActionManager.UseActionMode.None, 0u, null)) ? (-837931163) : (-837931164));
|
||||
break;
|
||||
case 6:
|
||||
num = ((ActionManager.Instance()->GetActionStatus(ActionType.GeneralAction, 23u, 3758096384uL, checkRecastActive: true, checkCastingActive: true, null) == 0) ? (-837931167) : (-837931168));
|
||||
break;
|
||||
case 5:
|
||||
_200B_206F_202B_202C_200E_206D_206A_202A_202C_200B_202B_206D_206F_200D_206D_206A_206A_202E_200F_202C_200E_202E_200C_202E_206D_202C_200D_206E_200B_200E_206B_202C_200B_200E_206F_202E_202D_206C_202D_202E((ILogger)_logger, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(-97506348), Array.Empty<object>());
|
||||
return true;
|
||||
case 4:
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if (ActionManager.Instance()->GetActionStatus(ActionType.GeneralAction, 23u, 3758096384uL, checkRecastActive: true, checkCastingActive: true, null) != 0)
|
||||
{
|
||||
_logger.LogDebug("Cannot unmount: action on cooldown");
|
||||
return false;
|
||||
}
|
||||
_logger.LogDebug("Attempting dismount");
|
||||
if (ActionManager.Instance()->UseAction(ActionType.GeneralAction, 23u, 3758096384uL, 0u, ActionManager.UseActionMode.None, 0u, null))
|
||||
{
|
||||
_logger.LogInformation("Unmounted");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public unsafe int? GetFreeInventorySlots()
|
||||
{
|
||||
InventoryManager* ptr = InventoryManager.Instance();
|
||||
int num = ((ptr != null) ? (-1831709052) : (-1831709042));
|
||||
int num7 = default(int);
|
||||
int num8 = default(int);
|
||||
InventoryType inventoryType = default(InventoryType);
|
||||
InventoryContainer* inventoryContainer = default(InventoryContainer*);
|
||||
InventoryItem* inventorySlot = default(InventoryItem*);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1831709050;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
return null;
|
||||
}
|
||||
int num = 0;
|
||||
for (InventoryType inventoryType = InventoryType.Inventory1; inventoryType <= InventoryType.Inventory4; inventoryType++)
|
||||
{
|
||||
InventoryContainer* inventoryContainer = ptr->GetInventoryContainer(inventoryType);
|
||||
if (inventoryContainer == null)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
int num10 = num7;
|
||||
num3 = 1;
|
||||
num4 = num10;
|
||||
int num11 = num4 ^ num3;
|
||||
int num12 = num4 & num3;
|
||||
num7 = num11 + (num12 + num12);
|
||||
num = -1831709055;
|
||||
break;
|
||||
}
|
||||
case 7:
|
||||
{
|
||||
int num9 = num8;
|
||||
num3 = 1;
|
||||
num4 = num9;
|
||||
num8 = (num4 | num3) + (num4 & num3);
|
||||
num = -1831709054;
|
||||
break;
|
||||
}
|
||||
case 12:
|
||||
num = ((inventoryType <= InventoryType.Inventory4) ? (-1831709053) : (-1831709050));
|
||||
break;
|
||||
case 11:
|
||||
num8 = 0;
|
||||
num = -1831709054;
|
||||
break;
|
||||
case 8:
|
||||
return null;
|
||||
case 0:
|
||||
return num7;
|
||||
case 13:
|
||||
num = -1831709042;
|
||||
break;
|
||||
case 3:
|
||||
return null;
|
||||
case 5:
|
||||
inventoryContainer = ptr->GetInventoryContainer(inventoryType);
|
||||
num = ((inventoryContainer != null) ? (-1831709043) : (-1831709051));
|
||||
break;
|
||||
case 10:
|
||||
num = ((inventorySlot->ItemId != 0) ? (-1831709055) : (-1831709049));
|
||||
break;
|
||||
case 4:
|
||||
num = ((num8 < inventoryContainer->Size) ? (-1831709056) : (-1831709041));
|
||||
break;
|
||||
case 6:
|
||||
inventorySlot = inventoryContainer->GetInventorySlot(num8);
|
||||
num = ((inventorySlot == null) ? (-1831709049) : (-1831709044));
|
||||
break;
|
||||
case 2:
|
||||
num7 = 0;
|
||||
inventoryType = InventoryType.Inventory1;
|
||||
num = -1831709046;
|
||||
break;
|
||||
case 9:
|
||||
inventoryType++;
|
||||
num = -1831709046;
|
||||
break;
|
||||
}
|
||||
for (int i = 0; i < inventoryContainer->Size; i++)
|
||||
{
|
||||
InventoryItem* inventorySlot = inventoryContainer->GetInventorySlot(i);
|
||||
if (inventorySlot == null || inventorySlot->ItemId == 0)
|
||||
{
|
||||
num++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
public uint GetItemLevel(uint itemId)
|
||||
|
|
@ -344,127 +189,36 @@ public sealed class GameStateHelper
|
|||
return _dataManager.GetExcelSheet<Item>().GetRowOrDefault(itemId)?.LevelItem.RowId ?? 0;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe bool IsLoadingScreenVisible()
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = ((!_gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(108265439), out addonPtr)) ? (-1210184014) : (-1210184015));
|
||||
while (true)
|
||||
if (_gameGui.TryGetAddonByName<AtkUnitBase>("FadeMiddle", out var addonPtr) && LAddon.IsAddonReady(addonPtr) && addonPtr->IsVisible)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1210184006;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 10:
|
||||
return true;
|
||||
case 4:
|
||||
num = ((!LAddon.IsAddonReady(addonPtr)) ? (-1210184004) : (-1210184003));
|
||||
break;
|
||||
case 0:
|
||||
num = ((!LAddon.IsAddonReady(addonPtr)) ? (-1210184008) : (-1210184013));
|
||||
break;
|
||||
case 6:
|
||||
return false;
|
||||
case 5:
|
||||
return true;
|
||||
case 3:
|
||||
num = -1210184015;
|
||||
break;
|
||||
case 8:
|
||||
num = ((!_gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(-342678724), out addonPtr)) ? (-1210184008) : (-1210184006));
|
||||
break;
|
||||
case 9:
|
||||
num = ((!addonPtr->IsVisible) ? (-1210184008) : (-1210184016));
|
||||
break;
|
||||
case 2:
|
||||
num = ((!_gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(190562947), out addonPtr)) ? (-1210184004) : (-1210184002));
|
||||
break;
|
||||
case 11:
|
||||
num = ((!LAddon.IsAddonReady(addonPtr)) ? (-1210184014) : (-1210184005));
|
||||
break;
|
||||
case 7:
|
||||
num = ((!addonPtr->IsVisible) ? (-1210184004) : (-1210184010));
|
||||
break;
|
||||
case 12:
|
||||
return true;
|
||||
case 1:
|
||||
num = ((!addonPtr->IsVisible) ? (-1210184014) : (-1210184001));
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if (_gameGui.TryGetAddonByName<AtkUnitBase>("FadeBack", out addonPtr) && LAddon.IsAddonReady(addonPtr) && addonPtr->IsVisible)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (_gameGui.TryGetAddonByName<AtkUnitBase>("NowLoading", out addonPtr) && LAddon.IsAddonReady(addonPtr) && addonPtr->IsVisible)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private unsafe bool HasStatusPreventingMountOrSprint()
|
||||
{
|
||||
IPlayerCharacter playerCharacter = _200F_206D_206D_202B_202B_200E_200D_200F_200C_202C_200E_202A_200E_202A_206D_202D_206D_200E_202B_200E_202C_202A_200D_206D_202E_202E_202A_202D_206D_206B_206A_202D_202D_200D_202C_206C_206B_200F_202B_202B_202E(_objectTable);
|
||||
int num = ((playerCharacter != null) ? 509350324 : 509350327);
|
||||
StatusManager* statusManager = default(StatusManager*);
|
||||
while (true)
|
||||
IPlayerCharacter localPlayer = _objectTable.LocalPlayer;
|
||||
if (localPlayer == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 509350321;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
num = (statusManager->HasStatus(404u) ? 509350322 : 509350323);
|
||||
break;
|
||||
case 1:
|
||||
return statusManager->HasStatus(2730u);
|
||||
case 7:
|
||||
num = (statusManager->HasStatus(2729u) ? 509350322 : 509350320);
|
||||
break;
|
||||
case 4:
|
||||
num = 509350327;
|
||||
break;
|
||||
case 6:
|
||||
return false;
|
||||
case 2:
|
||||
num = (statusManager->HasStatus(416u) ? 509350322 : 509350326);
|
||||
break;
|
||||
case 5:
|
||||
{
|
||||
BattleChara* ptr = (BattleChara*)_202B_206A_206C_202B_206B_202C_202C_206B_206F_206E_206D_206F_202E_200B_206D_202E_206A_206A_206A_200C_206E_200B_206C_200C_200D_206D_202C_206E_206D_202E_200B_202B_206C_202A_202E_206A_202E_206B_202E_202B_202E((IGameObject)playerCharacter);
|
||||
statusManager = ptr->GetStatusManager();
|
||||
num = (statusManager->HasStatus(565u) ? 509350322 : 509350321);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static uint _206E_200D_200F_206A_202B_200B_206B_206B_200E_200D_202A_206A_200D_206F_200E_200E_200E_206D_202A_206E_206C_200F_200D_206A_200D_200F_200E_206D_206E_206B_200E_200F_202E_200E_202C_200C_202A_206E_200F_206E_202E(IClientState P_0)
|
||||
{
|
||||
return P_0.TerritoryType;
|
||||
}
|
||||
|
||||
static IPlayerCharacter _200F_206D_206D_202B_202B_200E_200D_200F_200C_202C_200E_202A_200E_202A_206D_202D_206D_200E_202B_200E_202C_202A_200D_206D_202E_202E_202A_202D_206D_206B_206A_202D_202D_200D_202C_206C_206B_200F_202B_202B_202E(IObjectTable P_0)
|
||||
{
|
||||
return P_0.LocalPlayer;
|
||||
}
|
||||
|
||||
static nint _202B_206A_206C_202B_206B_202C_202C_206B_206F_206E_206D_206F_202E_200B_206D_202E_206A_206A_206A_200C_206E_200B_206C_200C_200D_206D_202C_206E_206D_202E_200B_202B_206C_202A_202E_206A_202E_206B_202E_202B_202E(IGameObject P_0)
|
||||
{
|
||||
return P_0.Address;
|
||||
}
|
||||
|
||||
static bool _202D_206E_206A_206C_206E_202D_200B_200D_200B_202E_200B_206E_200E_200D_200B_200E_202C_206F_206A_206C_202C_202B_200D_206E_202A_202D_202C_202D_200B_200F_200E_206E_200F_206E_206C_202A_206A_202D_202C_202E(ICondition P_0, ConditionFlag P_1)
|
||||
{
|
||||
return P_0[P_1];
|
||||
}
|
||||
|
||||
static void _202D_202E_206F_202A_206D_206A_206B_200C_202A_200D_206B_202C_202C_202C_206E_202E_206F_202E_200B_206C_206E_202A_206A_202D_200F_206B_200D_202D_206D_200F_202D_202C_206E_206D_200D_202B_202B_200C_202D_206A_202E(ILogger P_0, string P_1, object[] P_2)
|
||||
{
|
||||
P_0.LogDebug(P_1, P_2);
|
||||
}
|
||||
|
||||
static void _200B_206F_202B_202C_200E_206D_206A_202A_202C_200B_202B_206D_206F_200D_206D_206A_206A_202E_200F_202C_200E_202E_200C_202E_206D_202C_200D_206E_200B_200E_206B_202C_200B_200E_206F_202E_202D_206C_202D_202E(ILogger P_0, string P_1, object[] P_2)
|
||||
{
|
||||
P_0.LogInformation(P_1, P_2);
|
||||
BattleChara* address = (BattleChara*)localPlayer.Address;
|
||||
StatusManager* statusManager = address->GetStatusManager();
|
||||
if (!statusManager->HasStatus(565u) && !statusManager->HasStatus(404u) && !statusManager->HasStatus(416u) && !statusManager->HasStatus(2729u))
|
||||
{
|
||||
return statusManager->HasStatus(2730u);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,50 +13,20 @@ public static class GrandCompanyHelper
|
|||
public unsafe static byte GetGrandCompanyId()
|
||||
{
|
||||
PlayerState* ptr = PlayerState.Instance();
|
||||
int num = ((ptr != null) ? (-333040930) : (-333040931));
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -333040929;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
goto IL_004b;
|
||||
case 1:
|
||||
return ptr->GrandCompany;
|
||||
case 2:
|
||||
return 0;
|
||||
}
|
||||
continue;
|
||||
IL_004b:
|
||||
num = -333040931;
|
||||
return 0;
|
||||
}
|
||||
return ptr->GrandCompany;
|
||||
}
|
||||
|
||||
public unsafe static byte GetGrandCompanyRank()
|
||||
{
|
||||
PlayerState* ptr = PlayerState.Instance();
|
||||
int num = ((ptr != null) ? 871865385 : 871865386);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 871865387;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0049;
|
||||
case 2:
|
||||
return ptr->GetGrandCompanyRank();
|
||||
case 1:
|
||||
return 0;
|
||||
}
|
||||
continue;
|
||||
IL_0049:
|
||||
num = 871865386;
|
||||
return 0;
|
||||
}
|
||||
return ptr->GetGrandCompanyRank();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,175 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Numerics;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
|
||||
namespace LLib.GameData;
|
||||
|
||||
public readonly record struct PublicEvent(EPublicEventType Type, uint Id, string Name, Vector3 Position, float Radius, byte Level, byte MaxLevel, float Progress, float Duration, float TimeRemaining, bool IsActive, bool IsPending, bool HasBonus, byte FateRule, uint MotivationNpcDataId, ushort ChainFateId)
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder stringBuilder = _206D_206E_202C_202E_206E_202B_200B_206C_200C_206A_206D_202D_202D_200D_200C_206F_200B_200C_206D_206A_200B_202D_200F_206B_206A_206E_202A_202C_206E_206B_206E_202C_200E_206E_202A_206D_202B_200D_202B_200F_202E();
|
||||
_202E_200D_202E_202A_206C_202E_200C_200B_202B_200F_200D_200F_202C_202B_200C_200F_202A_200D_200C_202C_202A_202D_206D_206F_202D_206F_202C_202E_206B_202D_202A_206F_200E_200E_202E_202E_202B_206E_202C_202A_202E(stringBuilder, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(-1204097607));
|
||||
_202E_200D_202E_202A_206C_202E_200C_200B_202B_200F_200D_200F_202C_202B_200C_200F_202A_200D_200C_202C_202A_202D_206D_206F_202D_206F_202C_202E_206B_202D_202A_206F_200E_200E_202E_202E_202B_206E_202C_202A_202E(stringBuilder, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(579144622));
|
||||
int num = ((!PrintMembers(stringBuilder)) ? 1670321463 : 1670321462);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1670321463;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 2:
|
||||
num = 1670321462;
|
||||
break;
|
||||
case 1:
|
||||
_202D_206C_206C_200D_202B_202A_202C_202A_200F_206D_206D_202C_206F_202D_206A_202B_200B_200C_202D_202C_200E_206B_200D_206F_206F_206C_206E_200C_200D_200E_206A_200B_202C_200C_202A_206D_202B_200C_202E_200E_202E(stringBuilder, ' ');
|
||||
num = 1670321463;
|
||||
break;
|
||||
case 0:
|
||||
_202D_206C_206C_200D_202B_202A_202C_202A_200F_206D_206D_202C_206F_202D_206A_202B_200B_200C_202D_202C_200E_206B_200D_206F_206F_206C_206E_200C_200D_200E_206A_200B_202C_200C_202A_206D_202B_200C_202E_200E_202E(stringBuilder, '}');
|
||||
return _202C_202D_206B_206A_206C_206B_206C_206B_206C_200E_206E_200E_202B_206B_200B_200D_202C_202D_206E_206F_206F_200B_206A_200B_206D_202E_200D_200C_202E_200E_200B_200E_200B_202E_202D_200F_206B_200B_202E_202E_202E((object)stringBuilder);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
private bool PrintMembers(StringBuilder builder)
|
||||
{
|
||||
_202E_200D_202E_202A_206C_202E_200C_200B_202B_200F_200D_200F_202C_202B_200C_200F_202A_200D_200C_202C_202A_202D_206D_206F_202D_206F_202C_202E_206B_202D_202A_206F_200E_200E_202E_202E_202B_206E_202C_202A_202E(builder, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(1703345461));
|
||||
_202E_200D_202E_202A_206C_202E_200C_200B_202B_200F_200D_200F_202C_202B_200C_200F_202A_200D_200C_202C_202A_202D_206D_206F_202D_206F_202C_202E_206B_202D_202A_206F_200E_200E_202E_202E_202B_206E_202C_202A_202E(builder, Type.ToString());
|
||||
_202E_200D_202E_202A_206C_202E_200C_200B_202B_200F_200D_200F_202C_202B_200C_200F_202A_200D_200C_202C_202A_202D_206D_206F_202D_206F_202C_202E_206B_202D_202A_206F_200E_200E_202E_202E_202B_206E_202C_202A_202E(builder, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(1294221790));
|
||||
_202E_200D_202E_202A_206C_202E_200C_200B_202B_200F_200D_200F_202C_202B_200C_200F_202A_200D_200C_202C_202A_202D_206D_206F_202D_206F_202C_202E_206B_202D_202A_206F_200E_200E_202E_202E_202B_206E_202C_202A_202E(builder, Id.ToString());
|
||||
_202E_200D_202E_202A_206C_202E_200C_200B_202B_200F_200D_200F_202C_202B_200C_200F_202A_200D_200C_202C_202A_202D_206D_206F_202D_206F_202C_202E_206B_202D_202A_206F_200E_200E_202E_202E_202B_206E_202C_202A_202E(builder, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(-596371270));
|
||||
_202D_206C_202B_202E_202D_202D_202C_206E_202D_202C_202D_202E_202E_206F_202A_200C_206A_206B_206A_200E_206D_202A_202A_202E_202B_200F_202D_200D_202D_200D_200B_206F_200F_206D_206A_200D_202B_202C_206B_202D_202E(builder, (object)Name);
|
||||
_202E_200D_202E_202A_206C_202E_200C_200B_202B_200F_200D_200F_202C_202B_200C_200F_202A_200D_200C_202C_202A_202D_206D_206F_202D_206F_202C_202E_206B_202D_202A_206F_200E_200E_202E_202E_202B_206E_202C_202A_202E(builder, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(-1841021490));
|
||||
_202E_200D_202E_202A_206C_202E_200C_200B_202B_200F_200D_200F_202C_202B_200C_200F_202A_200D_200C_202C_202A_202D_206D_206F_202D_206F_202C_202E_206B_202D_202A_206F_200E_200E_202E_202E_202B_206E_202C_202A_202E(builder, Position.ToString());
|
||||
_202E_200D_202E_202A_206C_202E_200C_200B_202B_200F_200D_200F_202C_202B_200C_200F_202A_200D_200C_202C_202A_202D_206D_206F_202D_206F_202C_202E_206B_202D_202A_206F_200E_200E_202E_202E_202B_206E_202C_202A_202E(builder, global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-1574188482));
|
||||
_202E_200D_202E_202A_206C_202E_200C_200B_202B_200F_200D_200F_202C_202B_200C_200F_202A_200D_200C_202C_202A_202D_206D_206F_202D_206F_202C_202E_206B_202D_202A_206F_200E_200E_202E_202E_202B_206E_202C_202A_202E(builder, Radius.ToString());
|
||||
_202E_200D_202E_202A_206C_202E_200C_200B_202B_200F_200D_200F_202C_202B_200C_200F_202A_200D_200C_202C_202A_202D_206D_206F_202D_206F_202C_202E_206B_202D_202A_206F_200E_200E_202E_202E_202B_206E_202C_202A_202E(builder, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(-1538801490));
|
||||
_202E_200D_202E_202A_206C_202E_200C_200B_202B_200F_200D_200F_202C_202B_200C_200F_202A_200D_200C_202C_202A_202D_206D_206F_202D_206F_202C_202E_206B_202D_202A_206F_200E_200E_202E_202E_202B_206E_202C_202A_202E(builder, Level.ToString());
|
||||
_202E_200D_202E_202A_206C_202E_200C_200B_202B_200F_200D_200F_202C_202B_200C_200F_202A_200D_200C_202C_202A_202D_206D_206F_202D_206F_202C_202E_206B_202D_202A_206F_200E_200E_202E_202E_202B_206E_202C_202A_202E(builder, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(1645586278));
|
||||
_202E_200D_202E_202A_206C_202E_200C_200B_202B_200F_200D_200F_202C_202B_200C_200F_202A_200D_200C_202C_202A_202D_206D_206F_202D_206F_202C_202E_206B_202D_202A_206F_200E_200E_202E_202E_202B_206E_202C_202A_202E(builder, MaxLevel.ToString());
|
||||
_202E_200D_202E_202A_206C_202E_200C_200B_202B_200F_200D_200F_202C_202B_200C_200F_202A_200D_200C_202C_202A_202D_206D_206F_202D_206F_202C_202E_206B_202D_202A_206F_200E_200E_202E_202E_202B_206E_202C_202A_202E(builder, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(-1015149807));
|
||||
_202E_200D_202E_202A_206C_202E_200C_200B_202B_200F_200D_200F_202C_202B_200C_200F_202A_200D_200C_202C_202A_202D_206D_206F_202D_206F_202C_202E_206B_202D_202A_206F_200E_200E_202E_202E_202B_206E_202C_202A_202E(builder, Progress.ToString());
|
||||
_202E_200D_202E_202A_206C_202E_200C_200B_202B_200F_200D_200F_202C_202B_200C_200F_202A_200D_200C_202C_202A_202D_206D_206F_202D_206F_202C_202E_206B_202D_202A_206F_200E_200E_202E_202E_202B_206E_202C_202A_202E(builder, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(1063554664));
|
||||
_202E_200D_202E_202A_206C_202E_200C_200B_202B_200F_200D_200F_202C_202B_200C_200F_202A_200D_200C_202C_202A_202D_206D_206F_202D_206F_202C_202E_206B_202D_202A_206F_200E_200E_202E_202E_202B_206E_202C_202A_202E(builder, Duration.ToString());
|
||||
_202E_200D_202E_202A_206C_202E_200C_200B_202B_200F_200D_200F_202C_202B_200C_200F_202A_200D_200C_202C_202A_202D_206D_206F_202D_206F_202C_202E_206B_202D_202A_206F_200E_200E_202E_202E_202B_206E_202C_202A_202E(builder, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(-1641383873));
|
||||
_202E_200D_202E_202A_206C_202E_200C_200B_202B_200F_200D_200F_202C_202B_200C_200F_202A_200D_200C_202C_202A_202D_206D_206F_202D_206F_202C_202E_206B_202D_202A_206F_200E_200E_202E_202E_202B_206E_202C_202A_202E(builder, TimeRemaining.ToString());
|
||||
_202E_200D_202E_202A_206C_202E_200C_200B_202B_200F_200D_200F_202C_202B_200C_200F_202A_200D_200C_202C_202A_202D_206D_206F_202D_206F_202C_202E_206B_202D_202A_206F_200E_200E_202E_202E_202B_206E_202C_202A_202E(builder, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(-889184607));
|
||||
_202E_200D_202E_202A_206C_202E_200C_200B_202B_200F_200D_200F_202C_202B_200C_200F_202A_200D_200C_202C_202A_202D_206D_206F_202D_206F_202C_202E_206B_202D_202A_206F_200E_200E_202E_202E_202B_206E_202C_202A_202E(builder, IsActive.ToString());
|
||||
_202E_200D_202E_202A_206C_202E_200C_200B_202B_200F_200D_200F_202C_202B_200C_200F_202A_200D_200C_202C_202A_202D_206D_206F_202D_206F_202C_202E_206B_202D_202A_206F_200E_200E_202E_202E_202B_206E_202C_202A_202E(builder, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(-1150615736));
|
||||
_202E_200D_202E_202A_206C_202E_200C_200B_202B_200F_200D_200F_202C_202B_200C_200F_202A_200D_200C_202C_202A_202D_206D_206F_202D_206F_202C_202E_206B_202D_202A_206F_200E_200E_202E_202E_202B_206E_202C_202A_202E(builder, IsPending.ToString());
|
||||
_202E_200D_202E_202A_206C_202E_200C_200B_202B_200F_200D_200F_202C_202B_200C_200F_202A_200D_200C_202C_202A_202D_206D_206F_202D_206F_202C_202E_206B_202D_202A_206F_200E_200E_202E_202E_202B_206E_202C_202A_202E(builder, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(-460512089));
|
||||
_202E_200D_202E_202A_206C_202E_200C_200B_202B_200F_200D_200F_202C_202B_200C_200F_202A_200D_200C_202C_202A_202D_206D_206F_202D_206F_202C_202E_206B_202D_202A_206F_200E_200E_202E_202E_202B_206E_202C_202A_202E(builder, HasBonus.ToString());
|
||||
_202E_200D_202E_202A_206C_202E_200C_200B_202B_200F_200D_200F_202C_202B_200C_200F_202A_200D_200C_202C_202A_202D_206D_206F_202D_206F_202C_202E_206B_202D_202A_206F_200E_200E_202E_202E_202B_206E_202C_202A_202E(builder, global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-713893414));
|
||||
_202E_200D_202E_202A_206C_202E_200C_200B_202B_200F_200D_200F_202C_202B_200C_200F_202A_200D_200C_202C_202A_202D_206D_206F_202D_206F_202C_202E_206B_202D_202A_206F_200E_200E_202E_202E_202B_206E_202C_202A_202E(builder, FateRule.ToString());
|
||||
_202E_200D_202E_202A_206C_202E_200C_200B_202B_200F_200D_200F_202C_202B_200C_200F_202A_200D_200C_202C_202A_202D_206D_206F_202D_206F_202C_202E_206B_202D_202A_206F_200E_200E_202E_202E_202B_206E_202C_202A_202E(builder, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(-1765562739));
|
||||
_202E_200D_202E_202A_206C_202E_200C_200B_202B_200F_200D_200F_202C_202B_200C_200F_202A_200D_200C_202C_202A_202D_206D_206F_202D_206F_202C_202E_206B_202D_202A_206F_200E_200E_202E_202E_202B_206E_202C_202A_202E(builder, MotivationNpcDataId.ToString());
|
||||
_202E_200D_202E_202A_206C_202E_200C_200B_202B_200F_200D_200F_202C_202B_200C_200F_202A_200D_200C_202C_202A_202D_206D_206F_202D_206F_202C_202E_206B_202D_202A_206F_200E_200E_202E_202E_202B_206E_202C_202A_202E(builder, global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(1235406246));
|
||||
_202E_200D_202E_202A_206C_202E_200C_200B_202B_200F_200D_200F_202C_202B_200C_200F_202A_200D_200C_202C_202A_202D_206D_206F_202D_206F_202C_202E_206B_202D_202A_206F_200E_200E_202E_202E_202B_206E_202C_202A_202E(builder, ChainFateId.ToString());
|
||||
return true;
|
||||
}
|
||||
|
||||
[CompilerGenerated]
|
||||
public bool Equals(PublicEvent other)
|
||||
{
|
||||
int num = ((!EqualityComparer<EPublicEventType>.Default.Equals(Type, other.Type)) ? (-285443445) : (-285443439));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -285443429;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 3:
|
||||
num = ((!EqualityComparer<Vector3>.Default.Equals(Position, other.Position)) ? (-285443445) : (-285443431));
|
||||
break;
|
||||
case 6:
|
||||
num = ((!EqualityComparer<bool>.Default.Equals(HasBonus, other.HasBonus)) ? (-285443445) : (-285443435));
|
||||
break;
|
||||
case 4:
|
||||
num = ((!EqualityComparer<byte>.Default.Equals(Level, other.Level)) ? (-285443445) : (-285443437));
|
||||
break;
|
||||
case 5:
|
||||
num = -285443439;
|
||||
break;
|
||||
case 2:
|
||||
num = ((!EqualityComparer<float>.Default.Equals(Radius, other.Radius)) ? (-285443445) : (-285443425));
|
||||
break;
|
||||
case 14:
|
||||
num = ((!EqualityComparer<byte>.Default.Equals(FateRule, other.FateRule)) ? (-285443445) : (-285443434));
|
||||
break;
|
||||
case 15:
|
||||
return EqualityComparer<ushort>.Default.Equals(ChainFateId, other.ChainFateId);
|
||||
case 10:
|
||||
num = ((!EqualityComparer<uint>.Default.Equals(Id, other.Id)) ? (-285443445) : (-285443429));
|
||||
break;
|
||||
case 1:
|
||||
num = ((!EqualityComparer<float>.Default.Equals(Progress, other.Progress)) ? (-285443445) : (-285443433));
|
||||
break;
|
||||
case 16:
|
||||
return false;
|
||||
case 8:
|
||||
num = ((!EqualityComparer<byte>.Default.Equals(MaxLevel, other.MaxLevel)) ? (-285443445) : (-285443430));
|
||||
break;
|
||||
case 7:
|
||||
num = ((!EqualityComparer<float>.Default.Equals(TimeRemaining, other.TimeRemaining)) ? (-285443445) : (-285443438));
|
||||
break;
|
||||
case 9:
|
||||
num = ((!EqualityComparer<bool>.Default.Equals(IsActive, other.IsActive)) ? (-285443445) : (-285443440));
|
||||
break;
|
||||
case 13:
|
||||
num = ((!EqualityComparer<uint>.Default.Equals(MotivationNpcDataId, other.MotivationNpcDataId)) ? (-285443445) : (-285443436));
|
||||
break;
|
||||
case 12:
|
||||
num = ((!EqualityComparer<float>.Default.Equals(Duration, other.Duration)) ? (-285443445) : (-285443428));
|
||||
break;
|
||||
case 11:
|
||||
num = ((!EqualityComparer<bool>.Default.Equals(IsPending, other.IsPending)) ? (-285443445) : (-285443427));
|
||||
break;
|
||||
case 0:
|
||||
num = ((!EqualityComparer<string>.Default.Equals(Name, other.Name)) ? (-285443445) : (-285443432));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool IEquatable<PublicEvent>.Equals(PublicEvent other)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in Equals
|
||||
return this.Equals(other);
|
||||
}
|
||||
|
||||
static StringBuilder _206D_206E_202C_202E_206E_202B_200B_206C_200C_206A_206D_202D_202D_200D_200C_206F_200B_200C_206D_206A_200B_202D_200F_206B_206A_206E_202A_202C_206E_206B_206E_202C_200E_206E_202A_206D_202B_200D_202B_200F_202E()
|
||||
{
|
||||
return new StringBuilder();
|
||||
}
|
||||
|
||||
static StringBuilder _202E_200D_202E_202A_206C_202E_200C_200B_202B_200F_200D_200F_202C_202B_200C_200F_202A_200D_200C_202C_202A_202D_206D_206F_202D_206F_202C_202E_206B_202D_202A_206F_200E_200E_202E_202E_202B_206E_202C_202A_202E(StringBuilder P_0, string P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static StringBuilder _202D_206C_206C_200D_202B_202A_202C_202A_200F_206D_206D_202C_206F_202D_206A_202B_200B_200C_202D_202C_200E_206B_200D_206F_206F_206C_206E_200C_200D_200E_206A_200B_202C_200C_202A_206D_202B_200C_202E_200E_202E(StringBuilder P_0, char P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static string _202C_202D_206B_206A_206C_206B_206C_206B_206C_200E_206E_200E_202B_206B_200B_200D_202C_202D_206E_206F_206F_200B_206A_200B_206D_202E_200D_200C_202E_200E_200B_200E_200B_202E_202D_200F_206B_200B_202E_202E_202E(object P_0)
|
||||
{
|
||||
return P_0.ToString();
|
||||
}
|
||||
|
||||
static StringBuilder _202D_206C_202B_202E_202D_202D_202C_206E_202D_202C_202D_202E_202E_206F_202A_200C_206A_206B_206A_200E_206D_202A_202A_202E_202B_200F_202D_200D_202D_200D_200B_206F_200F_206D_206A_200D_202B_202C_206B_202D_202E(StringBuilder P_0, object P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
}
|
||||
public readonly record struct PublicEvent(EPublicEventType Type, uint Id, string Name, Vector3 Position, float Radius, byte Level, byte MaxLevel, float Progress, float Duration, float TimeRemaining, bool IsActive, bool IsPending, bool HasBonus, byte FateRule, uint MotivationNpcDataId, ushort ChainFateId);
|
||||
|
|
|
|||
|
|
@ -12,186 +12,69 @@ public sealed class PublicEventHelper
|
|||
public unsafe IReadOnlyList<PublicEvent> GetActiveFates()
|
||||
{
|
||||
FateManager* ptr = FateManager.Instance();
|
||||
int num = ((ptr != null) ? (-2066813597) : (-2066813594));
|
||||
List<PublicEvent> list = default(List<PublicEvent>);
|
||||
int num5 = default(int);
|
||||
FateContext* value = default(FateContext*);
|
||||
bool flag = default(bool);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -2066813595;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 6:
|
||||
list = new List<PublicEvent>();
|
||||
num5 = 0;
|
||||
num = -2066813588;
|
||||
break;
|
||||
case 5:
|
||||
value = ptr->Fates[num5].Value;
|
||||
num = ((value == null) ? (-2066813587) : (-2066813595));
|
||||
break;
|
||||
case 7:
|
||||
num = -2066813594;
|
||||
break;
|
||||
case 10:
|
||||
num = ((!flag) ? (-2066813587) : (-2066813586));
|
||||
break;
|
||||
case 0:
|
||||
return Array.Empty<PublicEvent>();
|
||||
}
|
||||
List<PublicEvent> list = new List<PublicEvent>();
|
||||
for (int i = 0; i < ptr->Fates.Count; i++)
|
||||
{
|
||||
FateContext* value = ptr->Fates[i].Value;
|
||||
if (value != null)
|
||||
{
|
||||
FateState state = value->State;
|
||||
num = ((state - 3 > FateState.Unk1) ? (-2066813599) : (-2066813596));
|
||||
break;
|
||||
}
|
||||
case 8:
|
||||
{
|
||||
int num6 = num5;
|
||||
num3 = 1;
|
||||
num4 = num6;
|
||||
int num7 = num4 ^ num3;
|
||||
int num8 = num4 & num3;
|
||||
num5 = num7 + (num8 + num8);
|
||||
num = -2066813588;
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
flag = true;
|
||||
num = -2066813585;
|
||||
break;
|
||||
case 2:
|
||||
return list;
|
||||
case 4:
|
||||
flag = false;
|
||||
num = -2066813585;
|
||||
break;
|
||||
case 11:
|
||||
list.Add(ToPublicEvent(value));
|
||||
num = -2066813587;
|
||||
break;
|
||||
case 3:
|
||||
return Array.Empty<PublicEvent>();
|
||||
case 9:
|
||||
num = ((num5 < ptr->Fates.Count) ? (-2066813600) : (-2066813593));
|
||||
break;
|
||||
if (state - 3 <= FateState.Unk1)
|
||||
{
|
||||
list.Add(ToPublicEvent(value));
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public unsafe IReadOnlyList<PublicEvent> GetActiveDynamicEvents()
|
||||
{
|
||||
DynamicEventContainer* instance = DynamicEventContainer.GetInstance();
|
||||
int num = ((instance != null) ? (-104590452) : (-104590451));
|
||||
int num7 = default(int);
|
||||
Span<DynamicEvent> events = default(Span<DynamicEvent>);
|
||||
ref DynamicEvent reference = default(ref DynamicEvent);
|
||||
List<PublicEvent> list = default(List<PublicEvent>);
|
||||
while (true)
|
||||
if (instance == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -104590454;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
return Array.Empty<PublicEvent>();
|
||||
}
|
||||
List<PublicEvent> list = new List<PublicEvent>();
|
||||
Span<DynamicEvent> events = instance->Events;
|
||||
for (int i = 0; i < events.Length; i++)
|
||||
{
|
||||
ref DynamicEvent reference = ref events[i];
|
||||
if (reference.State != DynamicEventState.Inactive)
|
||||
{
|
||||
case 3:
|
||||
num = ((num7 < events.Length) ? (-104590450) : (-104590456));
|
||||
break;
|
||||
case 7:
|
||||
return Array.Empty<PublicEvent>();
|
||||
case 5:
|
||||
num = -104590451;
|
||||
break;
|
||||
case 4:
|
||||
reference = ref events[num7];
|
||||
num = ((reference.State == DynamicEventState.Inactive) ? (-104590454) : (-104590453));
|
||||
break;
|
||||
case 2:
|
||||
return list;
|
||||
case 1:
|
||||
list.Add(ToPublicEvent(ref reference));
|
||||
num = -104590454;
|
||||
break;
|
||||
case 0:
|
||||
{
|
||||
int num8 = num7;
|
||||
num3 = 1;
|
||||
num4 = num8;
|
||||
num7 = (num4 | num3) + (num4 & num3);
|
||||
num = -104590455;
|
||||
break;
|
||||
}
|
||||
case 6:
|
||||
list = new List<PublicEvent>();
|
||||
events = instance->Events;
|
||||
num7 = 0;
|
||||
num = -104590455;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public unsafe IReadOnlyList<PublicEvent> GetActiveMechaEvents()
|
||||
{
|
||||
WKSManager* ptr = WKSManager.Instance();
|
||||
int num = ((ptr != null) ? 1500071953 : 1500071952);
|
||||
ref WKSMechaEvent reference = default(ref WKSMechaEvent);
|
||||
Span<WKSMechaEvent> events = default(Span<WKSMechaEvent>);
|
||||
int num7 = default(int);
|
||||
List<PublicEvent> list = default(List<PublicEvent>);
|
||||
WKSMechaEventModule* mechaEventModule = default(WKSMechaEventModule*);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1500071954;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
return Array.Empty<PublicEvent>();
|
||||
}
|
||||
WKSMechaEventModule* mechaEventModule = ptr->MechaEventModule;
|
||||
if (mechaEventModule == null)
|
||||
{
|
||||
return Array.Empty<PublicEvent>();
|
||||
}
|
||||
List<PublicEvent> list = new List<PublicEvent>();
|
||||
Span<WKSMechaEvent> events = mechaEventModule->Events;
|
||||
for (int i = 0; i < events.Length; i++)
|
||||
{
|
||||
ref WKSMechaEvent reference = ref events[i];
|
||||
if ((reference.Flags & WKSMechaEventFlag.IsEventActive) != 0)
|
||||
{
|
||||
case 8:
|
||||
reference = ref events[num7];
|
||||
num = (((reference.Flags & WKSMechaEventFlag.IsEventActive) == 0) ? 1500071957 : 1500071955);
|
||||
break;
|
||||
case 5:
|
||||
return list;
|
||||
case 2:
|
||||
return Array.Empty<PublicEvent>();
|
||||
case 6:
|
||||
return Array.Empty<PublicEvent>();
|
||||
case 7:
|
||||
{
|
||||
int num8 = num7;
|
||||
num3 = 1;
|
||||
num4 = num8;
|
||||
num7 = (num4 | num3) + (num4 & num3);
|
||||
num = 1500071958;
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
num = 1500071952;
|
||||
break;
|
||||
case 4:
|
||||
num = ((num7 < events.Length) ? 1500071962 : 1500071959);
|
||||
break;
|
||||
case 1:
|
||||
list.Add(ToPublicEvent(ref reference));
|
||||
num = 1500071957;
|
||||
break;
|
||||
case 3:
|
||||
mechaEventModule = ptr->MechaEventModule;
|
||||
num = ((mechaEventModule != null) ? 1500071963 : 1500071956);
|
||||
break;
|
||||
case 9:
|
||||
list = new List<PublicEvent>();
|
||||
events = mechaEventModule->Events;
|
||||
num7 = 0;
|
||||
num = 1500071958;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public IReadOnlyList<PublicEvent> GetAllActiveEvents()
|
||||
|
|
@ -205,382 +88,159 @@ public sealed class PublicEventHelper
|
|||
|
||||
public PublicEvent? GetEventById(EPublicEventType type, uint id)
|
||||
{
|
||||
int num;
|
||||
PublicEvent? result = default(PublicEvent?);
|
||||
switch (type)
|
||||
return type switch
|
||||
{
|
||||
default:
|
||||
num = 1438969819;
|
||||
goto IL_001d;
|
||||
case EPublicEventType.Fate:
|
||||
result = GetFateById((ushort)id);
|
||||
num = 1438969820;
|
||||
goto IL_001d;
|
||||
case EPublicEventType.DynamicEvent:
|
||||
goto IL_006b;
|
||||
case EPublicEventType.MechaEvent:
|
||||
goto IL_00aa;
|
||||
IL_001d:
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1438969816;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 6:
|
||||
goto end_IL_001d;
|
||||
case 4:
|
||||
return result;
|
||||
case 1:
|
||||
goto IL_006b;
|
||||
case 5:
|
||||
num = 1438969819;
|
||||
break;
|
||||
case 0:
|
||||
result = null;
|
||||
num = 1438969820;
|
||||
break;
|
||||
case 3:
|
||||
num = 1438969816;
|
||||
break;
|
||||
case 2:
|
||||
goto IL_00aa;
|
||||
}
|
||||
continue;
|
||||
end_IL_001d:
|
||||
break;
|
||||
}
|
||||
goto case EPublicEventType.Fate;
|
||||
IL_00aa:
|
||||
result = GetMechaEventById(id);
|
||||
num = 1438969820;
|
||||
goto IL_001d;
|
||||
IL_006b:
|
||||
result = GetDynamicEventById((ushort)id);
|
||||
num = 1438969820;
|
||||
goto IL_001d;
|
||||
}
|
||||
EPublicEventType.Fate => GetFateById((ushort)id),
|
||||
EPublicEventType.DynamicEvent => GetDynamicEventById((ushort)id),
|
||||
EPublicEventType.MechaEvent => GetMechaEventById(id),
|
||||
_ => null,
|
||||
};
|
||||
}
|
||||
|
||||
public unsafe PublicEvent? GetCurrentPlayerEvent()
|
||||
{
|
||||
FateManager* ptr = FateManager.Instance();
|
||||
int num = ((ptr == null) ? 2074475056 : 2074475058);
|
||||
while (true)
|
||||
if (ptr == null || ptr->CurrentFate == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 2074475059;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
num = 2074475058;
|
||||
break;
|
||||
case 1:
|
||||
num = ((ptr->CurrentFate != null) ? 2074475057 : 2074475056);
|
||||
break;
|
||||
case 3:
|
||||
return null;
|
||||
case 2:
|
||||
return ToPublicEvent(ptr->CurrentFate);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
return ToPublicEvent(ptr->CurrentFate);
|
||||
}
|
||||
|
||||
public unsafe PublicEvent? GetCurrentDynamicEvent()
|
||||
{
|
||||
DynamicEventContainer* instance = DynamicEventContainer.GetInstance();
|
||||
int num = ((instance != null) ? 285703707 : 285703710);
|
||||
DynamicEvent* currentEvent = default(DynamicEvent*);
|
||||
while (true)
|
||||
if (instance == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 285703707;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
currentEvent = instance->GetCurrentEvent();
|
||||
num = ((currentEvent == null) ? 285703704 : 285703711);
|
||||
break;
|
||||
case 4:
|
||||
num = ((currentEvent->State != DynamicEventState.Inactive) ? 285703706 : 285703704);
|
||||
break;
|
||||
case 2:
|
||||
num = 285703710;
|
||||
break;
|
||||
case 3:
|
||||
return null;
|
||||
case 5:
|
||||
return null;
|
||||
case 1:
|
||||
return ToPublicEvent(ref *currentEvent);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
DynamicEvent* currentEvent = instance->GetCurrentEvent();
|
||||
if (currentEvent == null || currentEvent->State == DynamicEventState.Inactive)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return ToPublicEvent(ref *currentEvent);
|
||||
}
|
||||
|
||||
public unsafe PublicEvent? GetCurrentMechaEvent()
|
||||
{
|
||||
WKSManager* ptr = WKSManager.Instance();
|
||||
int num = ((ptr != null) ? 599849311 : 599849304);
|
||||
WKSMechaEvent* currentEvent = default(WKSMechaEvent*);
|
||||
WKSMechaEventModule* mechaEventModule = default(WKSMechaEventModule*);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 599849305;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 3:
|
||||
return ToPublicEvent(ref *currentEvent);
|
||||
case 6:
|
||||
mechaEventModule = ptr->MechaEventModule;
|
||||
num = ((mechaEventModule != null) ? 599849308 : 599849307);
|
||||
break;
|
||||
case 7:
|
||||
num = (((currentEvent->Flags & WKSMechaEventFlag.IsEventActive) != 0) ? 599849306 : 599849309);
|
||||
break;
|
||||
case 0:
|
||||
num = 599849304;
|
||||
break;
|
||||
case 2:
|
||||
return null;
|
||||
case 4:
|
||||
return null;
|
||||
case 1:
|
||||
return null;
|
||||
case 5:
|
||||
currentEvent = mechaEventModule->CurrentEvent;
|
||||
num = ((currentEvent == null) ? 599849309 : 599849310);
|
||||
break;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
WKSMechaEventModule* mechaEventModule = ptr->MechaEventModule;
|
||||
if (mechaEventModule == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
WKSMechaEvent* currentEvent = mechaEventModule->CurrentEvent;
|
||||
if (currentEvent == null || (currentEvent->Flags & WKSMechaEventFlag.IsEventActive) == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return ToPublicEvent(ref *currentEvent);
|
||||
}
|
||||
|
||||
public unsafe bool IsFateActive(ushort fateId)
|
||||
{
|
||||
int num = ((fateId != 0) ? 1838657614 : 1838657615);
|
||||
FateContext* fateById = default(FateContext*);
|
||||
FateManager* ptr = default(FateManager*);
|
||||
while (true)
|
||||
if (fateId == 0)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1838657612;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 1:
|
||||
return fateById->State == FateState.Running;
|
||||
case 6:
|
||||
return false;
|
||||
case 3:
|
||||
return false;
|
||||
case 4:
|
||||
fateById = ptr->GetFateById(fateId);
|
||||
num = ((fateById != null) ? 1838657613 : 1838657610);
|
||||
break;
|
||||
case 2:
|
||||
ptr = FateManager.Instance();
|
||||
num = ((ptr != null) ? 1838657608 : 1838657609);
|
||||
break;
|
||||
case 5:
|
||||
return false;
|
||||
case 0:
|
||||
num = 1838657615;
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
FateManager* ptr = FateManager.Instance();
|
||||
if (ptr == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
FateContext* fateById = ptr->GetFateById(fateId);
|
||||
if (fateById == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return fateById->State == FateState.Running;
|
||||
}
|
||||
|
||||
private unsafe PublicEvent? GetFateById(ushort fateId)
|
||||
{
|
||||
int num = ((fateId != 0) ? (-1398838121) : (-1398838127));
|
||||
FateContext* fateById = default(FateContext*);
|
||||
FateManager* ptr = default(FateManager*);
|
||||
while (true)
|
||||
if (fateId == 0)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1398838126;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 1:
|
||||
fateById = ptr->GetFateById(fateId);
|
||||
num = ((fateById != null) ? (-1398838124) : (-1398838122));
|
||||
break;
|
||||
case 4:
|
||||
return null;
|
||||
case 3:
|
||||
return null;
|
||||
case 2:
|
||||
return null;
|
||||
case 6:
|
||||
return ToPublicEvent(fateById);
|
||||
case 5:
|
||||
ptr = FateManager.Instance();
|
||||
num = ((ptr != null) ? (-1398838125) : (-1398838128));
|
||||
break;
|
||||
case 0:
|
||||
num = -1398838127;
|
||||
break;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
FateManager* ptr = FateManager.Instance();
|
||||
if (ptr == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
FateContext* fateById = ptr->GetFateById(fateId);
|
||||
if (fateById == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return ToPublicEvent(fateById);
|
||||
}
|
||||
|
||||
private unsafe PublicEvent? GetDynamicEventById(ushort dynamicEventId)
|
||||
{
|
||||
int num = ((dynamicEventId != 0) ? 190075853 : 190075849);
|
||||
Span<DynamicEvent> events = default(Span<DynamicEvent>);
|
||||
DynamicEventContainer* instance = default(DynamicEventContainer*);
|
||||
int num5 = default(int);
|
||||
ref DynamicEvent reference = default(ref DynamicEvent);
|
||||
while (true)
|
||||
if (dynamicEventId == 0)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 190075855;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
return null;
|
||||
}
|
||||
DynamicEventContainer* instance = DynamicEventContainer.GetInstance();
|
||||
if (instance == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
Span<DynamicEvent> events = instance->Events;
|
||||
for (int i = 0; i < events.Length; i++)
|
||||
{
|
||||
ref DynamicEvent reference = ref events[i];
|
||||
if (reference.DynamicEventId == dynamicEventId && reference.State != DynamicEventState.Inactive)
|
||||
{
|
||||
case 1:
|
||||
events = instance->Events;
|
||||
num5 = 0;
|
||||
num = 190075847;
|
||||
break;
|
||||
case 2:
|
||||
instance = DynamicEventContainer.GetInstance();
|
||||
num = ((instance != null) ? 190075854 : 190075852);
|
||||
break;
|
||||
case 10:
|
||||
reference = ref events[num5];
|
||||
num = ((reference.DynamicEventId != dynamicEventId) ? 190075851 : 190075848);
|
||||
break;
|
||||
case 0:
|
||||
num = 190075849;
|
||||
break;
|
||||
case 4:
|
||||
{
|
||||
int num6 = num5;
|
||||
num3 = 1;
|
||||
num4 = num6;
|
||||
num5 = (num4 | num3) + (num4 & num3);
|
||||
num = 190075847;
|
||||
break;
|
||||
}
|
||||
case 7:
|
||||
num = ((reference.State == DynamicEventState.Inactive) ? 190075851 : 190075846);
|
||||
break;
|
||||
case 5:
|
||||
return null;
|
||||
case 9:
|
||||
return ToPublicEvent(ref reference);
|
||||
case 3:
|
||||
return null;
|
||||
case 6:
|
||||
return null;
|
||||
case 8:
|
||||
num = ((num5 < events.Length) ? 190075845 : 190075850);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private unsafe PublicEvent? GetMechaEventById(uint mechaEventDataRowId)
|
||||
{
|
||||
int num = ((mechaEventDataRowId != 0) ? 1662115952 : 1662115954);
|
||||
int num5 = default(int);
|
||||
Span<WKSMechaEvent> events = default(Span<WKSMechaEvent>);
|
||||
WKSMechaEventModule* mechaEventModule = default(WKSMechaEventModule*);
|
||||
WKSManager* ptr = default(WKSManager*);
|
||||
ref WKSMechaEvent reference = default(ref WKSMechaEvent);
|
||||
while (true)
|
||||
if (mechaEventDataRowId == 0)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1662115957;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
return null;
|
||||
}
|
||||
WKSManager* ptr = WKSManager.Instance();
|
||||
if (ptr == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
WKSMechaEventModule* mechaEventModule = ptr->MechaEventModule;
|
||||
if (mechaEventModule == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
Span<WKSMechaEvent> events = mechaEventModule->Events;
|
||||
for (int i = 0; i < events.Length; i++)
|
||||
{
|
||||
ref WKSMechaEvent reference = ref events[i];
|
||||
if (reference.WKSMechaEventDataRowId == mechaEventDataRowId && (reference.Flags & WKSMechaEventFlag.IsEventActive) != 0)
|
||||
{
|
||||
case 12:
|
||||
{
|
||||
int num6 = num5;
|
||||
num3 = 1;
|
||||
num4 = num6;
|
||||
num5 = (num4 | num3) + (num4 & num3);
|
||||
num = 1662115955;
|
||||
break;
|
||||
}
|
||||
case 10:
|
||||
events = mechaEventModule->Events;
|
||||
num5 = 0;
|
||||
num = 1662115955;
|
||||
break;
|
||||
case 5:
|
||||
ptr = WKSManager.Instance();
|
||||
num = ((ptr != null) ? 1662115956 : 1662115964);
|
||||
break;
|
||||
case 0:
|
||||
return ToPublicEvent(ref reference);
|
||||
case 9:
|
||||
return null;
|
||||
case 8:
|
||||
return null;
|
||||
case 2:
|
||||
reference = ref events[num5];
|
||||
num = ((reference.WKSMechaEventDataRowId != mechaEventDataRowId) ? 1662115961 : 1662115953);
|
||||
break;
|
||||
case 6:
|
||||
num = ((num5 < events.Length) ? 1662115959 : 1662115965);
|
||||
break;
|
||||
case 11:
|
||||
return null;
|
||||
case 3:
|
||||
num = 1662115954;
|
||||
break;
|
||||
case 1:
|
||||
mechaEventModule = ptr->MechaEventModule;
|
||||
num = ((mechaEventModule != null) ? 1662115967 : 1662115966);
|
||||
break;
|
||||
case 7:
|
||||
return null;
|
||||
case 4:
|
||||
num = (((reference.Flags & WKSMechaEventFlag.IsEventActive) == 0) ? 1662115961 : 1662115957);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private unsafe static PublicEvent ToPublicEvent(FateContext* fate)
|
||||
{
|
||||
float num = fate->Duration;
|
||||
float timeRemaining = 0f;
|
||||
int num2 = ((!(num > 0f)) ? (-597185620) : (-597185618));
|
||||
while (true)
|
||||
if (num > 0f && fate->StartTimeEpoch > 0)
|
||||
{
|
||||
int num3 = num2;
|
||||
int num4 = -597185619;
|
||||
int num5 = num3;
|
||||
switch ((num5 | num4) - (num5 & num4))
|
||||
{
|
||||
case 1:
|
||||
return new PublicEvent(EPublicEventType.Fate, fate->FateId, fate->Name.ToString(), fate->Location, fate->Radius, fate->Level, fate->MaxLevel, (int)fate->Progress, num, timeRemaining, fate->State == FateState.Running, fate->State == FateState.Preparing, fate->IsBonus, fate->Rule, fate->MotivationNpc, fate->FATEChain);
|
||||
case 2:
|
||||
{
|
||||
float num6 = DateTimeOffset.UtcNow.ToUnixTimeSeconds() - fate->StartTimeEpoch;
|
||||
timeRemaining = _206C_202D_202E_202E_200C_206F_206B_202C_206F_202E_206E_202A_206C_202E_206B_200D_202A_202A_202A_200C_200E_202C_206C_202B_200F_202C_206F_206E_206B_202E_206D_202D_202C_206F_200E_202D_206B_200E_206B_206B_202E(0f, num - num6);
|
||||
num2 = -597185620;
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
num2 = ((fate->StartTimeEpoch <= 0) ? (-597185620) : (-597185617));
|
||||
break;
|
||||
case 0:
|
||||
num2 = -597185618;
|
||||
break;
|
||||
}
|
||||
float num2 = DateTimeOffset.UtcNow.ToUnixTimeSeconds() - fate->StartTimeEpoch;
|
||||
timeRemaining = Math.Max(0f, num - num2);
|
||||
}
|
||||
return new PublicEvent(EPublicEventType.Fate, fate->FateId, fate->Name.ToString(), fate->Location, fate->Radius, fate->Level, fate->MaxLevel, (int)fate->Progress, num, timeRemaining, fate->State == FateState.Running, fate->State == FateState.Preparing, fate->IsBonus, fate->Rule, fate->MotivationNpc, fate->FATEChain);
|
||||
}
|
||||
|
||||
private static PublicEvent ToPublicEvent(ref DynamicEvent dynamicEvent)
|
||||
|
|
@ -596,136 +256,30 @@ public sealed class PublicEventHelper
|
|||
float timeRemaining = num2;
|
||||
bool isActive = dynamicEvent.State == DynamicEventState.Battle;
|
||||
DynamicEventState state = dynamicEvent.State;
|
||||
int num3 = ((state - 1 > DynamicEventState.Register) ? 1959810557 : 1959810558);
|
||||
bool isPending = default(bool);
|
||||
while (true)
|
||||
{
|
||||
int num4 = num3;
|
||||
int num5 = 1959810556;
|
||||
int num6 = num4;
|
||||
switch ((num6 | num5) - (num6 & num5))
|
||||
{
|
||||
case 3:
|
||||
num3 = 1959810558;
|
||||
break;
|
||||
case 1:
|
||||
isPending = false;
|
||||
num3 = 1959810556;
|
||||
break;
|
||||
case 2:
|
||||
isPending = true;
|
||||
num3 = 1959810556;
|
||||
break;
|
||||
case 0:
|
||||
return new PublicEvent(EPublicEventType.DynamicEvent, dynamicEventId, name, position, radius, 0, 0, progress, duration, timeRemaining, isActive, isPending, HasBonus: false, 0, 0u, 0);
|
||||
}
|
||||
}
|
||||
bool isPending = state - 1 <= DynamicEventState.Register;
|
||||
return new PublicEvent(EPublicEventType.DynamicEvent, dynamicEventId, name, position, radius, 0, 0, progress, duration, timeRemaining, isActive, isPending, HasBonus: false, 0, 0u, 0);
|
||||
}
|
||||
|
||||
private unsafe static PublicEvent ToPublicEvent(ref WKSMechaEvent mechaEvent)
|
||||
{
|
||||
long num = DateTimeOffset.UtcNow.ToUnixTimeSeconds();
|
||||
int num2 = ((mechaEvent.EventEndTimestamp > mechaEvent.EventStartTimestamp) ? 783714395 : 783714386);
|
||||
string name = default(string);
|
||||
WKSMechaEventMapMarker* value = default(WKSMechaEventMapMarker*);
|
||||
Vector3 position = default(Vector3);
|
||||
float radius = default(float);
|
||||
float progress = default(float);
|
||||
float duration = default(float);
|
||||
float timeRemaining = default(float);
|
||||
while (true)
|
||||
float duration = ((mechaEvent.EventEndTimestamp > mechaEvent.EventStartTimestamp) ? ((float)(mechaEvent.EventEndTimestamp - mechaEvent.EventStartTimestamp)) : 0f);
|
||||
float timeRemaining = ((mechaEvent.EventEndTimestamp > num) ? ((float)(mechaEvent.EventEndTimestamp - num)) : 0f);
|
||||
Vector3 position = Vector3.Zero;
|
||||
float radius = 0f;
|
||||
string name = string.Empty;
|
||||
if (mechaEvent.MapMarkerPtrs.Count > 0)
|
||||
{
|
||||
int num3 = num2;
|
||||
int num4 = 783714385;
|
||||
int num5 = num3;
|
||||
int num6 = num5 + num4;
|
||||
int num7 = num5 & num4;
|
||||
int num10;
|
||||
float num14;
|
||||
float num8;
|
||||
float num9;
|
||||
bool isPending;
|
||||
switch (num6 - (num7 + num7))
|
||||
WKSMechaEventMapMarker* value = mechaEvent.MapMarkerPtrs[0].Value;
|
||||
if (value != null)
|
||||
{
|
||||
default:
|
||||
continue;
|
||||
case 11:
|
||||
num10 = 0;
|
||||
goto IL_008f;
|
||||
case 5:
|
||||
num14 = 0f;
|
||||
goto IL_0149;
|
||||
case 1:
|
||||
num2 = (((mechaEvent.Flags & WKSMechaEventFlag.IsEventActive) == 0) ? 783714394 : 783714397);
|
||||
continue;
|
||||
case 2:
|
||||
num8 = 0f;
|
||||
break;
|
||||
case 0:
|
||||
num2 = 783714386;
|
||||
continue;
|
||||
case 3:
|
||||
num9 = 0f;
|
||||
goto IL_024c;
|
||||
case 8:
|
||||
{
|
||||
long num11 = mechaEvent.EventEndTimestamp;
|
||||
long num12 = num;
|
||||
long num13 = num11;
|
||||
num14 = ~(~num13 + num12);
|
||||
goto IL_0149;
|
||||
}
|
||||
case 12:
|
||||
num10 = ((mechaEvent.EventProgress == 0) ? 1 : 0);
|
||||
goto IL_008f;
|
||||
case 9:
|
||||
num2 = ((mechaEvent.EventProgressMax > 0) ? 783714390 : 783714387);
|
||||
continue;
|
||||
case 4:
|
||||
name = value->Name.ToString();
|
||||
position = value->MapMarkerData.Position;
|
||||
radius = value->MapMarkerData.Radius;
|
||||
num2 = 783714392;
|
||||
continue;
|
||||
case 6:
|
||||
value = mechaEvent.MapMarkerPtrs[0].Value;
|
||||
num2 = ((value == null) ? 783714392 : 783714389);
|
||||
continue;
|
||||
case 10:
|
||||
{
|
||||
int eventEndTimestamp = mechaEvent.EventEndTimestamp;
|
||||
num4 = mechaEvent.EventStartTimestamp;
|
||||
num5 = eventEndTimestamp;
|
||||
num9 = ~(~num5 + num4);
|
||||
goto IL_024c;
|
||||
}
|
||||
case 7:
|
||||
{
|
||||
num8 = (float)mechaEvent.EventProgress / (float)mechaEvent.EventProgressMax * 100f;
|
||||
break;
|
||||
}
|
||||
IL_008f:
|
||||
isPending = (byte)num10 != 0;
|
||||
return new PublicEvent(EPublicEventType.MechaEvent, mechaEvent.WKSMechaEventDataRowId, name, position, radius, 0, 0, progress, duration, timeRemaining, (mechaEvent.Flags & WKSMechaEventFlag.IsEventActive) != 0, isPending, HasBonus: false, 0, 0u, 0);
|
||||
IL_024c:
|
||||
duration = num9;
|
||||
num2 = ((mechaEvent.EventEndTimestamp > num) ? 783714393 : 783714388);
|
||||
continue;
|
||||
IL_0149:
|
||||
timeRemaining = num14;
|
||||
position = Vector3.Zero;
|
||||
radius = 0f;
|
||||
name = string.Empty;
|
||||
num2 = ((mechaEvent.MapMarkerPtrs.Count <= 0) ? 783714392 : 783714391);
|
||||
continue;
|
||||
}
|
||||
progress = num8;
|
||||
num2 = (((mechaEvent.Flags & WKSMechaEventFlag.PilotRegistrationOpen) == 0) ? 783714394 : 783714384);
|
||||
}
|
||||
}
|
||||
|
||||
static float _206C_202D_202E_202E_200C_206F_206B_202C_206F_202E_206E_202A_206C_202E_206B_200D_202A_202A_202A_200C_200E_202C_206C_202B_200F_202C_206F_206E_206B_202E_206D_202D_202C_206F_200E_202D_206B_200E_206B_206B_202E(float P_0, float P_1)
|
||||
{
|
||||
return Math.Max(P_0, P_1);
|
||||
float progress = ((mechaEvent.EventProgressMax > 0) ? ((float)mechaEvent.EventProgress / (float)mechaEvent.EventProgressMax * 100f) : 0f);
|
||||
bool isPending = (mechaEvent.Flags & WKSMechaEventFlag.PilotRegistrationOpen) != 0 && (mechaEvent.Flags & WKSMechaEventFlag.IsEventActive) != 0 && mechaEvent.EventProgress == 0;
|
||||
return new PublicEvent(EPublicEventType.MechaEvent, mechaEvent.WKSMechaEventDataRowId, name, position, radius, 0, 0, progress, duration, timeRemaining, (mechaEvent.Flags & WKSMechaEventFlag.IsEventActive) != 0, isPending, HasBonus: false, 0, 0u, 0);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Dalamud.Plugin.Services;
|
||||
using Lumina.Excel;
|
||||
using Lumina.Excel.Sheets;
|
||||
|
||||
namespace LLib.GameData;
|
||||
|
|
@ -19,276 +17,80 @@ public sealed class SatisfactionSupplyHelper
|
|||
public uint[] CalculateRequestedItems(uint supplyIndex, uint seed)
|
||||
{
|
||||
List<SatisfactionSupply> list = new List<SatisfactionSupply>();
|
||||
int num;
|
||||
int num3;
|
||||
int num4;
|
||||
using (SubrowExcelSheet<SatisfactionSupply>.FlatEnumerator flatEnumerator = _dataManager.GetSubrowExcelSheet<SatisfactionSupply>().Flatten().GetEnumerator())
|
||||
foreach (SatisfactionSupply item in _dataManager.GetSubrowExcelSheet<SatisfactionSupply>().Flatten())
|
||||
{
|
||||
num = -1981977636;
|
||||
SatisfactionSupply current = default(SatisfactionSupply);
|
||||
while (true)
|
||||
if (item.RowId == supplyIndex)
|
||||
{
|
||||
int num2 = num;
|
||||
num3 = -1981977636;
|
||||
num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
list.Add(item);
|
||||
}
|
||||
}
|
||||
uint num = (63874652 * supplyIndex) ^ (437113358 * seed);
|
||||
uint num2 = (uint)(-547857059 * (int)supplyIndex) ^ (811033966 * seed);
|
||||
uint num3 = (uint)(-311827390 * (int)supplyIndex) ^ (570616410 * seed);
|
||||
uint num4 = (uint)((-1359202047 * (int)supplyIndex) ^ (-418962442 * (int)seed));
|
||||
uint[] array = new uint[3] { 4294967295u, 4294967295u, 4294967295u };
|
||||
uint num5 = num;
|
||||
for (int i = 1; i < 4; i++)
|
||||
{
|
||||
int num6 = 0;
|
||||
for (int j = 0; j < list.Count; j++)
|
||||
{
|
||||
SatisfactionSupply satisfactionSupply = list[j];
|
||||
if (satisfactionSupply.Slot == i)
|
||||
{
|
||||
case 2:
|
||||
list.Add(current);
|
||||
num = -1981977636;
|
||||
break;
|
||||
case 1:
|
||||
current = flatEnumerator.Current;
|
||||
num = ((current.RowId != supplyIndex) ? (-1981977636) : (-1981977634));
|
||||
break;
|
||||
case 4:
|
||||
num = -1981977636;
|
||||
break;
|
||||
case 0:
|
||||
num = (flatEnumerator.MoveNext() ? (-1981977635) : (-1981977633));
|
||||
break;
|
||||
case 3:
|
||||
goto end_IL_0038;
|
||||
num6 += satisfactionSupply.ProbabilityPercent;
|
||||
}
|
||||
}
|
||||
uint num7 = num5 ^ (num5 << 11);
|
||||
num = num3;
|
||||
num3 = num4;
|
||||
num5 = num2;
|
||||
num4 ^= num7 ^ ((num7 ^ (num4 >> 11)) >> 8);
|
||||
num2 = num;
|
||||
if (num6 <= 0)
|
||||
{
|
||||
continue;
|
||||
end_IL_0038:
|
||||
break;
|
||||
}
|
||||
}
|
||||
uint num7 = 63874652 * supplyIndex;
|
||||
num3 = (int)(437113358 * seed);
|
||||
num4 = (int)num7;
|
||||
int num8 = num4 + num3;
|
||||
int num9 = num4 & num3;
|
||||
uint num10 = (uint)(num8 - (num9 + num9));
|
||||
int num11 = -547857059 * (int)supplyIndex;
|
||||
num3 = (int)(811033966 * seed);
|
||||
num4 = num11;
|
||||
uint num12 = (uint)((num4 | num3) - (num4 & num3));
|
||||
int num13 = -311827390 * (int)supplyIndex;
|
||||
num3 = (int)(570616410 * seed);
|
||||
num4 = num13;
|
||||
int num14 = num4 + num3;
|
||||
int num15 = num4 & num3;
|
||||
uint num16 = (uint)(num14 - (num15 + num15));
|
||||
int num17 = -1359202047 * (int)supplyIndex;
|
||||
num3 = -418962442 * (int)seed;
|
||||
num4 = num17;
|
||||
int num18 = num4 + num3;
|
||||
int num19 = num4 & num3;
|
||||
uint num20 = (uint)(num18 - (num19 + num19));
|
||||
uint[] array = new uint[3];
|
||||
_206C_202C_202B_202D_202E_200F_200B_202E_202C_202D_202C_206D_206A_200D_206C_200E_200F_206A_202A_200C_200E_200D_200D_206A_206F_202C_202B_206F_200B_200F_206C_206D_202C_206C_200B_206B_206C_202B_200F_200C_202E((Array)array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
|
||||
uint[] array2 = array;
|
||||
uint num21 = num10;
|
||||
int num22 = 1;
|
||||
num = 1311110073;
|
||||
int num33 = default(int);
|
||||
SatisfactionSupply satisfactionSupply2 = default(SatisfactionSupply);
|
||||
int num46 = default(int);
|
||||
int num34 = default(int);
|
||||
long num43 = default(long);
|
||||
SatisfactionSupply satisfactionSupply = default(SatisfactionSupply);
|
||||
while (true)
|
||||
{
|
||||
int num23 = num;
|
||||
num3 = 1311110070;
|
||||
num4 = num23;
|
||||
int num24 = num4 + num3;
|
||||
int num25 = num4 & num3;
|
||||
switch (num24 - (num25 + num25))
|
||||
{
|
||||
case 7:
|
||||
{
|
||||
uint num26 = num21;
|
||||
num3 = (int)(num21 << 11);
|
||||
num4 = (int)num26;
|
||||
int num27 = num4 + num3;
|
||||
int num28 = num4 & num3;
|
||||
uint num29 = (uint)(num27 - (num28 + num28));
|
||||
num10 = num16;
|
||||
num16 = num20;
|
||||
num21 = num12;
|
||||
uint num30 = num20;
|
||||
num3 = (int)(num20 >> 11);
|
||||
num4 = (int)num29;
|
||||
num3 = (num4 | num3) - (num4 & num3) >>> 8;
|
||||
num4 = (int)num29;
|
||||
int num31 = num4 + num3;
|
||||
int num32 = num4 & num3;
|
||||
num3 = num31 - (num32 + num32);
|
||||
num4 = (int)num30;
|
||||
num20 = (uint)((num4 | num3) - (num4 & num3));
|
||||
num12 = num10;
|
||||
num = ((num33 <= 0) ? 1311110072 : 1311110071);
|
||||
break;
|
||||
}
|
||||
case 12:
|
||||
satisfactionSupply2 = list[num46];
|
||||
num = ((satisfactionSupply2.Slot != num22) ? 1311110064 : 1311110078);
|
||||
break;
|
||||
case 10:
|
||||
num = ((num34 < list.Count) ? 1311110070 : 1311110072);
|
||||
break;
|
||||
case 4:
|
||||
num = ((num43 >= satisfactionSupply.ProbabilityPercent) ? 1311110075 : 1311110077);
|
||||
break;
|
||||
case 2:
|
||||
num = ((num46 < list.Count) ? 1311110074 : 1311110065);
|
||||
break;
|
||||
case 0:
|
||||
satisfactionSupply = list[num34];
|
||||
num = ((satisfactionSupply.Slot != num22) ? 1311110067 : 1311110066);
|
||||
break;
|
||||
case 6:
|
||||
{
|
||||
int num47 = num46;
|
||||
num3 = 1;
|
||||
num4 = num47;
|
||||
int num48 = num4 ^ num3;
|
||||
int num49 = num4 & num3;
|
||||
num46 = num48 + (num49 + num49);
|
||||
num = 1311110068;
|
||||
break;
|
||||
}
|
||||
case 8:
|
||||
num33 += satisfactionSupply2.ProbabilityPercent;
|
||||
num = 1311110064;
|
||||
break;
|
||||
case 16:
|
||||
num = 1311110073;
|
||||
break;
|
||||
case 9:
|
||||
num33 = 0;
|
||||
num46 = 0;
|
||||
num = 1311110068;
|
||||
break;
|
||||
case 1:
|
||||
num43 = num20 % num33;
|
||||
num34 = 0;
|
||||
num = 1311110076;
|
||||
break;
|
||||
case 3:
|
||||
return array2;
|
||||
case 13:
|
||||
{
|
||||
long num42 = num43;
|
||||
long num44 = satisfactionSupply.ProbabilityPercent;
|
||||
long num45 = num42;
|
||||
num43 = ~(~num45 + num44);
|
||||
num = 1311110067;
|
||||
break;
|
||||
}
|
||||
case 5:
|
||||
{
|
||||
int num39 = num34;
|
||||
num3 = 1;
|
||||
num4 = num39;
|
||||
int num40 = num4 ^ num3;
|
||||
int num41 = num4 & num3;
|
||||
num34 = num40 + (num41 + num41);
|
||||
num = 1311110076;
|
||||
break;
|
||||
}
|
||||
case 11:
|
||||
{
|
||||
int num38 = num22;
|
||||
num3 = 1;
|
||||
num4 = num38;
|
||||
array2[~(~num4 + num3)] = (uint)num34;
|
||||
num = 1311110072;
|
||||
break;
|
||||
}
|
||||
case 14:
|
||||
{
|
||||
int num35 = num22;
|
||||
num3 = 1;
|
||||
num4 = num35;
|
||||
int num36 = num4 ^ num3;
|
||||
int num37 = num4 & num3;
|
||||
num22 = num36 + (num37 + num37);
|
||||
num = 1311110073;
|
||||
break;
|
||||
}
|
||||
case 15:
|
||||
num = ((num22 < 4) ? 1311110079 : 1311110069);
|
||||
break;
|
||||
}
|
||||
long num8 = num4 % num6;
|
||||
for (int k = 0; k < list.Count; k++)
|
||||
{
|
||||
SatisfactionSupply satisfactionSupply2 = list[k];
|
||||
if (satisfactionSupply2.Slot == i)
|
||||
{
|
||||
if (num8 < satisfactionSupply2.ProbabilityPercent)
|
||||
{
|
||||
array[i - 1] = (uint)k;
|
||||
break;
|
||||
}
|
||||
num8 -= satisfactionSupply2.ProbabilityPercent;
|
||||
}
|
||||
}
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
public int CalculateBonusGuaranteeIndex(int timestamp)
|
||||
{
|
||||
int count = _dataManager.GetExcelSheet<SatisfactionBonusGuarantee>().Count;
|
||||
int num = ((count != 0) ? 473391985 : 473391984);
|
||||
while (true)
|
||||
if (count == 0)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 473391985;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 2:
|
||||
goto IL_005f;
|
||||
case 1:
|
||||
return -1;
|
||||
case 0:
|
||||
num3 = 1657008000;
|
||||
num4 = timestamp;
|
||||
return ~(~num4 + num3) / 604800 % count;
|
||||
}
|
||||
continue;
|
||||
IL_005f:
|
||||
num = 473391984;
|
||||
return -1;
|
||||
}
|
||||
return (timestamp - 1657008000) / 604800 % count;
|
||||
}
|
||||
|
||||
public static int CalculateTurnInsToNextRank(ushort currentSatisfaction, ushort maxSatisfaction, int maxTurnIns)
|
||||
{
|
||||
int num = ((currentSatisfaction < maxSatisfaction) ? 423147797 : 423147794);
|
||||
int num5 = default(int);
|
||||
int num6 = default(int);
|
||||
while (true)
|
||||
if (currentSatisfaction >= maxSatisfaction)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 423147798;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
num = 423147794;
|
||||
break;
|
||||
case 3:
|
||||
num3 = currentSatisfaction;
|
||||
num4 = maxSatisfaction;
|
||||
num5 = ~(~num4 + num3);
|
||||
num6 = maxSatisfaction / maxTurnIns;
|
||||
num = ((num6 != 0) ? 423147799 : 423147796);
|
||||
break;
|
||||
case 4:
|
||||
return maxTurnIns;
|
||||
case 2:
|
||||
return maxTurnIns;
|
||||
case 1:
|
||||
return _200D_202D_206D_206C_206D_202A_202A_200D_202E_200B_200B_200C_206E_202E_200D_200B_206B_206C_206F_202C_200B_200C_202D_200B_206C_200F_200B_202E_200C_206F_206F_206D_200D_200E_202A_206E_202C_206F_202D_206E_202E((int)_202E_200D_206F_200C_200B_206B_202E_206E_206D_206D_200E_206B_202D_206D_206D_200E_206B_200E_206A_202B_206F_206A_202D_202B_202C_202D_206E_202B_200D_206F_200F_206D_200D_200B_200F_200C_200F_202B_206B_200D_202E((double)num5 / (double)num6), maxTurnIns);
|
||||
}
|
||||
return maxTurnIns;
|
||||
}
|
||||
}
|
||||
|
||||
static void _206C_202C_202B_202D_202E_200F_200B_202E_202C_202D_202C_206D_206A_200D_206C_200E_200F_206A_202A_200C_200E_200D_200D_206A_206F_202C_202B_206F_200B_200F_206C_206D_202C_206C_200B_206B_206C_202B_200F_200C_202E(Array P_0, RuntimeFieldHandle P_1)
|
||||
{
|
||||
RuntimeHelpers.InitializeArray(P_0, P_1);
|
||||
}
|
||||
|
||||
static double _202E_200D_206F_200C_200B_206B_202E_206E_206D_206D_200E_206B_202D_206D_206D_200E_206B_200E_206A_202B_206F_206A_202D_202B_202C_202D_206E_202B_200D_206F_200F_206D_200D_200B_200F_200C_200F_202B_206B_200D_202E(double P_0)
|
||||
{
|
||||
return Math.Ceiling(P_0);
|
||||
}
|
||||
|
||||
static int _200D_202D_206D_206C_206D_202A_202A_200D_202E_200B_200B_200C_206E_202E_200D_200B_206B_206C_206F_202C_200B_200C_202D_200B_206C_200F_200B_202E_200C_206F_206F_206D_200D_200E_202A_206E_202C_206F_202D_206E_202E(int P_0, int P_1)
|
||||
{
|
||||
return Math.Min(P_0, P_1);
|
||||
int num = maxSatisfaction - currentSatisfaction;
|
||||
int num2 = maxSatisfaction / maxTurnIns;
|
||||
if (num2 == 0)
|
||||
{
|
||||
return maxTurnIns;
|
||||
}
|
||||
return Math.Min((int)Math.Ceiling((double)num / (double)num2), maxTurnIns);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using Dalamud.Plugin.Services;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game.UI;
|
||||
|
|
@ -27,172 +26,75 @@ public sealed class TeleportHelper
|
|||
public unsafe bool IsAetheryteUnlocked(uint aetheryteId)
|
||||
{
|
||||
UIState* ptr = UIState.Instance();
|
||||
int num = ((ptr == null) ? 2130643281 : 2130643280);
|
||||
while (true)
|
||||
if (ptr != null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 2130643281;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
return false;
|
||||
case 1:
|
||||
return ptr->IsAetheryteUnlocked(aetheryteId);
|
||||
case 2:
|
||||
goto IL_0055;
|
||||
}
|
||||
continue;
|
||||
IL_0055:
|
||||
num = 2130643280;
|
||||
return ptr->IsAetheryteUnlocked(aetheryteId);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public unsafe bool CanTeleport()
|
||||
{
|
||||
ActionManager* ptr = ActionManager.Instance();
|
||||
int num = ((ptr == null) ? 978178038 : 978178037);
|
||||
while (true)
|
||||
if (ptr != null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 978178036;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
goto IL_004b;
|
||||
case 1:
|
||||
return ptr->GetActionStatus(ActionType.Action, 5u, 3758096384uL, checkRecastActive: true, checkCastingActive: true, null) == 0;
|
||||
case 2:
|
||||
return false;
|
||||
}
|
||||
continue;
|
||||
IL_004b:
|
||||
num = 978178037;
|
||||
return ptr->GetActionStatus(ActionType.Action, 5u, 3758096384uL, checkRecastActive: true, checkCastingActive: true, null) == 0;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public unsafe bool IsTeleportUnlocked()
|
||||
{
|
||||
UIState* ptr = UIState.Instance();
|
||||
int num = ((ptr == null) ? 249650035 : 249650034);
|
||||
while (true)
|
||||
if (ptr != null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 249650035;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
return false;
|
||||
case 1:
|
||||
return ptr->IsUnlockLinkUnlocked(_teleportUnlockLink);
|
||||
case 2:
|
||||
goto IL_0058;
|
||||
}
|
||||
continue;
|
||||
IL_0058:
|
||||
num = 249650034;
|
||||
return ptr->IsUnlockLinkUnlocked(_teleportUnlockLink);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public unsafe bool IsFreeAetheryte(uint aetheryteId)
|
||||
{
|
||||
PlayerState* ptr = PlayerState.Instance();
|
||||
int num = ((ptr == null) ? 1806053406 : 1806053402);
|
||||
while (true)
|
||||
if (ptr != null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1806053406;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
if (ptr->FreeAetheryteId != aetheryteId && ptr->FreeAetherytePSPlus != aetheryteId)
|
||||
{
|
||||
case 2:
|
||||
return ptr->FreeAetheryteNSO == aetheryteId;
|
||||
case 4:
|
||||
num = ((ptr->FreeAetheryteId == aetheryteId) ? 1806053405 : 1806053407);
|
||||
break;
|
||||
case 5:
|
||||
num = 1806053402;
|
||||
break;
|
||||
case 3:
|
||||
return true;
|
||||
case 1:
|
||||
num = ((ptr->FreeAetherytePSPlus == aetheryteId) ? 1806053405 : 1806053404);
|
||||
break;
|
||||
case 0:
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe bool Teleport(uint aetheryteId, byte subIndex = 0)
|
||||
{
|
||||
int num = (IsTeleportUnlocked() ? 1160662395 : 1160662390);
|
||||
Telepo* ptr = default(Telepo*);
|
||||
while (true)
|
||||
if (!IsTeleportUnlocked())
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1160662396;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 2:
|
||||
ptr = Telepo.Instance();
|
||||
num = ((ptr != null) ? 1160662397 : 1160662396);
|
||||
break;
|
||||
case 5:
|
||||
_206C_202B_206D_200E_200D_200C_206E_206A_200F_206D_206A_206A_206E_206D_206E_206D_206A_202A_200F_206B_200D_200F_206E_200C_202A_202D_202C_202C_202D_206E_200D_206D_206A_200B_206F_200D_206C_202E_206D_202E((ILogger)_logger, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(-979996593), new object[1] { aetheryteId });
|
||||
return false;
|
||||
case 9:
|
||||
num = (IsAetheryteUnlocked(aetheryteId) ? 1160662388 : 1160662394);
|
||||
break;
|
||||
case 7:
|
||||
num = (CanTeleport() ? 1160662389 : 1160662392);
|
||||
break;
|
||||
case 0:
|
||||
return false;
|
||||
case 8:
|
||||
num = ((!_gameState.IsLoadingScreenVisible()) ? 1160662398 : 1160662393);
|
||||
break;
|
||||
case 3:
|
||||
num = 1160662390;
|
||||
break;
|
||||
case 1:
|
||||
_206A_200F_200F_206F_200B_206F_206D_206B_200C_202E_200F_202B_206E_200B_200E_200E_202A_200C_200D_202B_202A_206F_200D_206A_200B_200E_202D_206B_206A_202A_206D_206B_206F_200D_202E_206B_200B_206B_200F_206B_202E((ILogger)_logger, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(2083148089), new object[1] { aetheryteId });
|
||||
return ptr->Teleport(aetheryteId, subIndex);
|
||||
case 6:
|
||||
_202C_206E_200D_200E_206D_200D_202B_200F_200C_202B_206A_206B_206D_202C_202B_202B_202C_200F_200B_206A_200D_200E_206A_200B_206E_202E_206B_206C_202C_200C_202E_206B_200D_206F_200D_206A_206A_202A_206B_206D_202E((ILogger)_logger, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(-1264034910), new object[1] { aetheryteId });
|
||||
return false;
|
||||
case 4:
|
||||
_206C_202B_206D_200E_200D_200C_206E_206A_200F_206D_206A_206A_206E_206D_206E_206D_206A_202A_200F_206B_200D_200F_206E_200C_202A_202D_202C_202C_202D_206E_200D_206D_206A_200B_206F_200D_206C_202E_206D_202E((ILogger)_logger, global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(1137941263), new object[1] { aetheryteId });
|
||||
return false;
|
||||
case 10:
|
||||
_202C_206E_200D_200E_206D_200D_202B_200F_200C_202B_206A_206B_206D_202C_202B_202B_202C_200F_200B_206A_200D_200E_206A_200B_206E_202E_206B_206C_202C_200C_202E_206B_200D_206F_200D_206A_206A_202A_206B_206D_202E((ILogger)_logger, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(-637254207), new object[1] { aetheryteId });
|
||||
return false;
|
||||
}
|
||||
_logger.LogWarning("Teleport action is not unlocked; skipping teleport to {Id}", aetheryteId);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static void _202C_206E_200D_200E_206D_200D_202B_200F_200C_202B_206A_206B_206D_202C_202B_202B_202C_200F_200B_206A_200D_200E_206A_200B_206E_202E_206B_206C_202C_200C_202E_206B_200D_206F_200D_206A_206A_202A_206B_206D_202E(ILogger P_0, string P_1, object[] P_2)
|
||||
{
|
||||
P_0.LogWarning(P_1, P_2);
|
||||
}
|
||||
|
||||
static void _206C_202B_206D_200E_200D_200C_206E_206A_200F_206D_206A_206A_206E_206D_206E_206D_206A_202A_200F_206B_200D_200F_206E_200C_202A_202D_202C_202C_202D_206E_200D_206D_206A_200B_206F_200D_206C_202E_206D_202E(ILogger P_0, string P_1, object[] P_2)
|
||||
{
|
||||
P_0.LogDebug(P_1, P_2);
|
||||
}
|
||||
|
||||
static void _206A_200F_200F_206F_200B_206F_206D_206B_200C_202E_200F_202B_206E_200B_200E_200E_202A_200C_200D_202B_202A_206F_200D_206A_200B_200E_202D_206B_206A_202A_206D_206B_206F_200D_202E_206B_200B_206B_200F_206B_202E(ILogger P_0, string P_1, object[] P_2)
|
||||
{
|
||||
P_0.LogInformation(P_1, P_2);
|
||||
if (!CanTeleport())
|
||||
{
|
||||
_logger.LogDebug("Teleport to {Id} blocked: action on cooldown", aetheryteId);
|
||||
return false;
|
||||
}
|
||||
if (!IsAetheryteUnlocked(aetheryteId))
|
||||
{
|
||||
_logger.LogWarning("Aetheryte {Id} is not unlocked; skipping teleport", aetheryteId);
|
||||
return false;
|
||||
}
|
||||
if (_gameState.IsLoadingScreenVisible())
|
||||
{
|
||||
_logger.LogDebug("Skipping teleport to {Id}: loading screen visible", aetheryteId);
|
||||
return false;
|
||||
}
|
||||
Telepo* ptr = Telepo.Instance();
|
||||
if (ptr == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
_logger.LogInformation("Teleporting to aetheryte {Id}", aetheryteId);
|
||||
return ptr->Teleport(aetheryteId, subIndex);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,118 +40,53 @@ public sealed class WeatherHelper
|
|||
public Weather? GetWeatherAtTime(uint territoryId, long unixSeconds)
|
||||
{
|
||||
TerritoryType? rowOrDefault = _dataManager.GetExcelSheet<TerritoryType>().GetRowOrDefault(territoryId);
|
||||
int num = (rowOrDefault.HasValue ? 1395957685 : 1395957681);
|
||||
while (true)
|
||||
if (!rowOrDefault.HasValue)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1395957685;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
WeatherRate value = rowOrDefault.Value.WeatherRate.Value;
|
||||
uint target = CalculateTarget(unixSeconds);
|
||||
return ResolveWeather(value, target);
|
||||
}
|
||||
case 0:
|
||||
num = (rowOrDefault.Value.WeatherRate.IsValid ? 1395957684 : 1395957687);
|
||||
break;
|
||||
case 4:
|
||||
return null;
|
||||
case 3:
|
||||
num = 1395957681;
|
||||
break;
|
||||
case 2:
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
if (!rowOrDefault.Value.WeatherRate.IsValid)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
WeatherRate value = rowOrDefault.Value.WeatherRate.Value;
|
||||
uint target = CalculateTarget(unixSeconds);
|
||||
return ResolveWeather(value, target);
|
||||
}
|
||||
|
||||
internal static uint CalculateTarget(long unixSeconds)
|
||||
{
|
||||
long num = unixSeconds / 175;
|
||||
long num2 = 8L;
|
||||
long num3 = num;
|
||||
long num4 = num3 ^ num2;
|
||||
long num5 = num3 & num2;
|
||||
uint num6 = (uint)((num4 + (num5 + num5) - num % 8) % 24);
|
||||
int num7 = (int)(unixSeconds / 4200) * 100;
|
||||
int num8 = (int)num6;
|
||||
int num9 = num7;
|
||||
int num10 = num9 ^ num8;
|
||||
int num11 = num9 & num8;
|
||||
uint num12 = (uint)(num10 + (num11 + num11));
|
||||
uint num13 = num12 << 11;
|
||||
num8 = (int)num12;
|
||||
num9 = (int)num13;
|
||||
int num14 = num9 + num8;
|
||||
int num15 = num9 & num8;
|
||||
uint num16 = (uint)(num14 - (num15 + num15));
|
||||
uint num17 = num16 >> 8;
|
||||
num8 = (int)num16;
|
||||
num9 = (int)num17;
|
||||
return (uint)((num9 | num8) - (num9 & num8)) % 100u;
|
||||
uint num2 = (uint)((num + 8 - num % 8) % 24);
|
||||
uint num3 = (uint)((int)(unixSeconds / 4200) * 100) + num2;
|
||||
uint num4 = (num3 << 11) ^ num3;
|
||||
return ((num4 >> 8) ^ num4) % 100;
|
||||
}
|
||||
|
||||
private static Weather? ResolveWeather(WeatherRate weatherRate, uint target)
|
||||
{
|
||||
Weather? result = null;
|
||||
int num = 0;
|
||||
int num2 = 0;
|
||||
int num3 = -1371049026;
|
||||
RowRef<Weather> rowRef = default(RowRef<Weather>);
|
||||
while (true)
|
||||
for (int i = 0; i < weatherRate.Rate.Count; i++)
|
||||
{
|
||||
int num4 = num3;
|
||||
int num5 = -1371049029;
|
||||
int num6 = num4;
|
||||
int num7 = num6 + num5;
|
||||
int num8 = num6 & num5;
|
||||
switch (num7 - (num8 + num8))
|
||||
if (weatherRate.Rate[i] <= 0)
|
||||
{
|
||||
case 0:
|
||||
return rowRef.Value;
|
||||
case 4:
|
||||
num3 = (rowRef.IsValid ? (-1371049029) : (-1371049027));
|
||||
break;
|
||||
case 2:
|
||||
result = rowRef.Value;
|
||||
num3 = -1371049030;
|
||||
break;
|
||||
case 6:
|
||||
return null;
|
||||
case 7:
|
||||
rowRef = weatherRate.Weather[num2];
|
||||
num3 = ((!rowRef.IsValid) ? (-1371049030) : (-1371049031));
|
||||
break;
|
||||
case 9:
|
||||
num3 = ((weatherRate.Rate[num2] <= 0) ? (-1371049039) : (-1371049028));
|
||||
break;
|
||||
case 8:
|
||||
num3 = -1371049026;
|
||||
break;
|
||||
case 1:
|
||||
num += weatherRate.Rate[num2];
|
||||
num3 = ((target >= num) ? (-1371049039) : (-1371049025));
|
||||
break;
|
||||
case 10:
|
||||
{
|
||||
int num9 = num2;
|
||||
num5 = 1;
|
||||
num6 = num9;
|
||||
num2 = (num6 | num5) + (num6 & num5);
|
||||
num3 = -1371049026;
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
case 3:
|
||||
return result;
|
||||
case 5:
|
||||
num3 = ((num2 < weatherRate.Rate.Count) ? (-1371049038) : (-1371049032));
|
||||
break;
|
||||
RowRef<Weather> rowRef = weatherRate.Weather[i];
|
||||
if (rowRef.IsValid)
|
||||
{
|
||||
result = rowRef.Value;
|
||||
}
|
||||
num += weatherRate.Rate[i];
|
||||
if (target < num)
|
||||
{
|
||||
if (!rowRef.IsValid)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return rowRef.Value;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,183 +6,57 @@ public static class AddonCallback
|
|||
{
|
||||
public unsafe static void Fire(AtkUnitBase* addon, params int[] args)
|
||||
{
|
||||
int num = ((addon != null) ? 1413141629 : 1413141631);
|
||||
int num5 = default(int);
|
||||
AtkValue* ptr = default(AtkValue*);
|
||||
while (true)
|
||||
if (addon != null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1413141624;
|
||||
int num4 = num2;
|
||||
int num9;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
AtkValue* ptr = stackalloc AtkValue[(args.Length == 0) ? 1 : args.Length];
|
||||
for (int i = 0; i < args.Length; i++)
|
||||
{
|
||||
case 3:
|
||||
num = 1413141631;
|
||||
break;
|
||||
case 2:
|
||||
num = ((num5 < args.Length) ? 1413141625 : 1413141630);
|
||||
break;
|
||||
case 4:
|
||||
num9 = args.Length;
|
||||
goto IL_0099;
|
||||
case 7:
|
||||
return;
|
||||
case 0:
|
||||
num9 = 1;
|
||||
goto IL_0099;
|
||||
case 5:
|
||||
num = ((args.Length == 0) ? 1413141624 : 1413141628);
|
||||
break;
|
||||
case 1:
|
||||
{
|
||||
ptr[num5].Type = AtkValueType.Int;
|
||||
ptr[num5].Int = args[num5];
|
||||
int num6 = num5;
|
||||
num3 = 1;
|
||||
num4 = num6;
|
||||
int num7 = num4 ^ num3;
|
||||
int num8 = num4 & num3;
|
||||
num5 = num7 + (num8 + num8);
|
||||
num = 1413141626;
|
||||
break;
|
||||
}
|
||||
case 6:
|
||||
{
|
||||
addon->FireCallback((uint)args.Length, ptr);
|
||||
return;
|
||||
}
|
||||
IL_0099:
|
||||
ptr = stackalloc AtkValue[num9];
|
||||
num5 = 0;
|
||||
num = 1413141626;
|
||||
break;
|
||||
ptr[i].Type = AtkValueType.Int;
|
||||
ptr[i].Int = args[i];
|
||||
}
|
||||
addon->FireCallback((uint)args.Length, ptr);
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe static void FireWithUpdate(AtkUnitBase* addon, params int[] args)
|
||||
{
|
||||
int num = ((addon != null) ? 914584294 : 914584289);
|
||||
AtkValue* ptr = default(AtkValue*);
|
||||
int num8 = default(int);
|
||||
while (true)
|
||||
if (addon != null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 914584290;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
int num7;
|
||||
switch (num5 - (num6 + num6))
|
||||
AtkValue* ptr = stackalloc AtkValue[(args.Length == 0) ? 1 : args.Length];
|
||||
for (int i = 0; i < args.Length; i++)
|
||||
{
|
||||
case 4:
|
||||
num = ((args.Length == 0) ? 914584293 : 914584291);
|
||||
break;
|
||||
case 3:
|
||||
return;
|
||||
case 7:
|
||||
num7 = 1;
|
||||
goto IL_007b;
|
||||
case 5:
|
||||
num = 914584289;
|
||||
break;
|
||||
case 0:
|
||||
{
|
||||
ptr[num8].Type = AtkValueType.Int;
|
||||
ptr[num8].Int = args[num8];
|
||||
int num9 = num8;
|
||||
num3 = 1;
|
||||
num4 = num9;
|
||||
int num10 = num4 ^ num3;
|
||||
int num11 = num4 & num3;
|
||||
num8 = num10 + (num11 + num11);
|
||||
num = 914584288;
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
num = ((num8 < args.Length) ? 914584290 : 914584292);
|
||||
break;
|
||||
case 1:
|
||||
num7 = args.Length;
|
||||
goto IL_007b;
|
||||
case 6:
|
||||
{
|
||||
addon->FireCallback((uint)args.Length, ptr, close: true);
|
||||
return;
|
||||
}
|
||||
IL_007b:
|
||||
ptr = stackalloc AtkValue[num7];
|
||||
num8 = 0;
|
||||
num = 914584288;
|
||||
break;
|
||||
ptr[i].Type = AtkValueType.Int;
|
||||
ptr[i].Int = args[i];
|
||||
}
|
||||
addon->FireCallback((uint)args.Length, ptr, close: true);
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe static void ClickYes(AtkUnitBase* addon)
|
||||
{
|
||||
int num = ((addon != null) ? (-2035549555) : (-2035549554));
|
||||
while (true)
|
||||
if (addon != null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -2035549553;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0043;
|
||||
case 1:
|
||||
return;
|
||||
case 2:
|
||||
addon->FireCallbackInt(0);
|
||||
return;
|
||||
}
|
||||
continue;
|
||||
IL_0043:
|
||||
num = -2035549554;
|
||||
addon->FireCallbackInt(0);
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe static bool ClickButton(AtkUnitBase* addon, AtkComponentButton* button)
|
||||
{
|
||||
int num = ((addon == null) ? (-1621168599) : (-1621168597));
|
||||
AtkComponentNode* ownerNode = default(AtkComponentNode*);
|
||||
AtkEvent* ptr = default(AtkEvent*);
|
||||
while (true)
|
||||
if (addon == null || button == null || !button->IsEnabled)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1621168595;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 7:
|
||||
ownerNode = button->AtkComponentBase.OwnerNode;
|
||||
num = ((ownerNode != null) ? (-1621168603) : (-1621168595));
|
||||
break;
|
||||
case 1:
|
||||
addon->ReceiveEvent(ptr->State.EventType, (int)ptr->Param, ptr, null);
|
||||
return true;
|
||||
case 2:
|
||||
num = (button->IsEnabled ? (-1621168598) : (-1621168599));
|
||||
break;
|
||||
case 5:
|
||||
return false;
|
||||
case 4:
|
||||
return false;
|
||||
case 8:
|
||||
ptr = ownerNode->AtkResNode.AtkEventManager.Event;
|
||||
num = ((ptr != null) ? (-1621168596) : (-1621168600));
|
||||
break;
|
||||
case 3:
|
||||
num = -1621168597;
|
||||
break;
|
||||
case 0:
|
||||
return false;
|
||||
case 6:
|
||||
num = ((button == null) ? (-1621168599) : (-1621168593));
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
AtkComponentNode* ownerNode = button->AtkComponentBase.OwnerNode;
|
||||
if (ownerNode == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
AtkEvent* ptr = ownerNode->AtkResNode.AtkEventManager.Event;
|
||||
if (ptr == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
addon->ReceiveEvent(ptr->State.EventType, (int)ptr->Param, ptr, null);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,61 +7,16 @@ public static class AgentHelper
|
|||
{
|
||||
public unsafe static void SendEvent(AgentInterface* agent, ulong eventId, params int[] args)
|
||||
{
|
||||
int num = ((agent != null) ? (-130884679) : (-130884676));
|
||||
int num8 = default(int);
|
||||
AtkValue* ptr = default(AtkValue*);
|
||||
while (true)
|
||||
if (agent != null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -130884678;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
int num7;
|
||||
switch (num5 - (num6 + num6))
|
||||
AtkValue* ptr = stackalloc AtkValue[(args.Length == 0) ? 1 : args.Length];
|
||||
for (int i = 0; i < args.Length; i++)
|
||||
{
|
||||
case 0:
|
||||
num = -130884676;
|
||||
break;
|
||||
case 3:
|
||||
num = ((args.Length == 0) ? (-130884674) : (-130884675));
|
||||
break;
|
||||
case 7:
|
||||
num7 = args.Length;
|
||||
goto IL_00fd;
|
||||
case 5:
|
||||
num = ((num8 < args.Length) ? (-130884677) : (-130884680));
|
||||
break;
|
||||
case 1:
|
||||
{
|
||||
ptr[num8].Type = AtkValueType.Int;
|
||||
ptr[num8].Int = args[num8];
|
||||
int num9 = num8;
|
||||
num3 = 1;
|
||||
num4 = num9;
|
||||
int num10 = num4 ^ num3;
|
||||
int num11 = num4 & num3;
|
||||
num8 = num10 + (num11 + num11);
|
||||
num = -130884673;
|
||||
break;
|
||||
}
|
||||
case 4:
|
||||
num7 = 1;
|
||||
goto IL_00fd;
|
||||
case 2:
|
||||
{
|
||||
AtkValue* returnValue = stackalloc AtkValue[1];
|
||||
agent->ReceiveEvent(returnValue, (args.Length == 0) ? null : ptr, (uint)args.Length, eventId);
|
||||
return;
|
||||
}
|
||||
case 6:
|
||||
return;
|
||||
IL_00fd:
|
||||
ptr = stackalloc AtkValue[num7];
|
||||
num8 = 0;
|
||||
num = -130884673;
|
||||
break;
|
||||
ptr[i].Type = AtkValueType.Int;
|
||||
ptr[i].Int = args[i];
|
||||
}
|
||||
AtkValue* returnValue = stackalloc AtkValue[1];
|
||||
agent->ReceiveEvent(returnValue, (args.Length == 0) ? null : ptr, (uint)args.Length, eventId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Dalamud.Game.NativeWrapper;
|
||||
using Dalamud.Plugin.Services;
|
||||
using FFXIVClientStructs.FFXIV.Component.GUI;
|
||||
|
|
@ -13,170 +12,52 @@ public static class LAddon
|
|||
public unsafe static AtkUnitBase* GetAddonById(uint id)
|
||||
{
|
||||
AtkUnitList* ptr = &AtkStage.Instance()->RaptureAtkUnitManager->AtkUnitManager.DepthLayerOneList;
|
||||
int num = 0;
|
||||
int num2 = 2129774169;
|
||||
AtkUnitBase* value = default(AtkUnitBase*);
|
||||
AtkUnitList* ptr2 = default(AtkUnitList*);
|
||||
int num10 = default(int);
|
||||
int num7 = default(int);
|
||||
while (true)
|
||||
for (int i = 0; i < 18; i++)
|
||||
{
|
||||
int num3 = num2;
|
||||
int num4 = 2129774174;
|
||||
int num5 = num3;
|
||||
switch ((num5 | num4) - (num5 & num4))
|
||||
AtkUnitList* ptr2 = ptr + i;
|
||||
int num = Math.Min(ptr2->Count, ptr2->Entries.Length);
|
||||
for (int j = 0; j < num; j++)
|
||||
{
|
||||
case 9:
|
||||
num2 = 2129774169;
|
||||
break;
|
||||
case 5:
|
||||
{
|
||||
int num11 = num;
|
||||
num4 = 1;
|
||||
num5 = num11;
|
||||
num = (num5 | num4) + (num5 & num4);
|
||||
num2 = 2129774169;
|
||||
break;
|
||||
}
|
||||
case 8:
|
||||
num2 = ((value->Id != id) ? 2129774174 : 2129774175);
|
||||
break;
|
||||
case 7:
|
||||
num2 = ((num < 18) ? 2129774170 : 2129774172);
|
||||
break;
|
||||
case 1:
|
||||
return value;
|
||||
case 4:
|
||||
ptr2 = ptr + num;
|
||||
num10 = _200F_202C_206F_202D_200F_202D_206D_200E_200D_206E_200B_200B_202A_202B_200F_202A_200C_200B_206C_206F_200B_202A_200E_202C_202E_206A_202D_206D_200F_200E_202C_206A_206A_206F_202D_206B_200B_200C_206C_202A_202E((int)ptr2->Count, ptr2->Entries.Length);
|
||||
num7 = 0;
|
||||
num2 = 2129774168;
|
||||
break;
|
||||
case 3:
|
||||
value = ptr2->Entries[num7].Value;
|
||||
num2 = ((value == null) ? 2129774174 : 2129774166);
|
||||
break;
|
||||
case 6:
|
||||
num2 = ((num7 < num10) ? 2129774173 : 2129774171);
|
||||
break;
|
||||
case 0:
|
||||
{
|
||||
int num6 = num7;
|
||||
num4 = 1;
|
||||
num5 = num6;
|
||||
int num8 = num5 ^ num4;
|
||||
int num9 = num5 & num4;
|
||||
num7 = num8 + (num9 + num9);
|
||||
num2 = 2129774168;
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
return null;
|
||||
AtkUnitBase* value = ptr2->Entries[j].Value;
|
||||
if (value != null && value->Id == id)
|
||||
{
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TryGetAddonByName<T>(this IGameGui gameGui, string addonName, out T* addonPtr) where T : unmanaged
|
||||
{
|
||||
_206F_202D_200B_200D_206C_206D_200D_202D_202B_200C_206D_206C_206E_200D_200F_206E_200B_202E_200F_206F_200E_200F_206A_202B_202C_202B_206F_206A_206C_206F_200E_202E_200F_200E_202C_202D_200F_206F_200C_206D_202E((object)gameGui, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(1115223157));
|
||||
_206D_200C_206B_206E_200E_202E_202B_206D_206F_202B_200D_200D_206A_202D_202E_202B_202D_206E_206F_206E_206A_202E_202C_202A_206E_200B_206B_206F_200E_202E_202A_200F_202E_206A_206E_206A_206D_206F_206B_206F_202E(addonName, global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-709864046));
|
||||
AtkUnitBasePtr atkUnitBasePtr = _200F_202D_202D_200E_200F_200C_200E_202D_202E_200B_202A_206B_202A_206A_206A_206F_206D_202A_206D_206C_200E_202D_202C_206A_200D_202E_202D_206E_200C_206A_206B_200F_206C_200E_202D_202C_200B_202D_200E_200F_202E(gameGui, addonName, 1);
|
||||
int num = (atkUnitBasePtr.IsNull ? (-1471855993) : (-1471855994));
|
||||
while (true)
|
||||
ArgumentNullException.ThrowIfNull(gameGui, "gameGui");
|
||||
ArgumentException.ThrowIfNullOrEmpty(addonName, "addonName");
|
||||
AtkUnitBasePtr addonByName = gameGui.GetAddonByName(addonName);
|
||||
if (!addonByName.IsNull)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1471855993;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 2:
|
||||
goto IL_0072;
|
||||
case 0:
|
||||
addonPtr = null;
|
||||
return false;
|
||||
case 1:
|
||||
addonPtr = (T*)atkUnitBasePtr.Address;
|
||||
return true;
|
||||
}
|
||||
continue;
|
||||
IL_0072:
|
||||
num = -1471855994;
|
||||
addonPtr = (T*)addonByName.Address;
|
||||
return true;
|
||||
}
|
||||
addonPtr = null;
|
||||
return false;
|
||||
}
|
||||
|
||||
public unsafe static bool IsAddonReady(AtkUnitBase* addon)
|
||||
{
|
||||
int num = ((addon == null) ? 1974833566 : 1974833564);
|
||||
while (true)
|
||||
if (addon != null && addon->IsVisible)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1974833565;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
return addon->UldManager.LoadedState == AtkLoadState.Loaded;
|
||||
case 1:
|
||||
num = ((!addon->IsVisible) ? 1974833566 : 1974833565);
|
||||
break;
|
||||
case 3:
|
||||
return false;
|
||||
case 2:
|
||||
num = 1974833564;
|
||||
break;
|
||||
}
|
||||
return addon->UldManager.LoadedState == AtkLoadState.Loaded;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public unsafe static bool TryGetReadyAddon<T>(this IGameGui gameGui, string addonName, out T* addonPtr) where T : unmanaged
|
||||
{
|
||||
int num = ((!gameGui.TryGetAddonByName<T>(addonName, out addonPtr)) ? 1276632889 : 1276632891);
|
||||
while (true)
|
||||
if (gameGui.TryGetAddonByName<T>(addonName, out addonPtr) && IsAddonReady((AtkUnitBase*)addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1276632890;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 2:
|
||||
return true;
|
||||
case 1:
|
||||
num = ((!IsAddonReady((AtkUnitBase*)addonPtr)) ? 1276632889 : 1276632888);
|
||||
break;
|
||||
case 3:
|
||||
addonPtr = null;
|
||||
return false;
|
||||
case 0:
|
||||
num = 1276632891;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
static int _200F_202C_206F_202D_200F_202D_206D_200E_200D_206E_200B_200B_202A_202B_200F_202A_200C_200B_206C_206F_200B_202A_200E_202C_202E_206A_202D_206D_200F_200E_202C_206A_206A_206F_202D_206B_200B_200C_206C_202A_202E(int P_0, int P_1)
|
||||
{
|
||||
return Math.Min(P_0, P_1);
|
||||
}
|
||||
|
||||
static void _206F_202D_200B_200D_206C_206D_200D_202D_202B_200C_206D_206C_206E_200D_200F_206E_200B_202E_200F_206F_200E_200F_206A_202B_202C_202B_206F_206A_206C_206F_200E_202E_200F_200E_202C_202D_200F_206F_200C_206D_202E(object P_0, string P_1)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(P_0, P_1);
|
||||
}
|
||||
|
||||
static void _206D_200C_206B_206E_200E_202E_202B_206D_206F_202B_200D_200D_206A_202D_202E_202B_202D_206E_206F_206E_206A_202E_202C_202A_206E_200B_206B_206F_200E_202E_202A_200F_202E_206A_206E_206A_206D_206F_206B_206F_202E(string P_0, string P_1)
|
||||
{
|
||||
ArgumentException.ThrowIfNullOrEmpty(P_0, P_1);
|
||||
}
|
||||
|
||||
static AtkUnitBasePtr _200F_202D_202D_200E_200F_200C_200E_202D_202E_200B_202A_206B_202A_206A_206A_206F_206D_202A_206D_206C_200E_202D_202C_206A_200D_202E_202D_206E_200C_206A_206B_200F_206C_200E_202D_202C_200B_202D_200E_200F_202E(IGameGui P_0, string P_1, int P_2)
|
||||
{
|
||||
return P_0.GetAddonByName(P_1, P_2);
|
||||
addonPtr = null;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
using System;
|
||||
using Dalamud.Game.Text.SeStringHandling;
|
||||
using Dalamud.Memory;
|
||||
using FFXIVClientStructs.FFXIV.Component.GUI;
|
||||
|
||||
|
|
@ -10,37 +9,14 @@ public static class LAtkValue
|
|||
public unsafe static string? ReadAtkString(this AtkValue atkValue)
|
||||
{
|
||||
AtkValueType atkValueType = atkValue.Type & AtkValueType.TypeMask;
|
||||
int num = ((atkValueType == AtkValueType.String) ? 1097061061 : 1097061058);
|
||||
while (true)
|
||||
if (atkValueType != AtkValueType.String && atkValueType != AtkValueType.ConstString)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1097061057;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 5:
|
||||
num = 1097061058;
|
||||
break;
|
||||
case 3:
|
||||
num = ((atkValueType == AtkValueType.ConstString) ? 1097061061 : 1097061057);
|
||||
break;
|
||||
case 4:
|
||||
num = ((!atkValue.String.HasValue) ? 1097061059 : 1097061056);
|
||||
break;
|
||||
case 1:
|
||||
return _200F_206A_206C_206F_202D_202E_200D_200B_202D_200B_200B_202E_200C_200C_200C_206B_202A_202D_206C_202B_206A_200E_200E_202B_206C_200E_206D_202E_202B_206C_200F_200F_200B_206F_202B_202E_200E_202C_206A_202A_202E(new IntPtr((byte*)atkValue.String)).WithCertainMacroCodeReplacements();
|
||||
case 2:
|
||||
return null;
|
||||
case 0:
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
static SeString _200F_206A_206C_206F_202D_202E_200D_200B_202D_200B_200B_202E_200C_200C_200C_206B_202A_202D_206C_202B_206A_200E_200E_202B_206C_200E_206D_202E_202B_206C_200F_200F_200B_206F_202B_202E_200E_202C_206A_202A_202E(nint P_0)
|
||||
{
|
||||
return MemoryHelper.ReadSeStringNullTerminated(P_0);
|
||||
if (atkValue.String.HasValue)
|
||||
{
|
||||
return MemoryHelper.ReadSeStringNullTerminated(new IntPtr((byte*)atkValue.String)).WithCertainMacroCodeReplacements();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,29 +7,10 @@ public static class SeStringExtensions
|
|||
{
|
||||
public static string WithCertainMacroCodeReplacements(this SeString? str)
|
||||
{
|
||||
int num = ((str != null) ? 678693076 : 678693077);
|
||||
while (true)
|
||||
if (str == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 678693076;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
return new ReadOnlySeString(_200E_206E_206F_206E_200D_202D_206F_206C_202E_206A_202A_200F_202A_202E_202B_206A_206B_202C_200D_202E_200E_202D_200D_206C_206A_206E_200F_206D_200D_200D_202B_206D_206A_206F_202B_200C_202C_202C_206B_206F_202E(str)).WithCertainMacroCodeReplacements();
|
||||
case 1:
|
||||
return string.Empty;
|
||||
case 2:
|
||||
goto IL_0058;
|
||||
}
|
||||
continue;
|
||||
IL_0058:
|
||||
num = 678693077;
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
static byte[] _200E_206E_206F_206E_200D_202D_206F_206C_202E_206A_202A_200F_202A_202E_202B_206A_206B_202C_200D_202E_200E_202D_200D_206C_206A_206E_200F_206D_200D_200D_202B_206D_206A_206F_202B_200C_202C_202C_206B_206F_202E(SeString P_0)
|
||||
{
|
||||
return P_0.Encode();
|
||||
return new ReadOnlySeString(str.Encode()).WithCertainMacroCodeReplacements();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Dalamud.Plugin.Services;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
using LLib.GameData;
|
||||
|
|
@ -12,9 +10,41 @@ namespace LLib.Gear;
|
|||
|
||||
public sealed class BestItemFinder
|
||||
{
|
||||
public static readonly IReadOnlyList<InventoryType> ArmoryAndEquipped;
|
||||
public static readonly IReadOnlyList<InventoryType> ArmoryAndEquipped = new global::_003C_003Ez__ReadOnlyArray<InventoryType>(new InventoryType[12]
|
||||
{
|
||||
InventoryType.EquippedItems,
|
||||
InventoryType.ArmoryMainHand,
|
||||
InventoryType.ArmoryOffHand,
|
||||
InventoryType.ArmoryHead,
|
||||
InventoryType.ArmoryBody,
|
||||
InventoryType.ArmoryHands,
|
||||
InventoryType.ArmoryLegs,
|
||||
InventoryType.ArmoryFeets,
|
||||
InventoryType.ArmoryEar,
|
||||
InventoryType.ArmoryNeck,
|
||||
InventoryType.ArmoryWrist,
|
||||
InventoryType.ArmoryRings
|
||||
});
|
||||
|
||||
public static readonly IReadOnlyList<InventoryType> ArmoryEquippedAndBags;
|
||||
public static readonly IReadOnlyList<InventoryType> ArmoryEquippedAndBags = new global::_003C_003Ez__ReadOnlyArray<InventoryType>(new InventoryType[16]
|
||||
{
|
||||
InventoryType.EquippedItems,
|
||||
InventoryType.ArmoryMainHand,
|
||||
InventoryType.ArmoryOffHand,
|
||||
InventoryType.ArmoryHead,
|
||||
InventoryType.ArmoryBody,
|
||||
InventoryType.ArmoryHands,
|
||||
InventoryType.ArmoryLegs,
|
||||
InventoryType.ArmoryFeets,
|
||||
InventoryType.ArmoryEar,
|
||||
InventoryType.ArmoryNeck,
|
||||
InventoryType.ArmoryWrist,
|
||||
InventoryType.ArmoryRings,
|
||||
InventoryType.Inventory1,
|
||||
InventoryType.Inventory2,
|
||||
InventoryType.Inventory3,
|
||||
InventoryType.Inventory4
|
||||
});
|
||||
|
||||
private readonly GearStatsCalculator _calculator;
|
||||
|
||||
|
|
@ -22,11 +52,10 @@ public sealed class BestItemFinder
|
|||
|
||||
private readonly ExcelSheet<ClassJobCategory> _classJobCategorySheet;
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public BestItemFinder(GearStatsCalculator calculator, IDataManager dataManager)
|
||||
{
|
||||
_206D_206D_200D_200E_206B_206F_200E_200E_206D_200F_200F_202C_206F_200D_200C_200E_206A_202D_206A_200D_202A_202E_200B_206C_206C_202A_206A_202B_202D_202E_200F_200B_206E_202C_202A_206F_202D_202B_200F_200C_202E((object)calculator, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(1061074664));
|
||||
_206D_206D_200D_200E_206B_206F_200E_200E_206D_200F_200F_202C_206F_200D_200C_200E_206A_202D_206A_200D_202A_202E_200B_206C_206C_202A_206A_202B_202D_202E_200F_200B_206E_202C_202A_206F_202D_202B_200F_200C_202E((object)dataManager, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(-1509101314));
|
||||
ArgumentNullException.ThrowIfNull(calculator, "calculator");
|
||||
ArgumentNullException.ThrowIfNull(dataManager, "dataManager");
|
||||
_calculator = calculator;
|
||||
_itemSheet = dataManager.GetExcelSheet<Item>();
|
||||
_classJobCategorySheet = dataManager.GetExcelSheet<ClassJobCategory>();
|
||||
|
|
@ -36,320 +65,100 @@ public sealed class BestItemFinder
|
|||
{
|
||||
BestItemRef? result = null;
|
||||
ItemRankingKey best = ItemRankingKey.None;
|
||||
int num = (job.DealsMagicDamage() ? (-539654856) : (-539654853));
|
||||
InventoryItem* inventorySlot = default(InventoryItem*);
|
||||
BestItemRef valueOrDefault = default(BestItemRef);
|
||||
int num10 = default(int);
|
||||
Item value = default(Item);
|
||||
Item? rowOrDefault = default(Item?);
|
||||
InventoryType current = default(InventoryType);
|
||||
ItemRankingKey itemRankingKey = default(ItemRankingKey);
|
||||
EBaseParam param = default(EBaseParam);
|
||||
InventoryContainer* inventoryContainer = default(InventoryContainer*);
|
||||
InventoryManager* ptr = default(InventoryManager*);
|
||||
while (true)
|
||||
EBaseParam param = (job.DealsMagicDamage() ? EBaseParam.DamageMag : EBaseParam.DamagePhys);
|
||||
InventoryManager* ptr = InventoryManager.Instance();
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -539654855;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
int num13;
|
||||
switch (num5 - (num6 + num6))
|
||||
return null;
|
||||
}
|
||||
foreach (InventoryType container in containers)
|
||||
{
|
||||
InventoryContainer* inventoryContainer = ptr->GetInventoryContainer(container);
|
||||
if (inventoryContainer == null)
|
||||
{
|
||||
case 3:
|
||||
num = -539654853;
|
||||
break;
|
||||
case 2:
|
||||
num13 = 12;
|
||||
goto IL_0093;
|
||||
case 0:
|
||||
return null;
|
||||
case 1:
|
||||
num13 = 13;
|
||||
goto IL_0093;
|
||||
case 4:
|
||||
continue;
|
||||
}
|
||||
for (int i = 0; i < inventoryContainer->Size; i++)
|
||||
{
|
||||
InventoryItem* inventorySlot = inventoryContainer->GetInventorySlot(i);
|
||||
if (inventorySlot == null || inventorySlot->ItemId == 0)
|
||||
{
|
||||
IEnumerator<InventoryType> enumerator = containers.GetEnumerator();
|
||||
try
|
||||
continue;
|
||||
}
|
||||
if (excludeContainerSlot.HasValue)
|
||||
{
|
||||
BestItemRef valueOrDefault = excludeContainerSlot.GetValueOrDefault();
|
||||
if (valueOrDefault.Container == container && valueOrDefault.Slot == i)
|
||||
{
|
||||
num = 1383035705;
|
||||
while (true)
|
||||
{
|
||||
int num7 = num;
|
||||
num3 = 1383035707;
|
||||
num4 = num7;
|
||||
int num8 = num4 + num3;
|
||||
int num9 = num4 & num3;
|
||||
switch (num8 - (num9 + num9))
|
||||
{
|
||||
case 2:
|
||||
num = (_202D_206A_202A_206D_202C_202E_206A_206C_200D_200F_206E_202B_206D_206D_200B_206D_206B_200E_200D_206E_206C_206A_202B_206D_200B_200D_202B_202B_206B_206A_200D_202A_200B_206D_200B_202D_206A_202E_206F_206D_202E((IEnumerator)enumerator) ? 1383035691 : 1383035701);
|
||||
break;
|
||||
case 13:
|
||||
num = ((inventorySlot->ItemId == 0) ? 1383035706 : 1383035700);
|
||||
break;
|
||||
case 4:
|
||||
num = ((valueOrDefault.Slot == num10) ? 1383035706 : 1383035690);
|
||||
break;
|
||||
case 6:
|
||||
value = rowOrDefault.Value;
|
||||
num = ((!IsAcceptedSlot(value.EquipSlotCategory.RowId, acceptedSlotCategories)) ? 1383035706 : 1383035697);
|
||||
break;
|
||||
case 5:
|
||||
valueOrDefault = excludeContainerSlot.GetValueOrDefault();
|
||||
num = ((valueOrDefault.Container != current) ? 1383035690 : 1383035711);
|
||||
break;
|
||||
case 0:
|
||||
num = 1383035705;
|
||||
break;
|
||||
case 3:
|
||||
{
|
||||
EquipmentStats equipmentStats = _calculator.CalculateGearStats(inventorySlot);
|
||||
itemRankingKey = new ItemRankingKey(value.LevelItem.RowId, priority.Score(equipmentStats), equipmentStats.Get(param));
|
||||
num = ((!IsUpgrade(rankingMode, itemRankingKey, best)) ? 1383035706 : 1383035708);
|
||||
break;
|
||||
}
|
||||
case 9:
|
||||
inventorySlot = inventoryContainer->GetInventorySlot(num10);
|
||||
num = ((inventorySlot == null) ? 1383035706 : 1383035702);
|
||||
break;
|
||||
case 10:
|
||||
num = ((value.LevelEquip > playerLevel) ? 1383035706 : 1383035703);
|
||||
break;
|
||||
case 15:
|
||||
num = ((!excludeContainerSlot.HasValue) ? 1383035690 : 1383035710);
|
||||
break;
|
||||
case 7:
|
||||
result = new BestItemRef(current, num10, inventorySlot->ItemId, itemRankingKey.ItemLevel, itemRankingKey.Score);
|
||||
best = itemRankingKey;
|
||||
num = 1383035706;
|
||||
break;
|
||||
case 11:
|
||||
num = ((num10 < inventoryContainer->Size) ? 1383035698 : 1383035705);
|
||||
break;
|
||||
case 12:
|
||||
num = ((!IsItemForJob(value, job)) ? 1383035706 : 1383035704);
|
||||
break;
|
||||
case 16:
|
||||
current = enumerator.Current;
|
||||
inventoryContainer = ptr->GetInventoryContainer(current);
|
||||
num = ((inventoryContainer == null) ? 1383035705 : 1383035699);
|
||||
break;
|
||||
case 1:
|
||||
{
|
||||
int num11 = num10;
|
||||
num3 = 1;
|
||||
num4 = num11;
|
||||
num10 = (num4 | num3) + (num4 & num3);
|
||||
num = 1383035696;
|
||||
break;
|
||||
}
|
||||
case 17:
|
||||
rowOrDefault = _itemSheet.GetRowOrDefault(inventorySlot->ItemId);
|
||||
num = ((!rowOrDefault.HasValue) ? 1383035706 : 1383035709);
|
||||
break;
|
||||
case 8:
|
||||
num10 = 0;
|
||||
num = 1383035696;
|
||||
break;
|
||||
case 14:
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
num = ((enumerator == null) ? 1816874723 : 1816874720);
|
||||
while (true)
|
||||
{
|
||||
int num12 = num;
|
||||
num3 = 1816874722;
|
||||
num4 = num12;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
num = 1816874720;
|
||||
break;
|
||||
case 2:
|
||||
_206C_202E_206F_206E_206E_200E_200C_206A_200B_206E_202C_202E_206D_202D_202D_202E_206E_206D_200D_200D_202A_202B_202C_202B_200B_200F_202B_202B_200F_200C_202D_206C_200D_202B_200E_200F_206D_206E_206B_200C_202E((IDisposable)enumerator);
|
||||
num = 1816874723;
|
||||
break;
|
||||
case 1:
|
||||
goto end_IL_042f;
|
||||
}
|
||||
continue;
|
||||
end_IL_042f:
|
||||
break;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
Item? rowOrDefault = _itemSheet.GetRowOrDefault(inventorySlot->ItemId);
|
||||
if (!rowOrDefault.HasValue)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
Item value = rowOrDefault.Value;
|
||||
if (IsAcceptedSlot(value.EquipSlotCategory.RowId, acceptedSlotCategories) && value.LevelEquip <= playerLevel && IsItemForJob(value, job))
|
||||
{
|
||||
EquipmentStats equipmentStats = _calculator.CalculateGearStats(inventorySlot);
|
||||
ItemRankingKey itemRankingKey = new ItemRankingKey(value.LevelItem.RowId, priority.Score(equipmentStats), equipmentStats.Get(param));
|
||||
if (IsUpgrade(rankingMode, itemRankingKey, best))
|
||||
{
|
||||
result = new BestItemRef(container, i, inventorySlot->ItemId, itemRankingKey.ItemLevel, itemRankingKey.Score);
|
||||
best = itemRankingKey;
|
||||
}
|
||||
}
|
||||
IL_0093:
|
||||
param = (EBaseParam)num13;
|
||||
ptr = InventoryManager.Instance();
|
||||
num = ((ptr != null) ? (-539654851) : (-539654855));
|
||||
break;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static bool IsUpgrade(EItemRankingMode mode, ItemRankingKey candidate, ItemRankingKey best)
|
||||
{
|
||||
int num = ((mode != EItemRankingMode.DamageFirst) ? (-1413450028) : (-1413450032));
|
||||
while (true)
|
||||
if (mode == EItemRankingMode.DamageFirst && candidate.Damage != best.Damage)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1413450029;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
return candidate.Damage > best.Damage;
|
||||
}
|
||||
if (mode == EItemRankingMode.ItemLevelFirst)
|
||||
{
|
||||
if (candidate.ItemLevel != best.ItemLevel)
|
||||
{
|
||||
case 8:
|
||||
num = -1413450032;
|
||||
break;
|
||||
case 7:
|
||||
num = ((mode != EItemRankingMode.ItemLevelFirst) ? (-1413450031) : (-1413450025));
|
||||
break;
|
||||
case 9:
|
||||
return candidate.ItemLevel > best.ItemLevel;
|
||||
case 4:
|
||||
num = ((candidate.ItemLevel == best.ItemLevel) ? (-1413450027) : (-1413450022));
|
||||
break;
|
||||
case 2:
|
||||
num = ((candidate.Score == best.Score) ? (-1413450029) : (-1413450026));
|
||||
break;
|
||||
case 5:
|
||||
return candidate.Score > best.Score;
|
||||
case 1:
|
||||
return candidate.Damage > best.Damage;
|
||||
case 3:
|
||||
num = ((candidate.Damage == best.Damage) ? (-1413450028) : (-1413450030));
|
||||
break;
|
||||
case 6:
|
||||
return candidate.Score > best.Score;
|
||||
case 0:
|
||||
return candidate.ItemLevel > best.ItemLevel;
|
||||
}
|
||||
return candidate.Score > best.Score;
|
||||
}
|
||||
if (candidate.Score != best.Score)
|
||||
{
|
||||
return candidate.Score > best.Score;
|
||||
}
|
||||
return candidate.ItemLevel > best.ItemLevel;
|
||||
}
|
||||
|
||||
public bool IsItemForJob(Item item, EClassJob job)
|
||||
{
|
||||
uint rowId = item.ClassJobCategory.RowId;
|
||||
int num = ((rowId != 0) ? (-1361138782) : (-1361138777));
|
||||
ClassJobCategory? rowOrDefault = default(ClassJobCategory?);
|
||||
while (true)
|
||||
if (rowId == 0)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1361138778;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 3:
|
||||
num = -1361138777;
|
||||
break;
|
||||
case 2:
|
||||
return false;
|
||||
case 1:
|
||||
return true;
|
||||
case 0:
|
||||
return job.IsInCategory(rowOrDefault.Value);
|
||||
case 4:
|
||||
rowOrDefault = _classJobCategorySheet.GetRowOrDefault(rowId);
|
||||
num = (rowOrDefault.HasValue ? (-1361138778) : (-1361138780));
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
ClassJobCategory? rowOrDefault = _classJobCategorySheet.GetRowOrDefault(rowId);
|
||||
if (!rowOrDefault.HasValue)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return job.IsInCategory(rowOrDefault.Value);
|
||||
}
|
||||
|
||||
private static bool IsAcceptedSlot(uint itemSlotCategory, IReadOnlyList<uint> accepted)
|
||||
{
|
||||
IEnumerator<uint> enumerator = accepted.GetEnumerator();
|
||||
try
|
||||
foreach (uint item in accepted)
|
||||
{
|
||||
int num = -1139406440;
|
||||
while (true)
|
||||
if (item == itemSlotCategory)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1139406439;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 1:
|
||||
num = (_202D_206A_202A_206D_202C_202E_206A_206C_200D_200F_206E_202B_206D_206D_200B_206D_206B_200E_200D_206E_206C_206A_202B_206D_200B_200D_202B_202B_206B_206A_200D_202A_200B_206D_200B_202D_206A_202E_206F_206D_202E((IEnumerator)enumerator) ? (-1139406438) : (-1139406439));
|
||||
break;
|
||||
case 3:
|
||||
num = ((enumerator.Current != itemSlotCategory) ? (-1139406440) : (-1139406437));
|
||||
break;
|
||||
case 4:
|
||||
num = -1139406440;
|
||||
break;
|
||||
case 2:
|
||||
return true;
|
||||
case 0:
|
||||
goto end_IL_0012;
|
||||
}
|
||||
continue;
|
||||
end_IL_0012:
|
||||
break;
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
int num = ((enumerator == null) ? (-1966232189) : (-1966232192));
|
||||
while (true)
|
||||
{
|
||||
int num7 = num;
|
||||
int num3 = -1966232191;
|
||||
int num4 = num7;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
num = -1966232192;
|
||||
break;
|
||||
case 1:
|
||||
_206C_202E_206F_206E_206E_200E_200C_206A_200B_206E_202C_202E_206D_202D_202D_202E_206E_206D_200D_200D_202A_202B_202C_202B_200B_200F_202B_202B_200F_200C_202D_206C_200D_202B_200E_200F_206D_206E_206B_200C_202E((IDisposable)enumerator);
|
||||
num = -1966232189;
|
||||
break;
|
||||
case 2:
|
||||
goto end_IL_00c5;
|
||||
}
|
||||
continue;
|
||||
end_IL_00c5:
|
||||
break;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static BestItemFinder()
|
||||
{
|
||||
InventoryType[] array = new InventoryType[12];
|
||||
_200B_206D_202E_206F_206A_206F_202B_200E_206E_200B_202D_206C_200F_206D_200D_206B_206A_202C_202C_206E_206E_202C_206D_206C_206F_202C_200F_200F_202A_202D_202B_206F_200E_202C_202C_200D_200B_206D_200D_200D_202E((Array)array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
|
||||
ArmoryAndEquipped = new global::_003C_003Ez__ReadOnlyArray<InventoryType>(array);
|
||||
InventoryType[] array2 = new InventoryType[16];
|
||||
_200B_206D_202E_206F_206A_206F_202B_200E_206E_200B_202D_206C_200F_206D_200D_206B_206A_202C_202C_206E_206E_202C_206D_206C_206F_202C_200F_200F_202A_202D_202B_206F_200E_202C_202C_200D_200B_206D_200D_200D_202E((Array)array2, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
|
||||
ArmoryEquippedAndBags = new global::_003C_003Ez__ReadOnlyArray<InventoryType>(array2);
|
||||
}
|
||||
|
||||
static void _206D_206D_200D_200E_206B_206F_200E_200E_206D_200F_200F_202C_206F_200D_200C_200E_206A_202D_206A_200D_202A_202E_200B_206C_206C_202A_206A_202B_202D_202E_200F_200B_206E_202C_202A_206F_202D_202B_200F_200C_202E(object P_0, string P_1)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(P_0, P_1);
|
||||
}
|
||||
|
||||
static bool _202D_206A_202A_206D_202C_202E_206A_206C_200D_200F_206E_202B_206D_206D_200B_206D_206B_200E_200D_206E_206C_206A_202B_206D_200B_200D_202B_202B_206B_206A_200D_202A_200B_206D_200B_202D_206A_202E_206F_206D_202E(IEnumerator P_0)
|
||||
{
|
||||
return P_0.MoveNext();
|
||||
}
|
||||
|
||||
static void _206C_202E_206F_206E_206E_200E_200C_206A_200B_206E_202C_202E_206D_202D_202D_202E_206E_206D_200D_200D_202A_202B_202C_202B_200B_200F_202B_202B_200F_200C_202D_206C_200D_202B_200E_200F_206D_206E_206B_200C_202E(IDisposable P_0)
|
||||
{
|
||||
P_0.Dispose();
|
||||
}
|
||||
|
||||
static void _200B_206D_202E_206F_206A_206F_202B_200E_206E_200B_202D_206C_200F_206D_200D_206B_206A_202C_202C_206E_206E_202C_206D_206C_206F_202C_200F_200F_202A_202D_202B_206F_200E_202C_202C_200D_200B_206D_200D_200D_202E(Array P_0, RuntimeFieldHandle P_1)
|
||||
{
|
||||
RuntimeHelpers.InitializeArray(P_0, P_1);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,117 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
|
||||
namespace LLib.Gear;
|
||||
|
||||
public readonly record struct BestItemRef(InventoryType Container, int Slot, uint ItemId, uint ItemLevel, float SubstatScore)
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder stringBuilder = _200D_200D_206E_202E_200C_202C_200E_206A_202B_202A_200F_202B_202B_200D_206C_200E_206B_202B_202A_200D_206A_206A_206D_206D_202D_206F_200E_202D_206D_200F_202C_206E_206E_202E_200B_206D_206C_200D_202D_200C_202E();
|
||||
_206A_206C_202E_200E_202B_200E_200B_206F_202D_206C_206A_206A_206B_200E_202B_200B_206D_206F_202E_206D_202C_206B_206B_206F_200E_202A_200D_206B_200F_200E_206A_206D_200D_206A_206B_200B_200B_200F_202E_206A_202E(stringBuilder, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(879982736));
|
||||
_206A_206C_202E_200E_202B_200E_200B_206F_202D_206C_206A_206A_206B_200E_202B_200B_206D_206F_202E_206D_202C_206B_206B_206F_200E_202A_200D_206B_200F_200E_206A_206D_200D_206A_206B_200B_200B_200F_202E_206A_202E(stringBuilder, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(1581517409));
|
||||
int num = ((!PrintMembers(stringBuilder)) ? 1969490728 : 1969490729);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1969490728;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
_200D_206F_202B_200E_206D_206B_206B_206B_202A_206B_202D_206F_202C_206D_202C_202B_206A_200D_200C_206A_206D_200E_200F_206E_206E_206A_206B_206D_202E_206C_206A_206C_206F_202E_202B_202B_206F_200E_206A_206C_202E(stringBuilder, '}');
|
||||
return _202D_200F_202C_200D_206A_202D_206E_206B_202E_206C_200C_200B_200B_202E_202C_200F_200E_206C_206E_206E_202C_202A_200F_200F_200F_202B_206C_200B_202A_206D_200C_206A_200B_202C_202A_206B_202D_206C_200D_200C_202E((object)stringBuilder);
|
||||
case 1:
|
||||
_200D_206F_202B_200E_206D_206B_206B_206B_202A_206B_202D_206F_202C_206D_202C_202B_206A_200D_200C_206A_206D_200E_200F_206E_206E_206A_206B_206D_202E_206C_206A_206C_206F_202E_202B_202B_206F_200E_206A_206C_202E(stringBuilder, ' ');
|
||||
num = 1969490728;
|
||||
break;
|
||||
case 2:
|
||||
num = 1969490729;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
private bool PrintMembers(StringBuilder builder)
|
||||
{
|
||||
_206A_206C_202E_200E_202B_200E_200B_206F_202D_206C_206A_206A_206B_200E_202B_200B_206D_206F_202E_206D_202C_206B_206B_206F_200E_202A_200D_206B_200F_200E_206A_206D_200D_206A_206B_200B_200B_200F_202E_206A_202E(builder, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(-926004725));
|
||||
_206A_206C_202E_200E_202B_200E_200B_206F_202D_206C_206A_206A_206B_200E_202B_200B_206D_206F_202E_206D_202C_206B_206B_206F_200E_202A_200D_206B_200F_200E_206A_206D_200D_206A_206B_200B_200B_200F_202E_206A_202E(builder, Container.ToString());
|
||||
_206A_206C_202E_200E_202B_200E_200B_206F_202D_206C_206A_206A_206B_200E_202B_200B_206D_206F_202E_206D_202C_206B_206B_206F_200E_202A_200D_206B_200F_200E_206A_206D_200D_206A_206B_200B_200B_200F_202E_206A_202E(builder, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(-991935084));
|
||||
_206A_206C_202E_200E_202B_200E_200B_206F_202D_206C_206A_206A_206B_200E_202B_200B_206D_206F_202E_206D_202C_206B_206B_206F_200E_202A_200D_206B_200F_200E_206A_206D_200D_206A_206B_200B_200B_200F_202E_206A_202E(builder, Slot.ToString());
|
||||
_206A_206C_202E_200E_202B_200E_200B_206F_202D_206C_206A_206A_206B_200E_202B_200B_206D_206F_202E_206D_202C_206B_206B_206F_200E_202A_200D_206B_200F_200E_206A_206D_200D_206A_206B_200B_200B_200F_202E_206A_202E(builder, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(-1773173997));
|
||||
_206A_206C_202E_200E_202B_200E_200B_206F_202D_206C_206A_206A_206B_200E_202B_200B_206D_206F_202E_206D_202C_206B_206B_206F_200E_202A_200D_206B_200F_200E_206A_206D_200D_206A_206B_200B_200B_200F_202E_206A_202E(builder, ItemId.ToString());
|
||||
_206A_206C_202E_200E_202B_200E_200B_206F_202D_206C_206A_206A_206B_200E_202B_200B_206D_206F_202E_206D_202C_206B_206B_206F_200E_202A_200D_206B_200F_200E_206A_206D_200D_206A_206B_200B_200B_200F_202E_206A_202E(builder, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(-928952484));
|
||||
_206A_206C_202E_200E_202B_200E_200B_206F_202D_206C_206A_206A_206B_200E_202B_200B_206D_206F_202E_206D_202C_206B_206B_206F_200E_202A_200D_206B_200F_200E_206A_206D_200D_206A_206B_200B_200B_200F_202E_206A_202E(builder, ItemLevel.ToString());
|
||||
_206A_206C_202E_200E_202B_200E_200B_206F_202D_206C_206A_206A_206B_200E_202B_200B_206D_206F_202E_206D_202C_206B_206B_206F_200E_202A_200D_206B_200F_200E_206A_206D_200D_206A_206B_200B_200B_200F_202E_206A_202E(builder, global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-2040749927));
|
||||
_206A_206C_202E_200E_202B_200E_200B_206F_202D_206C_206A_206A_206B_200E_202B_200B_206D_206F_202E_206D_202C_206B_206B_206F_200E_202A_200D_206B_200F_200E_206A_206D_200D_206A_206B_200B_200B_200F_202E_206A_202E(builder, SubstatScore.ToString());
|
||||
return true;
|
||||
}
|
||||
|
||||
[CompilerGenerated]
|
||||
public bool Equals(BestItemRef other)
|
||||
{
|
||||
int num = ((!EqualityComparer<InventoryType>.Default.Equals(Container, other.Container)) ? 542422515 : 542422514);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 542422515;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 4:
|
||||
num = ((!EqualityComparer<uint>.Default.Equals(ItemLevel, other.ItemLevel)) ? 542422515 : 542422518);
|
||||
break;
|
||||
case 1:
|
||||
num = ((!EqualityComparer<int>.Default.Equals(Slot, other.Slot)) ? 542422515 : 542422512);
|
||||
break;
|
||||
case 0:
|
||||
return false;
|
||||
case 5:
|
||||
return EqualityComparer<float>.Default.Equals(SubstatScore, other.SubstatScore);
|
||||
case 3:
|
||||
num = ((!EqualityComparer<uint>.Default.Equals(ItemId, other.ItemId)) ? 542422515 : 542422519);
|
||||
break;
|
||||
case 2:
|
||||
num = 542422514;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool IEquatable<BestItemRef>.Equals(BestItemRef other)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in Equals
|
||||
return this.Equals(other);
|
||||
}
|
||||
|
||||
static StringBuilder _200D_200D_206E_202E_200C_202C_200E_206A_202B_202A_200F_202B_202B_200D_206C_200E_206B_202B_202A_200D_206A_206A_206D_206D_202D_206F_200E_202D_206D_200F_202C_206E_206E_202E_200B_206D_206C_200D_202D_200C_202E()
|
||||
{
|
||||
return new StringBuilder();
|
||||
}
|
||||
|
||||
static StringBuilder _206A_206C_202E_200E_202B_200E_200B_206F_202D_206C_206A_206A_206B_200E_202B_200B_206D_206F_202E_206D_202C_206B_206B_206F_200E_202A_200D_206B_200F_200E_206A_206D_200D_206A_206B_200B_200B_200F_202E_206A_202E(StringBuilder P_0, string P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static StringBuilder _200D_206F_202B_200E_206D_206B_206B_206B_202A_206B_202D_206F_202C_206D_202C_202B_206A_200D_200C_206A_206D_200E_200F_206E_206E_206A_206B_206D_202E_206C_206A_206C_206F_202E_202B_202B_206F_200E_206A_206C_202E(StringBuilder P_0, char P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static string _202D_200F_202C_200D_206A_202D_206E_206B_202E_206C_200C_200B_200B_202E_202C_200F_200E_206C_206E_206E_202C_202A_200F_200F_200F_202B_206C_200B_202A_206D_200C_206A_200B_202C_202A_206B_202D_206C_200D_200C_202E(object P_0)
|
||||
{
|
||||
return P_0.ToString();
|
||||
}
|
||||
}
|
||||
public readonly record struct BestItemRef(InventoryType Container, int Slot, uint ItemId, uint ItemLevel, float SubstatScore);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using Dalamud.Plugin.Services;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game.UI;
|
||||
|
|
@ -16,334 +15,141 @@ public static class DesynthActions
|
|||
public unsafe static bool TryOpenDesynthWindow()
|
||||
{
|
||||
AgentSalvage* ptr = AgentSalvage.Instance();
|
||||
int num = ((ptr != null) ? 423836342 : 423836341);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 423836343;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 1:
|
||||
ptr->AgentInterface.Show();
|
||||
return true;
|
||||
case 2:
|
||||
return false;
|
||||
case 0:
|
||||
goto IL_005a;
|
||||
}
|
||||
continue;
|
||||
IL_005a:
|
||||
num = 423836341;
|
||||
return false;
|
||||
}
|
||||
ptr->AgentInterface.Show();
|
||||
return true;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool IsDesynthAddonReady(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
return gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(-866883789), out addonPtr);
|
||||
return gameGui.TryGetReadyAddon<AtkUnitBase>("SalvageItemSelector", out addonPtr);
|
||||
}
|
||||
|
||||
public unsafe static void SetCategory(AgentSalvage.SalvageItemCategory category)
|
||||
{
|
||||
AgentSalvage* ptr = AgentSalvage.Instance();
|
||||
int num = ((ptr == null) ? (-1642327650) : (-1642327651));
|
||||
while (true)
|
||||
if (ptr != null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1642327649;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
num = -1642327651;
|
||||
break;
|
||||
case 1:
|
||||
return;
|
||||
case 2:
|
||||
ptr->SelectedCategory = category;
|
||||
num = -1642327650;
|
||||
break;
|
||||
}
|
||||
ptr->SelectedCategory = category;
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe static AgentSalvage.SalvageItemCategory GetCategory()
|
||||
{
|
||||
AgentSalvage* ptr = AgentSalvage.Instance();
|
||||
int num = ((ptr != null) ? 1275547526 : 1275547525);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1275547527;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
goto IL_004b;
|
||||
case 2:
|
||||
return AgentSalvage.SalvageItemCategory.InventoryEquipment;
|
||||
case 1:
|
||||
return ptr->SelectedCategory;
|
||||
}
|
||||
continue;
|
||||
IL_004b:
|
||||
num = 1275547525;
|
||||
return AgentSalvage.SalvageItemCategory.InventoryEquipment;
|
||||
}
|
||||
return ptr->SelectedCategory;
|
||||
}
|
||||
|
||||
public unsafe static void RefreshItemList()
|
||||
{
|
||||
AgentSalvage* ptr = AgentSalvage.Instance();
|
||||
int num = ((ptr == null) ? 213710031 : 213710028);
|
||||
while (true)
|
||||
if (ptr != null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 213710029;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
num = 213710028;
|
||||
break;
|
||||
case 2:
|
||||
return;
|
||||
case 1:
|
||||
ptr->ItemListRefresh(isSalvageResultAddonOpen: true);
|
||||
num = 213710031;
|
||||
break;
|
||||
}
|
||||
ptr->ItemListRefresh(isSalvageResultAddonOpen: true);
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe static int GetItemCount()
|
||||
{
|
||||
AgentSalvage* ptr = AgentSalvage.Instance();
|
||||
int num = ((ptr != null) ? (-832139057) : (-832139060));
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -832139059;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 2:
|
||||
return (int)ptr->ItemCount;
|
||||
case 1:
|
||||
return 0;
|
||||
case 0:
|
||||
goto IL_0052;
|
||||
}
|
||||
continue;
|
||||
IL_0052:
|
||||
num = -832139060;
|
||||
return 0;
|
||||
}
|
||||
return (int)ptr->ItemCount;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TrySelectItem(IGameGui gameGui, int itemIndex)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(1627601716), out addonPtr) ? (-770746818) : (-770746819));
|
||||
while (true)
|
||||
if (!gameGui.TryGetReadyAddon<AtkUnitBase>("SalvageItemSelector", out var addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -770746817;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0054;
|
||||
case 2:
|
||||
return false;
|
||||
case 1:
|
||||
AddonCallback.FireWithUpdate(addonPtr, 12, itemIndex);
|
||||
return true;
|
||||
}
|
||||
continue;
|
||||
IL_0054:
|
||||
num = -770746819;
|
||||
return false;
|
||||
}
|
||||
AddonCallback.FireWithUpdate(addonPtr, 12, itemIndex);
|
||||
return true;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool IsConfirmDialogReady(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
return gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-1828930182), out addonPtr);
|
||||
return gameGui.TryGetReadyAddon<AtkUnitBase>("SalvageDialog", out addonPtr);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TryConfirmDesynth(IGameGui gameGui, bool nqOnly = false)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(221638269), out addonPtr) ? (-763680542) : (-763680543));
|
||||
while (true)
|
||||
if (!gameGui.TryGetReadyAddon<AtkUnitBase>("SalvageDialog", out var addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -763680541;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0052;
|
||||
case 1:
|
||||
AddonCallback.FireWithUpdate(addonPtr, 15, nqOnly ? 1 : 0);
|
||||
AddonCallback.FireWithUpdate(addonPtr, default(int), default(int));
|
||||
return true;
|
||||
case 2:
|
||||
return false;
|
||||
}
|
||||
continue;
|
||||
IL_0052:
|
||||
num = -763680543;
|
||||
return false;
|
||||
}
|
||||
AddonCallback.FireWithUpdate(addonPtr, 15, nqOnly ? 1 : 0);
|
||||
AddonCallback.FireWithUpdate(addonPtr, default(int), default(int));
|
||||
return true;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool IsResultDialogReady(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
return gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(-132278347), out addonPtr);
|
||||
return gameGui.TryGetReadyAddon<AtkUnitBase>("SalvageResult", out addonPtr);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TryCloseResultDialog(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(937498069), out addonPtr) ? (-1405203810) : (-1405203811));
|
||||
while (true)
|
||||
if (!gameGui.TryGetReadyAddon<AtkUnitBase>("SalvageResult", out var addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1405203809;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 1:
|
||||
addonPtr->Close(fireCallback: true);
|
||||
return true;
|
||||
case 2:
|
||||
return false;
|
||||
case 0:
|
||||
goto IL_0060;
|
||||
}
|
||||
continue;
|
||||
IL_0060:
|
||||
num = -1405203811;
|
||||
return false;
|
||||
}
|
||||
addonPtr->Close(fireCallback: true);
|
||||
return true;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TryCloseDesynthWindow(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-2023860148), out addonPtr) ? 176704598 : 176704597);
|
||||
while (true)
|
||||
if (!gameGui.TryGetReadyAddon<AtkUnitBase>("SalvageItemSelector", out var addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 176704599;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0052;
|
||||
case 2:
|
||||
return false;
|
||||
case 1:
|
||||
addonPtr->Close(fireCallback: true);
|
||||
return true;
|
||||
}
|
||||
continue;
|
||||
IL_0052:
|
||||
num = 176704597;
|
||||
return false;
|
||||
}
|
||||
addonPtr->Close(fireCallback: true);
|
||||
return true;
|
||||
}
|
||||
|
||||
public unsafe static AgentSalvage.SalvageListItem? GetItemAtIndex(int index)
|
||||
{
|
||||
AgentSalvage* ptr = AgentSalvage.Instance();
|
||||
int num = ((ptr == null) ? 1959558310 : 1959558311);
|
||||
while (true)
|
||||
if (ptr == null || ptr->ItemList == null || index < 0 || index >= ptr->ItemCount)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1959558309;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
num = 1959558311;
|
||||
break;
|
||||
case 2:
|
||||
num = ((ptr->ItemList == null) ? 1959558310 : 1959558305);
|
||||
break;
|
||||
case 1:
|
||||
return ptr->ItemList[index];
|
||||
case 4:
|
||||
num = ((index < 0) ? 1959558310 : 1959558304);
|
||||
break;
|
||||
case 5:
|
||||
num = ((index < ptr->ItemCount) ? 1959558308 : 1959558310);
|
||||
break;
|
||||
case 3:
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
return ptr->ItemList[index];
|
||||
}
|
||||
|
||||
public unsafe static bool TryDesynthDirect(InventoryItem* item)
|
||||
{
|
||||
int num = ((item == null) ? (-1819563004) : (-1819563003));
|
||||
AgentSalvage* ptr = default(AgentSalvage*);
|
||||
while (true)
|
||||
if (item == null || item->ItemId == 0)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1819563004;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 2:
|
||||
num = -1819563003;
|
||||
break;
|
||||
case 1:
|
||||
num = ((item->ItemId != 0) ? (-1819563007) : (-1819563004));
|
||||
break;
|
||||
case 5:
|
||||
ptr = AgentSalvage.Instance();
|
||||
num = ((ptr != null) ? (-1819563001) : (-1819563008));
|
||||
break;
|
||||
case 4:
|
||||
return false;
|
||||
case 3:
|
||||
{
|
||||
ptr->SalvageItem(item, 0, 0);
|
||||
AtkValue* returnValue = stackalloc AtkValue[1];
|
||||
AtkValue* ptr2 = stackalloc AtkValue[2];
|
||||
ptr2->Type = AtkValueType.Int;
|
||||
ptr2->Int = 0;
|
||||
ptr2[1].Type = AtkValueType.Bool;
|
||||
ptr2[1].Byte = 1;
|
||||
ptr->AgentInterface.ReceiveEvent(returnValue, ptr2, 2u, 1uL);
|
||||
return true;
|
||||
}
|
||||
case 0:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
AgentSalvage* ptr = AgentSalvage.Instance();
|
||||
if (ptr == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
ptr->SalvageItem(item, 0, 0);
|
||||
AtkValue* returnValue = stackalloc AtkValue[1];
|
||||
AtkValue* ptr2 = stackalloc AtkValue[2];
|
||||
ptr2->Type = AtkValueType.Int;
|
||||
ptr2->Int = 0;
|
||||
ptr2[1].Type = AtkValueType.Bool;
|
||||
ptr2[1].Byte = 1;
|
||||
ptr->AgentInterface.ReceiveEvent(returnValue, ptr2, 2u, 1uL);
|
||||
return true;
|
||||
}
|
||||
|
||||
public static bool IsDesynthUnlocked()
|
||||
|
|
@ -353,111 +159,49 @@ public static class DesynthActions
|
|||
|
||||
public static bool IsItemDesynthable(IDataManager dataManager, uint itemId)
|
||||
{
|
||||
Item row;
|
||||
int num = (dataManager.GetExcelSheet<Item>().TryGetRow(itemId, out row) ? (-1608454273) : (-1608454276));
|
||||
while (true)
|
||||
if (!dataManager.GetExcelSheet<Item>().TryGetRow(itemId, out var row))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1608454274;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 1:
|
||||
return row.Desynth > 0;
|
||||
case 2:
|
||||
return false;
|
||||
case 0:
|
||||
goto IL_0068;
|
||||
}
|
||||
continue;
|
||||
IL_0068:
|
||||
num = -1608454276;
|
||||
return false;
|
||||
}
|
||||
return row.Desynth > 0;
|
||||
}
|
||||
|
||||
public unsafe static bool CanPlayerDesynthItem(IDataManager dataManager, uint itemId)
|
||||
{
|
||||
Item row;
|
||||
int num = (dataManager.GetExcelSheet<Item>().TryGetRow(itemId, out row) ? (-1179010991) : (-1179010980));
|
||||
PlayerState* ptr = default(PlayerState*);
|
||||
ClassJob? valueNullable = default(ClassJob?);
|
||||
while (true)
|
||||
if (!dataManager.GetExcelSheet<Item>().TryGetRow(itemId, out var row))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1179010983;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 4:
|
||||
num = -1179010980;
|
||||
break;
|
||||
case 6:
|
||||
return false;
|
||||
case 1:
|
||||
return false;
|
||||
case 7:
|
||||
return false;
|
||||
case 5:
|
||||
return false;
|
||||
case 3:
|
||||
ptr = PlayerState.Instance();
|
||||
num = ((ptr != null) ? (-1179010981) : (-1179010984));
|
||||
break;
|
||||
case 2:
|
||||
return ptr->ClassJobLevels[valueNullable.Value.ExpArrayIndex] >= 30;
|
||||
case 8:
|
||||
num = ((row.Desynth > 0) ? (-1179010983) : (-1179010978));
|
||||
break;
|
||||
case 0:
|
||||
valueNullable = row.ClassJobRepair.ValueNullable;
|
||||
num = (valueNullable.HasValue ? (-1179010982) : (-1179010977));
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (row.Desynth <= 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
ClassJob? valueNullable = row.ClassJobRepair.ValueNullable;
|
||||
if (!valueNullable.HasValue)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
PlayerState* ptr = PlayerState.Instance();
|
||||
if (ptr == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return ptr->ClassJobLevels[valueNullable.Value.ExpArrayIndex] >= 30;
|
||||
}
|
||||
|
||||
public unsafe static float GetDesynthLevel(uint classJobId)
|
||||
{
|
||||
PlayerState* ptr = PlayerState.Instance();
|
||||
bool flag = ptr == null;
|
||||
int num = (flag ? 659072519 : 659072518);
|
||||
bool flag2 = default(bool);
|
||||
while (true)
|
||||
if (!flag)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 659072516;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 7:
|
||||
return ptr->GetDesynthesisLevel(classJobId);
|
||||
case 8:
|
||||
num = ((classJobId <= 15) ? 659072513 : 659072516);
|
||||
break;
|
||||
case 2:
|
||||
num = ((classJobId < 8) ? 659072516 : 659072524);
|
||||
break;
|
||||
case 5:
|
||||
flag2 = false;
|
||||
num = 659072517;
|
||||
break;
|
||||
case 3:
|
||||
num = ((!flag) ? 659072515 : 659072512);
|
||||
break;
|
||||
case 1:
|
||||
flag = flag2;
|
||||
num = 659072519;
|
||||
break;
|
||||
case 0:
|
||||
flag2 = true;
|
||||
num = 659072517;
|
||||
break;
|
||||
case 4:
|
||||
return 0f;
|
||||
case 6:
|
||||
num = 659072518;
|
||||
break;
|
||||
}
|
||||
bool flag2 = ((classJobId < 8 || classJobId > 15) ? true : false);
|
||||
flag = flag2;
|
||||
}
|
||||
if (flag)
|
||||
{
|
||||
return 0f;
|
||||
}
|
||||
return ptr->GetDesynthesisLevel(classJobId);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,402 +6,137 @@ public static class EEquipSlotCategoryExtensions
|
|||
{
|
||||
public static InventoryType? GetArmoryContainer(this EEquipSlotCategory slot)
|
||||
{
|
||||
int num;
|
||||
InventoryType? result = default(InventoryType?);
|
||||
switch (slot)
|
||||
{
|
||||
default:
|
||||
num = -2089769317;
|
||||
goto IL_0047;
|
||||
case EEquipSlotCategory.Ears:
|
||||
result = InventoryType.ArmoryEar;
|
||||
num = -2089769327;
|
||||
goto IL_0047;
|
||||
case EEquipSlotCategory.Shield:
|
||||
goto IL_00b7;
|
||||
case EEquipSlotCategory.Hands:
|
||||
goto IL_00cd;
|
||||
case EEquipSlotCategory.Head:
|
||||
goto IL_00e3;
|
||||
case (EEquipSlotCategory)6u:
|
||||
goto IL_00f9;
|
||||
case EEquipSlotCategory.Body:
|
||||
goto IL_010e;
|
||||
case EEquipSlotCategory.Legs:
|
||||
goto IL_0131;
|
||||
case EEquipSlotCategory.Feet:
|
||||
goto IL_0147;
|
||||
case EEquipSlotCategory.Wrists:
|
||||
goto IL_015d;
|
||||
case EEquipSlotCategory.OneHandedMainHand:
|
||||
case EEquipSlotCategory.TwoHandedMainHand:
|
||||
goto IL_017e;
|
||||
return InventoryType.ArmoryMainHand;
|
||||
case EEquipSlotCategory.Shield:
|
||||
return InventoryType.ArmoryOffHand;
|
||||
case EEquipSlotCategory.Head:
|
||||
return InventoryType.ArmoryHead;
|
||||
case EEquipSlotCategory.Body:
|
||||
return InventoryType.ArmoryBody;
|
||||
case EEquipSlotCategory.Hands:
|
||||
return InventoryType.ArmoryHands;
|
||||
case EEquipSlotCategory.Legs:
|
||||
return InventoryType.ArmoryLegs;
|
||||
case EEquipSlotCategory.Feet:
|
||||
return InventoryType.ArmoryFeets;
|
||||
case EEquipSlotCategory.Ears:
|
||||
return InventoryType.ArmoryEar;
|
||||
case EEquipSlotCategory.Neck:
|
||||
goto IL_0194;
|
||||
return InventoryType.ArmoryNeck;
|
||||
case EEquipSlotCategory.Wrists:
|
||||
return InventoryType.ArmoryWrist;
|
||||
case EEquipSlotCategory.Rings:
|
||||
goto IL_01aa;
|
||||
IL_0047:
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -2089769328;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 7:
|
||||
goto end_IL_0047;
|
||||
case 8:
|
||||
goto IL_00b7;
|
||||
case 10:
|
||||
goto IL_00cd;
|
||||
case 5:
|
||||
goto IL_00e3;
|
||||
case 2:
|
||||
goto IL_00f9;
|
||||
case 9:
|
||||
goto IL_010e;
|
||||
case 1:
|
||||
return result;
|
||||
case 0:
|
||||
num = -2089769317;
|
||||
break;
|
||||
case 12:
|
||||
goto IL_0131;
|
||||
case 6:
|
||||
goto IL_0147;
|
||||
case 13:
|
||||
goto IL_015d;
|
||||
case 11:
|
||||
num = -2089769326;
|
||||
break;
|
||||
case 4:
|
||||
goto IL_017e;
|
||||
case 3:
|
||||
goto IL_0194;
|
||||
case 14:
|
||||
goto IL_01aa;
|
||||
}
|
||||
continue;
|
||||
end_IL_0047:
|
||||
break;
|
||||
}
|
||||
goto case EEquipSlotCategory.Ears;
|
||||
IL_01aa:
|
||||
result = InventoryType.ArmoryRings;
|
||||
num = -2089769327;
|
||||
goto IL_0047;
|
||||
IL_0194:
|
||||
result = InventoryType.ArmoryNeck;
|
||||
num = -2089769327;
|
||||
goto IL_0047;
|
||||
IL_017e:
|
||||
result = InventoryType.ArmoryMainHand;
|
||||
num = -2089769327;
|
||||
goto IL_0047;
|
||||
IL_015d:
|
||||
result = InventoryType.ArmoryWrist;
|
||||
num = -2089769327;
|
||||
goto IL_0047;
|
||||
IL_0147:
|
||||
result = InventoryType.ArmoryFeets;
|
||||
num = -2089769327;
|
||||
goto IL_0047;
|
||||
IL_0131:
|
||||
result = InventoryType.ArmoryLegs;
|
||||
num = -2089769327;
|
||||
goto IL_0047;
|
||||
IL_010e:
|
||||
result = InventoryType.ArmoryBody;
|
||||
num = -2089769327;
|
||||
goto IL_0047;
|
||||
IL_00f9:
|
||||
result = null;
|
||||
num = -2089769327;
|
||||
goto IL_0047;
|
||||
IL_00e3:
|
||||
result = InventoryType.ArmoryHead;
|
||||
num = -2089769327;
|
||||
goto IL_0047;
|
||||
IL_00cd:
|
||||
result = InventoryType.ArmoryHands;
|
||||
num = -2089769327;
|
||||
goto IL_0047;
|
||||
IL_00b7:
|
||||
result = InventoryType.ArmoryOffHand;
|
||||
num = -2089769327;
|
||||
goto IL_0047;
|
||||
return InventoryType.ArmoryRings;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe static int? FindFreeSlot(InventoryType container)
|
||||
{
|
||||
InventoryManager* ptr = InventoryManager.Instance();
|
||||
int num = ((ptr != null) ? (-1184837257) : (-1184837263));
|
||||
int num5 = default(int);
|
||||
InventoryItem* inventorySlot = default(InventoryItem*);
|
||||
InventoryContainer* inventoryContainer = default(InventoryContainer*);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1184837262;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
return null;
|
||||
}
|
||||
InventoryContainer* inventoryContainer = ptr->GetInventoryContainer(container);
|
||||
if (inventoryContainer == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (int i = 0; i < inventoryContainer->Size; i++)
|
||||
{
|
||||
InventoryItem* inventorySlot = inventoryContainer->GetInventorySlot(i);
|
||||
if (inventorySlot != null && inventorySlot->ItemId == 0)
|
||||
{
|
||||
case 7:
|
||||
return null;
|
||||
case 0:
|
||||
num5 = 0;
|
||||
num = -1184837260;
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
int num6 = num5;
|
||||
num3 = 1;
|
||||
num4 = num6;
|
||||
int num7 = num4 ^ num3;
|
||||
int num8 = num4 & num3;
|
||||
num5 = num7 + (num8 + num8);
|
||||
num = -1184837260;
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
return null;
|
||||
case 9:
|
||||
return num5;
|
||||
case 10:
|
||||
inventorySlot = inventoryContainer->GetInventorySlot(num5);
|
||||
num = ((inventorySlot == null) ? (-1184837264) : (-1184837254));
|
||||
break;
|
||||
case 3:
|
||||
return null;
|
||||
case 5:
|
||||
inventoryContainer = ptr->GetInventoryContainer(container);
|
||||
num = ((inventoryContainer != null) ? (-1184837262) : (-1184837259));
|
||||
break;
|
||||
case 8:
|
||||
num = ((inventorySlot->ItemId != 0) ? (-1184837264) : (-1184837253));
|
||||
break;
|
||||
case 4:
|
||||
num = -1184837263;
|
||||
break;
|
||||
case 6:
|
||||
num = ((num5 < inventoryContainer->Size) ? (-1184837256) : (-1184837261));
|
||||
break;
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public unsafe static bool TryUnequipItem(int equippedSlotIndex)
|
||||
{
|
||||
int num;
|
||||
InventoryType? inventoryType2 = default(InventoryType?);
|
||||
InventoryManager* ptr = default(InventoryManager*);
|
||||
InventoryType valueOrDefault2 = default(InventoryType);
|
||||
int valueOrDefault = default(int);
|
||||
InventoryType? inventoryType = default(InventoryType?);
|
||||
int? num7 = default(int?);
|
||||
InventoryItem* inventorySlot = default(InventoryItem*);
|
||||
InventoryContainer* inventoryContainer = default(InventoryContainer*);
|
||||
InventoryType? inventoryType;
|
||||
switch (equippedSlotIndex)
|
||||
{
|
||||
default:
|
||||
num = 1686328571;
|
||||
goto IL_004a;
|
||||
case 0:
|
||||
inventoryType = InventoryType.ArmoryMainHand;
|
||||
break;
|
||||
case 1:
|
||||
inventoryType = InventoryType.ArmoryOffHand;
|
||||
break;
|
||||
case 2:
|
||||
inventoryType = InventoryType.ArmoryHead;
|
||||
break;
|
||||
case 3:
|
||||
inventoryType = InventoryType.ArmoryBody;
|
||||
break;
|
||||
case 4:
|
||||
inventoryType = InventoryType.ArmoryHands;
|
||||
break;
|
||||
case 6:
|
||||
inventoryType2 = InventoryType.ArmoryLegs;
|
||||
num = 1686328552;
|
||||
goto IL_004a;
|
||||
inventoryType = InventoryType.ArmoryLegs;
|
||||
break;
|
||||
case 7:
|
||||
inventoryType = InventoryType.ArmoryFeets;
|
||||
break;
|
||||
case 8:
|
||||
inventoryType = InventoryType.ArmoryEar;
|
||||
break;
|
||||
case 9:
|
||||
inventoryType = InventoryType.ArmoryNeck;
|
||||
break;
|
||||
case 10:
|
||||
inventoryType = InventoryType.ArmoryWrist;
|
||||
break;
|
||||
case 11:
|
||||
case 12:
|
||||
goto IL_0106;
|
||||
case 0:
|
||||
goto IL_0147;
|
||||
case 7:
|
||||
goto IL_018d;
|
||||
case 3:
|
||||
goto IL_01d1;
|
||||
case 1:
|
||||
goto IL_022c;
|
||||
case 5:
|
||||
goto IL_0259;
|
||||
case 10:
|
||||
goto IL_0271;
|
||||
inventoryType = InventoryType.ArmoryRings;
|
||||
break;
|
||||
case 13:
|
||||
goto IL_029d;
|
||||
case 4:
|
||||
goto IL_02db;
|
||||
case 8:
|
||||
goto IL_0301;
|
||||
case 2:
|
||||
goto IL_0351;
|
||||
case 9:
|
||||
goto IL_036b;
|
||||
IL_004a:
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1686328567;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 24:
|
||||
return false;
|
||||
case 14:
|
||||
goto end_IL_004a;
|
||||
case 8:
|
||||
goto IL_0106;
|
||||
case 27:
|
||||
return false;
|
||||
case 31:
|
||||
goto IL_0120;
|
||||
case 6:
|
||||
goto IL_0147;
|
||||
case 22:
|
||||
goto IL_015f;
|
||||
case 30:
|
||||
return false;
|
||||
case 4:
|
||||
goto IL_018d;
|
||||
case 11:
|
||||
goto IL_01a5;
|
||||
case 15:
|
||||
goto IL_01d1;
|
||||
case 16:
|
||||
goto IL_01e9;
|
||||
case 20:
|
||||
goto IL_0208;
|
||||
case 18:
|
||||
goto IL_022c;
|
||||
case 2:
|
||||
ptr->MoveItemSlot(InventoryType.EquippedItems, (ushort)equippedSlotIndex, valueOrDefault2, (ushort)valueOrDefault, a6: true);
|
||||
return true;
|
||||
case 19:
|
||||
goto IL_0259;
|
||||
case 3:
|
||||
goto IL_0271;
|
||||
case 13:
|
||||
valueOrDefault2 = inventoryType.GetValueOrDefault();
|
||||
num = 1686328557;
|
||||
break;
|
||||
case 5:
|
||||
goto IL_029d;
|
||||
case 26:
|
||||
goto IL_02b5;
|
||||
case 7:
|
||||
goto IL_02db;
|
||||
case 0:
|
||||
num = 1686328571;
|
||||
break;
|
||||
case 28:
|
||||
return false;
|
||||
case 1:
|
||||
goto IL_0301;
|
||||
case 21:
|
||||
goto IL_0319;
|
||||
case 12:
|
||||
num = 1686328548;
|
||||
break;
|
||||
case 23:
|
||||
return false;
|
||||
case 25:
|
||||
goto IL_0351;
|
||||
case 17:
|
||||
return false;
|
||||
case 29:
|
||||
goto IL_036b;
|
||||
case 10:
|
||||
valueOrDefault = num7.GetValueOrDefault();
|
||||
num = 1686328565;
|
||||
break;
|
||||
case 9:
|
||||
goto IL_0398;
|
||||
}
|
||||
continue;
|
||||
IL_0398:
|
||||
num = ((inventorySlot->ItemId != 0) ? 1686328545 : 1686328553);
|
||||
continue;
|
||||
IL_015f:
|
||||
num7 = FindFreeSlot(valueOrDefault2);
|
||||
num = ((!num7.HasValue) ? 1686328556 : 1686328573);
|
||||
continue;
|
||||
IL_0208:
|
||||
num = ((equippedSlotIndex < inventoryContainer->Size) ? 1686328546 : 1686328555);
|
||||
continue;
|
||||
IL_0319:
|
||||
inventorySlot = inventoryContainer->GetInventorySlot(equippedSlotIndex);
|
||||
num = ((inventorySlot == null) ? 1686328553 : 1686328574);
|
||||
continue;
|
||||
IL_0120:
|
||||
inventoryType = inventoryType2;
|
||||
num = ((!inventoryType.HasValue) ? 1686328544 : 1686328570);
|
||||
continue;
|
||||
IL_01a5:
|
||||
inventoryContainer = ptr->GetInventoryContainer(InventoryType.EquippedItems);
|
||||
num = ((inventoryContainer != null) ? 1686328551 : 1686328559);
|
||||
continue;
|
||||
IL_02b5:
|
||||
ptr = InventoryManager.Instance();
|
||||
num = ((ptr != null) ? 1686328572 : 1686328550);
|
||||
continue;
|
||||
IL_01e9:
|
||||
num = ((equippedSlotIndex < 0) ? 1686328555 : 1686328547);
|
||||
continue;
|
||||
end_IL_004a:
|
||||
break;
|
||||
}
|
||||
goto case 6;
|
||||
IL_036b:
|
||||
inventoryType2 = InventoryType.ArmoryNeck;
|
||||
num = 1686328552;
|
||||
goto IL_004a;
|
||||
IL_0351:
|
||||
inventoryType2 = InventoryType.ArmoryHead;
|
||||
num = 1686328552;
|
||||
goto IL_004a;
|
||||
IL_0301:
|
||||
inventoryType2 = InventoryType.ArmoryEar;
|
||||
num = 1686328552;
|
||||
goto IL_004a;
|
||||
IL_02db:
|
||||
inventoryType2 = InventoryType.ArmoryHands;
|
||||
num = 1686328552;
|
||||
goto IL_004a;
|
||||
IL_029d:
|
||||
inventoryType2 = InventoryType.ArmorySoulCrystal;
|
||||
num = 1686328552;
|
||||
goto IL_004a;
|
||||
IL_0271:
|
||||
inventoryType2 = InventoryType.ArmoryWrist;
|
||||
num = 1686328552;
|
||||
goto IL_004a;
|
||||
IL_0259:
|
||||
inventoryType2 = null;
|
||||
num = 1686328552;
|
||||
goto IL_004a;
|
||||
IL_022c:
|
||||
inventoryType2 = InventoryType.ArmoryOffHand;
|
||||
num = 1686328552;
|
||||
goto IL_004a;
|
||||
IL_01d1:
|
||||
inventoryType2 = InventoryType.ArmoryBody;
|
||||
num = 1686328552;
|
||||
goto IL_004a;
|
||||
IL_018d:
|
||||
inventoryType2 = InventoryType.ArmoryFeets;
|
||||
num = 1686328552;
|
||||
goto IL_004a;
|
||||
IL_0147:
|
||||
inventoryType2 = InventoryType.ArmoryMainHand;
|
||||
num = 1686328552;
|
||||
goto IL_004a;
|
||||
IL_0106:
|
||||
inventoryType2 = InventoryType.ArmoryRings;
|
||||
num = 1686328552;
|
||||
goto IL_004a;
|
||||
inventoryType = InventoryType.ArmorySoulCrystal;
|
||||
break;
|
||||
default:
|
||||
inventoryType = null;
|
||||
break;
|
||||
}
|
||||
InventoryType? inventoryType2 = inventoryType;
|
||||
if (inventoryType2.HasValue)
|
||||
{
|
||||
InventoryType valueOrDefault = inventoryType2.GetValueOrDefault();
|
||||
InventoryManager* ptr = InventoryManager.Instance();
|
||||
if (ptr == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
InventoryContainer* inventoryContainer = ptr->GetInventoryContainer(InventoryType.EquippedItems);
|
||||
if (inventoryContainer == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (equippedSlotIndex < 0 || equippedSlotIndex >= inventoryContainer->Size)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
InventoryItem* inventorySlot = inventoryContainer->GetInventorySlot(equippedSlotIndex);
|
||||
if (inventorySlot == null || inventorySlot->ItemId == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
int? num = FindFreeSlot(valueOrDefault);
|
||||
if (num.HasValue)
|
||||
{
|
||||
int valueOrDefault2 = num.GetValueOrDefault();
|
||||
ptr->MoveItemSlot(InventoryType.EquippedItems, (ushort)equippedSlotIndex, valueOrDefault, (ushort)valueOrDefault2, a6: true);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,48 +11,20 @@ public static class EquipmentSlots
|
|||
public unsafe static InventoryContainer* GetEquippedContainer()
|
||||
{
|
||||
InventoryManager* ptr = InventoryManager.Instance();
|
||||
int num = ((ptr != null) ? (-579848400) : (-579848397));
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -579848398;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0049;
|
||||
case 1:
|
||||
return null;
|
||||
case 2:
|
||||
return ptr->GetInventoryContainer(InventoryType.EquippedItems);
|
||||
}
|
||||
continue;
|
||||
IL_0049:
|
||||
num = -579848397;
|
||||
return null;
|
||||
}
|
||||
return ptr->GetInventoryContainer(InventoryType.EquippedItems);
|
||||
}
|
||||
|
||||
public unsafe static bool TryGetEquippedItem(InventoryContainer* container, int slotIndex, out InventoryItem* item)
|
||||
{
|
||||
item = container->GetInventorySlot(slotIndex);
|
||||
int num = ((item == null) ? 365336456 : 365336459);
|
||||
while (true)
|
||||
if (item != null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 365336458;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_004d;
|
||||
case 2:
|
||||
return false;
|
||||
case 1:
|
||||
return item->ItemId != 0;
|
||||
}
|
||||
continue;
|
||||
IL_004d:
|
||||
num = 365336459;
|
||||
return item->ItemId != 0;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,23 +1,11 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
|
||||
namespace LLib.Gear;
|
||||
|
||||
public sealed record EquipmentStats(Dictionary<EBaseParam, StatInfo> Stats, byte MateriaCount)
|
||||
{
|
||||
[CompilerGenerated]
|
||||
private Type EqualityContract
|
||||
{
|
||||
[CompilerGenerated]
|
||||
get
|
||||
{
|
||||
return _206D_200D_202A_206A_206A_206A_200F_202C_202C_202D_206D_206F_206C_200D_200C_206C_202D_202E_202B_206E_202B_202B_202D_206C_200C_200F_202E_206D_200B_202E_200B_206E_202D_202A_200D_200B_200C_206B_200E_200D_202E(typeof(EquipmentStats).TypeHandle);
|
||||
}
|
||||
}
|
||||
|
||||
public short Get(EBaseParam param)
|
||||
{
|
||||
return (short)(GetEquipment(param) + GetMateria(param));
|
||||
|
|
@ -26,79 +14,19 @@ public sealed record EquipmentStats(Dictionary<EBaseParam, StatInfo> Stats, byte
|
|||
public short GetEquipment(EBaseParam param)
|
||||
{
|
||||
Stats.TryGetValue(param, out StatInfo value);
|
||||
int num = (((object)value != null) ? (-1344068202) : (-1344068203));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1344068204;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0052;
|
||||
case 1:
|
||||
return 0;
|
||||
case 2:
|
||||
return value.EquipmentValue;
|
||||
}
|
||||
continue;
|
||||
IL_0052:
|
||||
num = -1344068203;
|
||||
}
|
||||
return value?.EquipmentValue ?? 0;
|
||||
}
|
||||
|
||||
public short GetMateria(EBaseParam param)
|
||||
{
|
||||
Stats.TryGetValue(param, out StatInfo value);
|
||||
int num = (((object)value != null) ? 1796035726 : 1796035727);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1796035726;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 2:
|
||||
goto IL_0052;
|
||||
case 0:
|
||||
return value.MateriaValue;
|
||||
case 1:
|
||||
return 0;
|
||||
}
|
||||
continue;
|
||||
IL_0052:
|
||||
num = 1796035727;
|
||||
}
|
||||
return value?.MateriaValue ?? 0;
|
||||
}
|
||||
|
||||
public bool IsOvercapped(EBaseParam param)
|
||||
{
|
||||
Stats.TryGetValue(param, out StatInfo value);
|
||||
int num = (((object)value != null) ? 1825983400 : 1825983403);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1825983401;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0052;
|
||||
case 1:
|
||||
return value.Overcapped;
|
||||
case 2:
|
||||
return false;
|
||||
}
|
||||
continue;
|
||||
IL_0052:
|
||||
num = 1825983403;
|
||||
}
|
||||
return value?.Overcapped ?? false;
|
||||
}
|
||||
|
||||
public bool Has(EBaseParam substat)
|
||||
|
|
@ -113,197 +41,30 @@ public sealed record EquipmentStats(Dictionary<EBaseParam, StatInfo> Stats, byte
|
|||
|
||||
public bool Equals(EquipmentStats? other)
|
||||
{
|
||||
int num = ((other == null) ? 948419368 : 948419369);
|
||||
StatInfo statInfo = default(StatInfo);
|
||||
StatInfo value2 = default(StatInfo);
|
||||
while (true)
|
||||
if (other == null || MateriaCount != other.MateriaCount || Stats.Count != other.Stats.Count)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 948419368;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
return false;
|
||||
}
|
||||
foreach (var (key, objA) in Stats)
|
||||
{
|
||||
if (!other.Stats.TryGetValue(key, out StatInfo value) || !object.Equals(objA, value))
|
||||
{
|
||||
case 3:
|
||||
num = 948419369;
|
||||
break;
|
||||
case 1:
|
||||
num = ((MateriaCount != other.MateriaCount) ? 948419368 : 948419372);
|
||||
break;
|
||||
case 4:
|
||||
num = ((Stats.Count == other.Stats.Count) ? 948419370 : 948419368);
|
||||
break;
|
||||
case 0:
|
||||
return false;
|
||||
case 2:
|
||||
{
|
||||
using (Dictionary<EBaseParam, StatInfo>.Enumerator enumerator = Stats.GetEnumerator())
|
||||
{
|
||||
num = -2102937561;
|
||||
while (true)
|
||||
{
|
||||
int num7 = num;
|
||||
num3 = -2102937566;
|
||||
num4 = num7;
|
||||
int num8 = num4 + num3;
|
||||
int num9 = num4 & num3;
|
||||
switch (num8 - (num9 + num9))
|
||||
{
|
||||
case 3:
|
||||
return false;
|
||||
case 2:
|
||||
num = (_202B_206A_200D_206F_202E_202A_200C_200F_200D_202D_202B_202B_200C_202E_200B_202B_206A_200E_200F_206C_202D_202B_200C_200D_206E_206A_206B_200D_202C_206E_202C_202D_206F_202E_202A_202A_200C_206A_202B_202C_202E((object)statInfo, (object)value2) ? (-2102937561) : (-2102937567));
|
||||
break;
|
||||
case 5:
|
||||
num = (enumerator.MoveNext() ? (-2102937562) : (-2102937565));
|
||||
break;
|
||||
case 0:
|
||||
num = -2102937561;
|
||||
break;
|
||||
case 4:
|
||||
{
|
||||
enumerator.Current.Deconstruct(out var key, out var value);
|
||||
EBaseParam key2 = key;
|
||||
statInfo = value;
|
||||
num = ((!other.Stats.TryGetValue(key2, out value2)) ? (-2102937567) : (-2102937568));
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
goto end_IL_00dc;
|
||||
}
|
||||
continue;
|
||||
end_IL_00dc:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool IEquatable<EquipmentStats>.Equals(EquipmentStats? other)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in Equals
|
||||
return this.Equals(other);
|
||||
return true;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int num = MateriaCount.GetHashCode();
|
||||
using Dictionary<EBaseParam, StatInfo>.Enumerator enumerator = Stats.GetEnumerator();
|
||||
int num2 = 1490502903;
|
||||
while (true)
|
||||
foreach (KeyValuePair<EBaseParam, StatInfo> stat in Stats)
|
||||
{
|
||||
int num3 = num2;
|
||||
int num4 = 1490502902;
|
||||
int num5 = num3;
|
||||
int num6 = num5 + num4;
|
||||
int num7 = num5 & num4;
|
||||
switch (num6 - (num7 + num7))
|
||||
{
|
||||
case 3:
|
||||
num2 = 1490502903;
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
enumerator.Current.Deconstruct(out var key, out var value);
|
||||
EBaseParam value2 = key;
|
||||
StatInfo value3 = value;
|
||||
num ^= HashCode.Combine(value2, value3);
|
||||
num2 = 1490502903;
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
num2 = (enumerator.MoveNext() ? 1490502900 : 1490502902);
|
||||
break;
|
||||
case 0:
|
||||
return num;
|
||||
}
|
||||
stat.Deconstruct(out var key, out var value);
|
||||
EBaseParam value2 = key;
|
||||
StatInfo value3 = value;
|
||||
num ^= HashCode.Combine(value2, value3);
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder stringBuilder = _206D_200D_206D_206D_200B_200C_206E_200E_206C_200C_206F_206D_202D_206F_202D_202D_200F_202D_206A_202A_206B_206F_202E_206E_200C_206E_202D_202C_202B_200B_200E_200D_202D_200E_202C_206D_202B_206C_202D_202B_202E();
|
||||
_206D_202C_202C_200D_200B_202D_206F_206D_206A_200F_202B_200F_206E_202C_206E_206E_200D_202C_206E_206C_206F_202D_202D_202B_206F_202A_202A_202D_200E_206D_200F_206D_206B_206F_202C_200B_206C_202E_202D_200D_202E(stringBuilder, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(137609556));
|
||||
_206D_202C_202C_200D_200B_202D_206F_206D_206A_200F_202B_200F_206E_202C_206E_206E_200D_202C_206E_206C_206F_202D_202D_202B_206F_202A_202A_202D_200E_206D_200F_206D_206B_206F_202C_200B_206C_202E_202D_200D_202E(stringBuilder, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(1808631505));
|
||||
int num = ((!PrintMembers(stringBuilder)) ? (-1401190179) : (-1401190180));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1401190179;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
_200C_206A_202D_200E_200F_200E_200C_202A_200E_200E_206B_202A_202A_206B_202B_206E_202D_202D_206A_206A_202C_206D_206B_200F_206A_200F_202D_200D_202C_200F_200F_200F_206A_206A_206C_206C_200E_200F_200D_206B_202E(stringBuilder, '}');
|
||||
return _202E_200B_206C_202B_206C_200C_202E_206E_206B_206D_202B_202C_202D_202C_206B_202B_206E_202B_202D_206E_206C_200C_202A_206C_206F_206F_202C_200F_200C_200F_202B_206A_206A_202E_202E_202A_200D_202C_202C_202E((object)stringBuilder);
|
||||
case 1:
|
||||
_200C_206A_202D_200E_200F_200E_200C_202A_200E_200E_206B_202A_202A_206B_202B_206E_202D_202D_206A_206A_202C_206D_206B_200F_206A_200F_202D_200D_202C_200F_200F_200F_206A_206A_206C_206C_200E_200F_200D_206B_202E(stringBuilder, ' ');
|
||||
num = -1401190179;
|
||||
break;
|
||||
case 2:
|
||||
num = -1401190180;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
private bool PrintMembers(StringBuilder builder)
|
||||
{
|
||||
_206C_202B_202C_202E_202C_206E_206E_200F_202B_200C_200C_202B_202D_206C_206F_206D_206E_200D_202C_206F_202D_202E_202A_206D_206A_202C_200B_206E_202D_200C_200F_202A_200C_202B_202C_206A_202E_206D_206B_202A_202E();
|
||||
_206D_202C_202C_200D_200B_202D_206F_206D_206A_200F_202B_200F_206E_202C_206E_206E_200D_202C_206E_206C_206F_202D_202D_202B_206F_202A_202A_202D_200E_206D_200F_206D_206B_206F_202C_200B_206C_202E_202D_200D_202E(builder, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(-716646928));
|
||||
_200E_202D_206A_200C_206A_200D_202A_200F_200C_206E_202B_206A_200D_206D_206F_206A_206B_206C_206C_202B_206D_200F_200D_200D_200C_206F_200D_200E_206A_206E_200F_202A_202B_200B_206B_206E_202C_200C_200D_202E_202E(builder, (object)Stats);
|
||||
_206D_202C_202C_200D_200B_202D_206F_206D_206A_200F_202B_200F_206E_202C_206E_206E_200D_202C_206E_206C_206F_202D_202D_202B_206F_202A_202A_202D_200E_206D_200F_206D_206B_206F_202C_200B_206C_202E_202D_200D_202E(builder, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(-88604916));
|
||||
_206D_202C_202C_200D_200B_202D_206F_206D_206A_200F_202B_200F_206E_202C_206E_206E_200D_202C_206E_206C_206F_202D_202D_202B_206F_202A_202A_202D_200E_206D_200F_206D_206B_206F_202C_200B_206C_202E_202D_200D_202E(builder, MateriaCount.ToString());
|
||||
return true;
|
||||
}
|
||||
|
||||
static Type _206D_200D_202A_206A_206A_206A_200F_202C_202C_202D_206D_206F_206C_200D_200C_206C_202D_202E_202B_206E_202B_202B_202D_206C_200C_200F_202E_206D_200B_202E_200B_206E_202D_202A_200D_200B_200C_206B_200E_200D_202E(RuntimeTypeHandle P_0)
|
||||
{
|
||||
return Type.GetTypeFromHandle(P_0);
|
||||
}
|
||||
|
||||
static bool _202B_206A_200D_206F_202E_202A_200C_200F_200D_202D_202B_202B_200C_202E_200B_202B_206A_200E_200F_206C_202D_202B_200C_200D_206E_206A_206B_200D_202C_206E_202C_202D_206F_202E_202A_202A_200C_206A_202B_202C_202E(object P_0, object P_1)
|
||||
{
|
||||
return object.Equals(P_0, P_1);
|
||||
}
|
||||
|
||||
static StringBuilder _206D_200D_206D_206D_200B_200C_206E_200E_206C_200C_206F_206D_202D_206F_202D_202D_200F_202D_206A_202A_206B_206F_202E_206E_200C_206E_202D_202C_202B_200B_200E_200D_202D_200E_202C_206D_202B_206C_202D_202B_202E()
|
||||
{
|
||||
return new StringBuilder();
|
||||
}
|
||||
|
||||
static StringBuilder _206D_202C_202C_200D_200B_202D_206F_206D_206A_200F_202B_200F_206E_202C_206E_206E_200D_202C_206E_206C_206F_202D_202D_202B_206F_202A_202A_202D_200E_206D_200F_206D_206B_206F_202C_200B_206C_202E_202D_200D_202E(StringBuilder P_0, string P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static StringBuilder _200C_206A_202D_200E_200F_200E_200C_202A_200E_200E_206B_202A_202A_206B_202B_206E_202D_202D_206A_206A_202C_206D_206B_200F_206A_200F_202D_200D_202C_200F_200F_200F_206A_206A_206C_206C_200E_200F_200D_206B_202E(StringBuilder P_0, char P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static string _202E_200B_206C_202B_206C_200C_202E_206E_206B_206D_202B_202C_202D_202C_206B_202B_206E_202B_202D_206E_206C_200C_202A_206C_206F_206F_202C_200F_200C_200F_202B_206A_206A_202E_202E_202A_200D_202C_202C_202E(object P_0)
|
||||
{
|
||||
return P_0.ToString();
|
||||
}
|
||||
|
||||
static void _206C_202B_202C_202E_202C_206E_206E_200F_202B_200C_200C_202B_202D_206C_206F_206D_206E_200D_202C_206F_202D_202E_202A_206D_206A_202C_200B_206E_202D_200C_200F_202A_200C_202B_202C_206A_202E_206D_206B_202A_202E()
|
||||
{
|
||||
RuntimeHelpers.EnsureSufficientExecutionStack();
|
||||
}
|
||||
|
||||
static StringBuilder _200E_202D_206A_200C_206A_200D_202A_200F_200C_206E_202B_206A_200D_206D_206F_206A_206B_206C_206C_202B_206D_200F_200D_200D_200C_206F_200D_200E_206A_206E_200F_202A_202B_200B_206B_206E_202C_200C_200D_202E_202E(StringBuilder P_0, object P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
return num;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,47 +27,15 @@ public readonly struct ExtendedBaseParam : IExcelRow<ExtendedBaseParam>
|
|||
|
||||
private static ushort EquipSlotCategoryPctCtor(ExcelPage page, uint parentOffset, uint offset, uint i)
|
||||
{
|
||||
int num = ((i == 0) ? 1726719508 : 1726719511);
|
||||
while (true)
|
||||
if (i != 0)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1726719510;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0043;
|
||||
case 2:
|
||||
return 0;
|
||||
case 1:
|
||||
{
|
||||
num3 = 8;
|
||||
num4 = (int)offset;
|
||||
int num7 = num4 ^ num3;
|
||||
int num8 = num4 & num3;
|
||||
int num9 = num7 + (num8 + num8);
|
||||
num3 = 1;
|
||||
num4 = (int)i;
|
||||
num3 = ~(~num4 + num3) * 2;
|
||||
num4 = num9;
|
||||
return _206B_202D_206F_202C_206F_202A_206D_202D_202E_206C_206D_206A_200D_200F_206B_200D_200E_202D_206F_206A_202C_200F_206B_200B_200B_200E_200C_202D_206E_200C_206E_206E_200E_200B_202A_202E_202B_206A_206A_206F_202E(page, (nuint)(uint)((num4 | num3) + (num4 & num3)));
|
||||
}
|
||||
}
|
||||
continue;
|
||||
IL_0043:
|
||||
num = 1726719511;
|
||||
return page.ReadUInt16(offset + 8 + (i - 1) * 2);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static ExtendedBaseParam Create(ExcelPage page, uint offset, uint row)
|
||||
{
|
||||
return new ExtendedBaseParam(page, offset, row);
|
||||
}
|
||||
|
||||
static ushort _206B_202D_206F_202C_206F_202A_206D_202D_202E_206C_206D_206A_200D_200F_206B_200D_200E_202D_206F_206A_202C_200F_206B_200B_200B_200E_200C_202D_206E_200C_206E_206E_200E_200B_202A_202E_202B_206A_206A_206F_202E(ExcelPage P_0, nuint P_1)
|
||||
{
|
||||
return P_0.ReadUInt16(P_1);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using Dalamud.Plugin.Services;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
using FFXIVClientStructs.FFXIV.Component.GUI;
|
||||
|
|
@ -13,147 +12,63 @@ public static class ExtractActions
|
|||
public unsafe static bool TryOpenExtractionWindow()
|
||||
{
|
||||
ActionManager* ptr = ActionManager.Instance();
|
||||
int num = ((ptr != null) ? 1517753475 : 1517753472);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1517753473;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
goto IL_004b;
|
||||
case 2:
|
||||
return ptr->UseAction(ActionType.GeneralAction, 14u, 3758096384uL, 0u, ActionManager.UseActionMode.None, 0u, null);
|
||||
case 1:
|
||||
return false;
|
||||
}
|
||||
continue;
|
||||
IL_004b:
|
||||
num = 1517753472;
|
||||
return false;
|
||||
}
|
||||
return ptr->UseAction(ActionType.GeneralAction, 14u, 3758096384uL, 0u, ActionManager.UseActionMode.None, 0u, null);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool IsExtractionAddonReady(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
return gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(1975097749), out addonPtr);
|
||||
return gameGui.TryGetReadyAddon<AtkUnitBase>("Materialize", out addonPtr);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TryExtractFirst(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(-1577561758), out addonPtr) ? 1656734997 : 1656734996);
|
||||
while (true)
|
||||
if (!gameGui.TryGetReadyAddon<AtkUnitBase>("Materialize", out var addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1656734997;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
AddonCallback.FireWithUpdate(addonPtr, 2, 0);
|
||||
return true;
|
||||
case 1:
|
||||
return false;
|
||||
case 2:
|
||||
goto IL_0068;
|
||||
}
|
||||
continue;
|
||||
IL_0068:
|
||||
num = 1656734996;
|
||||
return false;
|
||||
}
|
||||
AddonCallback.FireWithUpdate(addonPtr, 2, 0);
|
||||
return true;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool IsConfirmDialogReady(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
return gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(1781947130), out addonPtr);
|
||||
return gameGui.TryGetReadyAddon<AtkUnitBase>("MaterializeDialog", out addonPtr);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TryConfirmExtraction(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(839489786), out addonPtr) ? (-1818884272) : (-1818884269));
|
||||
while (true)
|
||||
if (!gameGui.TryGetReadyAddon<AtkUnitBase>("MaterializeDialog", out var addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1818884271;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0052;
|
||||
case 2:
|
||||
return false;
|
||||
case 1:
|
||||
AddonCallback.Fire(addonPtr, default(int));
|
||||
return true;
|
||||
}
|
||||
continue;
|
||||
IL_0052:
|
||||
num = -1818884269;
|
||||
return false;
|
||||
}
|
||||
AddonCallback.Fire(addonPtr, default(int));
|
||||
return true;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TrySwitchCategory(IGameGui gameGui, int category)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(1975097749), out addonPtr) ? (-1576577779) : (-1576577778));
|
||||
while (true)
|
||||
if (!gameGui.TryGetReadyAddon<AtkUnitBase>("Materialize", out var addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1576577780;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 1:
|
||||
AddonCallback.Fire(addonPtr, 1, category);
|
||||
return true;
|
||||
case 2:
|
||||
return false;
|
||||
case 0:
|
||||
goto IL_006a;
|
||||
}
|
||||
continue;
|
||||
IL_006a:
|
||||
num = -1576577778;
|
||||
return false;
|
||||
}
|
||||
AddonCallback.Fire(addonPtr, 1, category);
|
||||
return true;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TryCloseExtractionWindow(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(1686317250), out addonPtr) ? 930280316 : 930280319);
|
||||
while (true)
|
||||
if (!gameGui.TryGetReadyAddon<AtkUnitBase>("Materialize", out var addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 930280317;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0052;
|
||||
case 2:
|
||||
return false;
|
||||
case 1:
|
||||
AddonCallback.Fire(addonPtr, -1);
|
||||
return true;
|
||||
}
|
||||
continue;
|
||||
IL_0052:
|
||||
num = 930280319;
|
||||
return false;
|
||||
}
|
||||
AddonCallback.Fire(addonPtr, -1);
|
||||
return true;
|
||||
}
|
||||
|
||||
public static bool IsExtractionUnlocked()
|
||||
|
|
|
|||
|
|
@ -12,341 +12,121 @@ public static class GearConditionHelper
|
|||
public unsafe static int? GetLowestConditionPercent()
|
||||
{
|
||||
InventoryContainer* equippedContainer = EquipmentSlots.GetEquippedContainer();
|
||||
int num = ((equippedContainer != null) ? 136938409 : 136938411);
|
||||
int? result = default(int?);
|
||||
int num9 = default(int);
|
||||
int num8 = default(int);
|
||||
InventoryItem* item = default(InventoryItem*);
|
||||
while (true)
|
||||
if (equippedContainer == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 136938412;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
return null;
|
||||
}
|
||||
int? result = null;
|
||||
for (int i = 0; i < 13; i++)
|
||||
{
|
||||
if (i != 5 && EquipmentSlots.TryGetEquippedItem(equippedContainer, i, out var item))
|
||||
{
|
||||
case 10:
|
||||
return result;
|
||||
case 8:
|
||||
result = num9;
|
||||
num = 136938405;
|
||||
break;
|
||||
case 4:
|
||||
num = ((num8 == 5) ? 136938405 : 136938410);
|
||||
break;
|
||||
case 7:
|
||||
return null;
|
||||
case 6:
|
||||
num = ((!EquipmentSlots.TryGetEquippedItem(equippedContainer, num8, out item)) ? 136938405 : 136938414);
|
||||
break;
|
||||
case 1:
|
||||
num = ((num9 >= result.Value) ? 136938405 : 136938404);
|
||||
break;
|
||||
case 2:
|
||||
num9 = item->Condition * 100 / 30000;
|
||||
num = ((!result.HasValue) ? 136938404 : 136938413);
|
||||
break;
|
||||
case 5:
|
||||
result = null;
|
||||
num8 = 0;
|
||||
num = 136938415;
|
||||
break;
|
||||
case 3:
|
||||
num = ((num8 < 13) ? 136938408 : 136938406);
|
||||
break;
|
||||
case 0:
|
||||
num = 136938411;
|
||||
break;
|
||||
case 9:
|
||||
{
|
||||
int num7 = num8;
|
||||
num3 = 1;
|
||||
num4 = num7;
|
||||
num8 = (num4 | num3) + (num4 & num3);
|
||||
num = 136938415;
|
||||
break;
|
||||
}
|
||||
int num = item->Condition * 100 / 30000;
|
||||
if (!result.HasValue || num < result.Value)
|
||||
{
|
||||
result = num;
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public unsafe static List<SlotCondition> GetAllSlotConditions()
|
||||
{
|
||||
List<SlotCondition> list = new List<SlotCondition>(13);
|
||||
InventoryContainer* equippedContainer = EquipmentSlots.GetEquippedContainer();
|
||||
int num = ((equippedContainer != null) ? 1727066767 : 1727066762);
|
||||
int num5 = default(int);
|
||||
InventoryItem* item = default(InventoryItem*);
|
||||
while (true)
|
||||
if (equippedContainer == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1727066761;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
return list;
|
||||
}
|
||||
for (int i = 0; i < 13; i++)
|
||||
{
|
||||
if (i != 5 && EquipmentSlots.TryGetEquippedItem(equippedContainer, i, out var item))
|
||||
{
|
||||
case 4:
|
||||
num = ((num5 < 13) ? 1727066764 : 1727066763);
|
||||
break;
|
||||
case 6:
|
||||
num5 = 0;
|
||||
num = 1727066765;
|
||||
break;
|
||||
case 3:
|
||||
return list;
|
||||
case 8:
|
||||
{
|
||||
int num6 = num5;
|
||||
num3 = 1;
|
||||
num4 = num6;
|
||||
int num7 = num4 ^ num3;
|
||||
int num8 = num4 & num3;
|
||||
num5 = num7 + (num8 + num8);
|
||||
num = 1727066765;
|
||||
break;
|
||||
}
|
||||
case 7:
|
||||
list.Add(new SlotCondition(num5, item->ItemId, item->Condition * 100 / 30000));
|
||||
num = 1727066753;
|
||||
break;
|
||||
case 5:
|
||||
num = ((num5 == 5) ? 1727066753 : 1727066760);
|
||||
break;
|
||||
case 0:
|
||||
num = 1727066762;
|
||||
break;
|
||||
case 1:
|
||||
num = ((!EquipmentSlots.TryGetEquippedItem(equippedContainer, num5, out item)) ? 1727066753 : 1727066766);
|
||||
break;
|
||||
case 2:
|
||||
return list;
|
||||
list.Add(new SlotCondition(i, item->ItemId, item->Condition * 100 / 30000));
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public unsafe static bool HasSpiritbondReadyItem(bool includeBags = false)
|
||||
{
|
||||
InventoryContainer* equippedContainer = EquipmentSlots.GetEquippedContainer();
|
||||
int num = ((equippedContainer == null) ? 566966460 : 566966456);
|
||||
int num5 = default(int);
|
||||
InventoryContainer* inventoryContainer = default(InventoryContainer*);
|
||||
int num6 = default(int);
|
||||
InventoryItem* item = default(InventoryItem*);
|
||||
InventoryType inventoryType = default(InventoryType);
|
||||
InventoryItem* inventorySlot = default(InventoryItem*);
|
||||
InventoryManager* ptr = default(InventoryManager*);
|
||||
while (true)
|
||||
if (equippedContainer != null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 566966450;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
for (int i = 0; i < 13; i++)
|
||||
{
|
||||
case 15:
|
||||
num = ((num5 < inventoryContainer->Size) ? 566966433 : 566966438);
|
||||
break;
|
||||
case 14:
|
||||
num = (includeBags ? 566966451 : 566966463);
|
||||
break;
|
||||
case 4:
|
||||
num = ((!EquipmentSlots.TryGetEquippedItem(equippedContainer, num6, out item)) ? 566966442 : 566966449);
|
||||
break;
|
||||
case 24:
|
||||
{
|
||||
int num8 = num6;
|
||||
num3 = 1;
|
||||
num4 = num8;
|
||||
num6 = (num4 | num3) + (num4 & num3);
|
||||
num = 566966452;
|
||||
break;
|
||||
}
|
||||
case 5:
|
||||
{
|
||||
int num7 = num5;
|
||||
num3 = 1;
|
||||
num4 = num7;
|
||||
num5 = (num4 | num3) + (num4 & num3);
|
||||
num = 566966461;
|
||||
break;
|
||||
}
|
||||
case 7:
|
||||
num5 = 0;
|
||||
num = 566966461;
|
||||
break;
|
||||
case 18:
|
||||
num = 566966456;
|
||||
break;
|
||||
case 3:
|
||||
num = ((item->SpiritbondOrCollectability < 10000) ? 566966442 : 566966458);
|
||||
break;
|
||||
case 10:
|
||||
num6 = 0;
|
||||
num = 566966452;
|
||||
break;
|
||||
case 6:
|
||||
num = ((num6 < 13) ? 566966459 : 566966460);
|
||||
break;
|
||||
case 20:
|
||||
inventoryType++;
|
||||
num = 566966439;
|
||||
break;
|
||||
case 12:
|
||||
num = (((inventorySlot->Flags & InventoryItem.ItemFlags.Collectable) != InventoryItem.ItemFlags.None) ? 566966455 : 566966457);
|
||||
break;
|
||||
case 19:
|
||||
inventorySlot = inventoryContainer->GetInventorySlot(num5);
|
||||
num = ((inventorySlot == null) ? 566966455 : 566966434);
|
||||
break;
|
||||
case 2:
|
||||
return false;
|
||||
case 8:
|
||||
return true;
|
||||
case 17:
|
||||
inventoryContainer = ptr->GetInventoryContainer(inventoryType);
|
||||
num = ((inventoryContainer == null) ? 566966438 : 566966453);
|
||||
break;
|
||||
case 11:
|
||||
num = ((inventorySlot->SpiritbondOrCollectability < 10000) ? 566966455 : 566966437);
|
||||
break;
|
||||
case 23:
|
||||
return true;
|
||||
case 22:
|
||||
return false;
|
||||
case 13:
|
||||
return false;
|
||||
case 16:
|
||||
num = ((inventorySlot->ItemId == 0) ? 566966455 : 566966462);
|
||||
break;
|
||||
case 21:
|
||||
num = ((inventoryType <= InventoryType.Inventory4) ? 566966435 : 566966436);
|
||||
break;
|
||||
case 9:
|
||||
num = ((num6 == 5) ? 566966442 : 566966454);
|
||||
break;
|
||||
case 0:
|
||||
inventoryType = InventoryType.Inventory1;
|
||||
num = 566966439;
|
||||
break;
|
||||
case 1:
|
||||
ptr = InventoryManager.Instance();
|
||||
num = ((ptr != null) ? 566966450 : 566966448);
|
||||
break;
|
||||
if (i != 5 && EquipmentSlots.TryGetEquippedItem(equippedContainer, i, out var item) && item->SpiritbondOrCollectability >= 10000)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!includeBags)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
InventoryManager* ptr = InventoryManager.Instance();
|
||||
if (ptr == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
for (InventoryType inventoryType = InventoryType.Inventory1; inventoryType <= InventoryType.Inventory4; inventoryType++)
|
||||
{
|
||||
InventoryContainer* inventoryContainer = ptr->GetInventoryContainer(inventoryType);
|
||||
if (inventoryContainer == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
for (int j = 0; j < inventoryContainer->Size; j++)
|
||||
{
|
||||
InventoryItem* inventorySlot = inventoryContainer->GetInventorySlot(j);
|
||||
if (inventorySlot != null && inventorySlot->ItemId != 0 && (inventorySlot->Flags & InventoryItem.ItemFlags.Collectable) == 0 && inventorySlot->SpiritbondOrCollectability >= 10000)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public unsafe static int? GetLowestSpiritbondPercent()
|
||||
{
|
||||
InventoryContainer* equippedContainer = EquipmentSlots.GetEquippedContainer();
|
||||
int num = ((equippedContainer != null) ? 1500996181 : 1500996188);
|
||||
int? result = default(int?);
|
||||
int num8 = default(int);
|
||||
int num7 = default(int);
|
||||
InventoryItem* item = default(InventoryItem*);
|
||||
while (true)
|
||||
if (equippedContainer == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1500996182;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
return null;
|
||||
}
|
||||
int? result = null;
|
||||
for (int i = 0; i < 13; i++)
|
||||
{
|
||||
if (i != 5 && EquipmentSlots.TryGetEquippedItem(equippedContainer, i, out var item))
|
||||
{
|
||||
case 4:
|
||||
num = 1500996188;
|
||||
break;
|
||||
case 6:
|
||||
result = num8;
|
||||
num = 1500996183;
|
||||
break;
|
||||
case 9:
|
||||
num = ((num7 < 13) ? 1500996177 : 1500996180);
|
||||
break;
|
||||
case 10:
|
||||
return null;
|
||||
case 0:
|
||||
num = ((!EquipmentSlots.TryGetEquippedItem(equippedContainer, num7, out item)) ? 1500996183 : 1500996190);
|
||||
break;
|
||||
case 5:
|
||||
num = ((num8 >= result.Value) ? 1500996183 : 1500996176);
|
||||
break;
|
||||
case 1:
|
||||
{
|
||||
int num9 = num7;
|
||||
num3 = 1;
|
||||
num4 = num9;
|
||||
int num10 = num4 ^ num3;
|
||||
int num11 = num4 & num3;
|
||||
num7 = num10 + (num11 + num11);
|
||||
num = 1500996191;
|
||||
break;
|
||||
}
|
||||
case 8:
|
||||
num8 = item->SpiritbondOrCollectability * 100 / 10000;
|
||||
num = ((!result.HasValue) ? 1500996176 : 1500996179);
|
||||
break;
|
||||
case 7:
|
||||
num = ((num7 == 5) ? 1500996183 : 1500996182);
|
||||
break;
|
||||
case 2:
|
||||
return result;
|
||||
case 3:
|
||||
result = null;
|
||||
num7 = 0;
|
||||
num = 1500996191;
|
||||
break;
|
||||
int num = item->SpiritbondOrCollectability * 100 / 10000;
|
||||
if (!result.HasValue || num < result.Value)
|
||||
{
|
||||
result = num;
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public unsafe static List<SlotSpiritbond> GetAllSpiritbondInfo()
|
||||
{
|
||||
List<SlotSpiritbond> list = new List<SlotSpiritbond>(13);
|
||||
InventoryContainer* equippedContainer = EquipmentSlots.GetEquippedContainer();
|
||||
int num = ((equippedContainer != null) ? 818481642 : 818481641);
|
||||
int num5 = default(int);
|
||||
InventoryItem* item = default(InventoryItem*);
|
||||
while (true)
|
||||
if (equippedContainer == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 818481643;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
return list;
|
||||
}
|
||||
for (int i = 0; i < 13; i++)
|
||||
{
|
||||
if (i != 5 && EquipmentSlots.TryGetEquippedItem(equippedContainer, i, out var item))
|
||||
{
|
||||
case 5:
|
||||
num = ((!EquipmentSlots.TryGetEquippedItem(equippedContainer, num5, out item)) ? 818481647 : 818481643);
|
||||
break;
|
||||
case 7:
|
||||
num = ((num5 == 5) ? 818481647 : 818481646);
|
||||
break;
|
||||
case 1:
|
||||
num5 = 0;
|
||||
num = 818481645;
|
||||
break;
|
||||
case 4:
|
||||
{
|
||||
int num6 = num5;
|
||||
num3 = 1;
|
||||
num4 = num6;
|
||||
num5 = (num4 | num3) + (num4 & num3);
|
||||
num = 818481645;
|
||||
break;
|
||||
}
|
||||
case 8:
|
||||
return list;
|
||||
case 2:
|
||||
return list;
|
||||
case 6:
|
||||
num = ((num5 < 13) ? 818481644 : 818481635);
|
||||
break;
|
||||
case 0:
|
||||
list.Add(new SlotSpiritbond(num5, item->ItemId, item->SpiritbondOrCollectability * 100 / 10000, item->SpiritbondOrCollectability >= 10000));
|
||||
num = 818481647;
|
||||
break;
|
||||
case 3:
|
||||
num = 818481641;
|
||||
break;
|
||||
list.Add(new SlotSpiritbond(i, item->ItemId, item->SpiritbondOrCollectability * 100 / 10000, item->SpiritbondOrCollectability >= 10000));
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -7,83 +7,31 @@ public static class GearsetHelper
|
|||
public unsafe static int GetCurrentGearsetIndex()
|
||||
{
|
||||
RaptureGearsetModule* ptr = RaptureGearsetModule.Instance();
|
||||
int num = ((ptr != null) ? (-1692442216) : (-1692442213));
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1692442214;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0049;
|
||||
case 1:
|
||||
return -1;
|
||||
case 2:
|
||||
return ptr->CurrentGearsetIndex;
|
||||
}
|
||||
continue;
|
||||
IL_0049:
|
||||
num = -1692442213;
|
||||
return -1;
|
||||
}
|
||||
return ptr->CurrentGearsetIndex;
|
||||
}
|
||||
|
||||
public unsafe static bool TryEquipGearset(int gearsetIndex)
|
||||
{
|
||||
RaptureGearsetModule* ptr = RaptureGearsetModule.Instance();
|
||||
int num = ((ptr == null) ? 231059237 : 231059236);
|
||||
while (true)
|
||||
if (ptr == null || gearsetIndex < 0 || !ptr->IsValidGearset(gearsetIndex))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 231059239;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
ptr->EquipGearset(gearsetIndex, 0);
|
||||
return true;
|
||||
case 1:
|
||||
num = (ptr->IsValidGearset(gearsetIndex) ? 231059239 : 231059237);
|
||||
break;
|
||||
case 2:
|
||||
return false;
|
||||
case 3:
|
||||
num = ((gearsetIndex < 0) ? 231059237 : 231059238);
|
||||
break;
|
||||
case 4:
|
||||
num = 231059236;
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
ptr->EquipGearset(gearsetIndex, 0);
|
||||
return true;
|
||||
}
|
||||
|
||||
public unsafe static byte GetGearsetClassJob(int gearsetIndex)
|
||||
{
|
||||
RaptureGearsetModule* ptr = RaptureGearsetModule.Instance();
|
||||
int num = ((ptr == null) ? (-76399401) : (-76399403));
|
||||
while (true)
|
||||
if (ptr == null || gearsetIndex < 0 || !ptr->IsValidGearset(gearsetIndex))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -76399402;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 1:
|
||||
return 0;
|
||||
case 2:
|
||||
num = (ptr->IsValidGearset(gearsetIndex) ? (-76399406) : (-76399401));
|
||||
break;
|
||||
case 4:
|
||||
return ptr->GetGearset(gearsetIndex)->ClassJob;
|
||||
case 0:
|
||||
num = -76399403;
|
||||
break;
|
||||
case 3:
|
||||
num = ((gearsetIndex < 0) ? (-76399401) : (-76399404));
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return ptr->GetGearset(gearsetIndex)->ClassJob;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,106 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
|
||||
namespace LLib.Gear;
|
||||
|
||||
public readonly record struct ItemRankingKey(uint ItemLevel, float Score, short Damage)
|
||||
{
|
||||
public static readonly ItemRankingKey None = new ItemRankingKey(0u, float.NegativeInfinity, short.MinValue);
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder stringBuilder = _206A_202E_200D_202A_202D_206B_202D_200F_206A_202A_206A_202E_200E_200C_206F_202A_206E_206D_202C_206E_206F_202D_202E_206E_206F_200F_206A_200C_200F_206E_202C_200C_200F_206B_200C_200B_202C_202E_202D_200F_202E();
|
||||
_206A_200D_202A_206C_200D_206F_206F_206B_202E_206E_200D_202A_202A_200D_200E_206E_206A_200E_200C_202C_206B_200F_202B_202E_202C_206E_206F_206E_206A_200E_202E_206A_206C_202E_202B_200D_200D_206D_200B_200D_202E(stringBuilder, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(1583508102));
|
||||
_206A_200D_202A_206C_200D_206F_206F_206B_202E_206E_200D_202A_202A_200D_200E_206E_206A_200E_200C_202C_206B_200F_202B_202E_202C_206E_206F_206E_206A_200E_202E_206A_206C_202E_202B_200D_200D_206D_200B_200D_202E(stringBuilder, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(1148273145));
|
||||
int num = ((!PrintMembers(stringBuilder)) ? 83489676 : 83489679);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 83489678;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
num = 83489679;
|
||||
break;
|
||||
case 1:
|
||||
_202A_206F_206A_206A_200C_206D_200B_202B_202D_206F_202B_202C_202A_200F_206D_206E_200B_206A_206B_206B_206F_202D_202E_206C_200C_200F_206E_202E_206C_202B_206E_200E_202B_200E_202E_206F_202A_200B_206A_206B_202E(stringBuilder, ' ');
|
||||
num = 83489676;
|
||||
break;
|
||||
case 2:
|
||||
_202A_206F_206A_206A_200C_206D_200B_202B_202D_206F_202B_202C_202A_200F_206D_206E_200B_206A_206B_206B_206F_202D_202E_206C_200C_200F_206E_202E_206C_202B_206E_200E_202B_200E_202E_206F_202A_200B_206A_206B_202E(stringBuilder, '}');
|
||||
return _206C_202E_200D_200D_206E_202D_206C_206B_206A_202B_200F_202D_202C_206C_202B_202B_202A_200F_206A_202B_206F_206D_202B_206E_200D_200C_202C_206E_206C_202C_202E_200D_202B_206D_200B_202B_202E_202E_202B_202D_202E((object)stringBuilder);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
private bool PrintMembers(StringBuilder builder)
|
||||
{
|
||||
_206A_200D_202A_206C_200D_206F_206F_206B_202E_206E_200D_202A_202A_200D_200E_206E_206A_200E_200C_202C_206B_200F_202B_202E_202C_206E_206F_206E_206A_200E_202E_206A_206C_202E_202B_200D_200D_206D_200B_200D_202E(builder, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(-802987284));
|
||||
_206A_200D_202A_206C_200D_206F_206F_206B_202E_206E_200D_202A_202A_200D_200E_206E_206A_200E_200C_202C_206B_200F_202B_202E_202C_206E_206F_206E_206A_200E_202E_206A_206C_202E_202B_200D_200D_206D_200B_200D_202E(builder, ItemLevel.ToString());
|
||||
_206A_200D_202A_206C_200D_206F_206F_206B_202E_206E_200D_202A_202A_200D_200E_206E_206A_200E_200C_202C_206B_200F_202B_202E_202C_206E_206F_206E_206A_200E_202E_206A_206C_202E_202B_200D_200D_206D_200B_200D_202E(builder, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(892084588));
|
||||
_206A_200D_202A_206C_200D_206F_206F_206B_202E_206E_200D_202A_202A_200D_200E_206E_206A_200E_200C_202C_206B_200F_202B_202E_202C_206E_206F_206E_206A_200E_202E_206A_206C_202E_202B_200D_200D_206D_200B_200D_202E(builder, Score.ToString());
|
||||
_206A_200D_202A_206C_200D_206F_206F_206B_202E_206E_200D_202A_202A_200D_200E_206E_206A_200E_200C_202C_206B_200F_202B_202E_202C_206E_206F_206E_206A_200E_202E_206A_206C_202E_202B_200D_200D_206D_200B_200D_202E(builder, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(-1290468425));
|
||||
_206A_200D_202A_206C_200D_206F_206F_206B_202E_206E_200D_202A_202A_200D_200E_206E_206A_200E_200C_202C_206B_200F_202B_202E_202C_206E_206F_206E_206A_200E_202E_206A_206C_202E_202B_200D_200D_206D_200B_200D_202E(builder, Damage.ToString());
|
||||
return true;
|
||||
}
|
||||
|
||||
[CompilerGenerated]
|
||||
public bool Equals(ItemRankingKey other)
|
||||
{
|
||||
int num = ((!EqualityComparer<uint>.Default.Equals(ItemLevel, other.ItemLevel)) ? (-23667421) : (-23667422));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -23667421;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
return false;
|
||||
case 1:
|
||||
num = ((!EqualityComparer<float>.Default.Equals(Score, other.Score)) ? (-23667421) : (-23667424));
|
||||
break;
|
||||
case 2:
|
||||
num = -23667422;
|
||||
break;
|
||||
case 3:
|
||||
return EqualityComparer<short>.Default.Equals(Damage, other.Damage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool IEquatable<ItemRankingKey>.Equals(ItemRankingKey other)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in Equals
|
||||
return this.Equals(other);
|
||||
}
|
||||
|
||||
static StringBuilder _206A_202E_200D_202A_202D_206B_202D_200F_206A_202A_206A_202E_200E_200C_206F_202A_206E_206D_202C_206E_206F_202D_202E_206E_206F_200F_206A_200C_200F_206E_202C_200C_200F_206B_200C_200B_202C_202E_202D_200F_202E()
|
||||
{
|
||||
return new StringBuilder();
|
||||
}
|
||||
|
||||
static StringBuilder _206A_200D_202A_206C_200D_206F_206F_206B_202E_206E_200D_202A_202A_200D_200E_206E_206A_200E_200C_202C_206B_200F_202B_202E_202C_206E_206F_206E_206A_200E_202E_206A_206C_202E_202B_200D_200D_206D_200B_200D_202E(StringBuilder P_0, string P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static StringBuilder _202A_206F_206A_206A_200C_206D_200B_202B_202D_206F_202B_202C_202A_200F_206D_206E_200B_206A_206B_206B_206F_202D_202E_206C_200C_200F_206E_202E_206C_202B_206E_200E_202B_200E_202E_206F_202A_200B_206A_206B_202E(StringBuilder P_0, char P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static string _206C_202E_200D_200D_206E_202D_206C_206B_206A_202B_200F_202D_202C_206C_202B_202B_202A_200F_206A_202B_206F_206D_202B_206E_200D_200C_202C_206E_206C_202C_202E_200D_202B_206D_200B_202B_202E_202E_202B_202D_202E(object P_0)
|
||||
{
|
||||
return P_0.ToString();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,257 +13,108 @@ public static class MateriaHelper
|
|||
public unsafe static List<MeldSlotInfo> GetMeldedMateria(InventoryItem* item)
|
||||
{
|
||||
List<MeldSlotInfo> list = new List<MeldSlotInfo>(5);
|
||||
int num = ((item == null) ? (-1527939717) : (-1527939716));
|
||||
int num7 = default(int);
|
||||
uint num9 = default(uint);
|
||||
while (true)
|
||||
if (item == null || item->ItemId == 0)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1527939719;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
return list;
|
||||
}
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
uint num = item->Materia[i];
|
||||
if (num != 0)
|
||||
{
|
||||
case 7:
|
||||
return list;
|
||||
case 4:
|
||||
num7 = 0;
|
||||
num = -1527939727;
|
||||
break;
|
||||
case 6:
|
||||
list.Add(new MeldSlotInfo(num7, num9, item->MateriaGrades[num7]));
|
||||
num = -1527939720;
|
||||
break;
|
||||
case 1:
|
||||
{
|
||||
int num8 = num7;
|
||||
num3 = 1;
|
||||
num4 = num8;
|
||||
num7 = (num4 | num3) + (num4 & num3);
|
||||
num = -1527939727;
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
num = -1527939716;
|
||||
break;
|
||||
case 3:
|
||||
num9 = item->Materia[num7];
|
||||
num = ((num9 == 0) ? (-1527939720) : (-1527939713));
|
||||
break;
|
||||
case 5:
|
||||
num = ((item->ItemId != 0) ? (-1527939715) : (-1527939717));
|
||||
break;
|
||||
case 8:
|
||||
num = ((num7 < 5) ? (-1527939718) : (-1527939714));
|
||||
break;
|
||||
case 2:
|
||||
return list;
|
||||
list.Add(new MeldSlotInfo(i, num, item->MateriaGrades[i]));
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public static int GetNormalSlotCount(IDataManager dataManager, uint itemId)
|
||||
{
|
||||
Item row;
|
||||
int num = (dataManager.GetExcelSheet<Item>().TryGetRow(itemId, out row) ? (-1343561605) : (-1343561608));
|
||||
while (true)
|
||||
if (!dataManager.GetExcelSheet<Item>().TryGetRow(itemId, out var row))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1343561607;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 2:
|
||||
return row.MateriaSlotCount;
|
||||
case 1:
|
||||
return 0;
|
||||
case 0:
|
||||
goto IL_0067;
|
||||
}
|
||||
continue;
|
||||
IL_0067:
|
||||
num = -1343561608;
|
||||
return 0;
|
||||
}
|
||||
return row.MateriaSlotCount;
|
||||
}
|
||||
|
||||
public static bool CanOvermeld(IDataManager dataManager, uint itemId)
|
||||
{
|
||||
Item row;
|
||||
int num = (dataManager.GetExcelSheet<Item>().TryGetRow(itemId, out row) ? (-2077097183) : (-2077097182));
|
||||
while (true)
|
||||
if (!dataManager.GetExcelSheet<Item>().TryGetRow(itemId, out var row))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -2077097184;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 1:
|
||||
return row.IsAdvancedMeldingPermitted;
|
||||
case 2:
|
||||
return false;
|
||||
case 0:
|
||||
goto IL_0065;
|
||||
}
|
||||
continue;
|
||||
IL_0065:
|
||||
num = -2077097182;
|
||||
return false;
|
||||
}
|
||||
return row.IsAdvancedMeldingPermitted;
|
||||
}
|
||||
|
||||
public static int GetOvermeldSuccessRate(IDataManager dataManager, byte grade, int overmeldSlot, bool isHq)
|
||||
{
|
||||
int num = ((overmeldSlot >= 0) ? 943397358 : 943397347);
|
||||
MateriaGrade row = default(MateriaGrade);
|
||||
while (true)
|
||||
if (overmeldSlot < 0)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 943397355;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
return 0;
|
||||
}
|
||||
if (!dataManager.GetExcelSheet<MateriaGrade>().TryGetRow(grade, out var row))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
if (isHq)
|
||||
{
|
||||
if (overmeldSlot >= row.OvermeldHQPercent.Count)
|
||||
{
|
||||
case 0:
|
||||
num = 943397347;
|
||||
break;
|
||||
case 2:
|
||||
return row.OvermeldHQPercent[overmeldSlot];
|
||||
case 4:
|
||||
num = ((overmeldSlot < row.OvermeldHQPercent.Count) ? 943397353 : 943397345);
|
||||
break;
|
||||
case 8:
|
||||
return 0;
|
||||
case 5:
|
||||
num = (dataManager.GetExcelSheet<MateriaGrade>().TryGetRow(grade, out row) ? 943397354 : 943397356);
|
||||
break;
|
||||
case 3:
|
||||
num = ((overmeldSlot < row.OvermeldNQPercent.Count) ? 943397346 : 943397357);
|
||||
break;
|
||||
case 7:
|
||||
return 0;
|
||||
case 10:
|
||||
return 0;
|
||||
case 9:
|
||||
return row.OvermeldNQPercent[overmeldSlot];
|
||||
case 1:
|
||||
num = ((!isHq) ? 943397352 : 943397359);
|
||||
break;
|
||||
case 6:
|
||||
return 0;
|
||||
}
|
||||
return row.OvermeldHQPercent[overmeldSlot];
|
||||
}
|
||||
if (overmeldSlot >= row.OvermeldNQPercent.Count)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return row.OvermeldNQPercent[overmeldSlot];
|
||||
}
|
||||
|
||||
public unsafe static int CountMateriaInInventory(uint materiaItemId)
|
||||
{
|
||||
InventoryManager* ptr = InventoryManager.Instance();
|
||||
int num = ((ptr != null) ? 244394904 : 244394907);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 244394905;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 1:
|
||||
return ptr->GetInventoryItemCount(materiaItemId, isHq: false, checkEquipped: true, checkArmory: true, 0);
|
||||
case 2:
|
||||
return 0;
|
||||
case 0:
|
||||
goto IL_0059;
|
||||
}
|
||||
continue;
|
||||
IL_0059:
|
||||
num = 244394907;
|
||||
return 0;
|
||||
}
|
||||
return ptr->GetInventoryItemCount(materiaItemId, isHq: false, checkEquipped: true, checkArmory: true, 0);
|
||||
}
|
||||
|
||||
public static int EstimateMateriaNeeded(int successRatePercent, int confidencePercent = 90)
|
||||
{
|
||||
int num = ((successRatePercent < 100) ? 394334376 : 394334378);
|
||||
double num5 = default(double);
|
||||
while (true)
|
||||
if (successRatePercent >= 100)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 394334379;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 2:
|
||||
{
|
||||
double num6 = (double)successRatePercent / 100.0;
|
||||
double num7 = (double)_200E_200C_202D_202E_206D_206B_202B_202E_200E_200F_200F_202B_202A_202A_206D_200B_202E_200F_206E_206A_200D_206D_200F_200E_206B_200B_202A_200B_206A_200C_206E_202E_206E_206F_206B_206B_206A_200B_200B_202A_202E(confidencePercent, 0, 99) / 100.0;
|
||||
num5 = _202B_200F_202E_202E_200D_202C_206D_206B_200E_200E_202A_200D_206D_206D_202E_202A_200C_202C_200C_202A_206A_206B_200F_200E_206B_202B_206F_202B_202E_200E_202D_202E_206B_202A_202C_206C_206B_202B_200C_206B_202E(_200F_202B_200B_200C_206C_200E_202A_206D_206C_206D_200B_200C_202B_206A_200E_202A_206F_202B_206A_200D_200F_200D_200B_202E_202C_202C_200F_206B_206F_202E_200F_200C_200F_202C_202E_206F_200F_200B_206C_200C_202E(1.0 - num7) / _200F_202B_200B_200C_206C_200E_202A_206D_206C_206D_200B_200C_202B_206A_200E_202A_206F_202B_206A_200D_200F_200D_200B_202E_202C_202C_200F_206B_206F_202E_200F_200C_200F_202C_202E_206F_200F_200B_206C_200C_202E(1.0 - num6));
|
||||
num = ((!(num5 < 1.0)) ? 394334379 : 394334371);
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
return 1;
|
||||
case 7:
|
||||
num = 394334378;
|
||||
break;
|
||||
case 5:
|
||||
return int.MaxValue;
|
||||
case 6:
|
||||
return (int)num5;
|
||||
case 4:
|
||||
return int.MaxValue;
|
||||
case 0:
|
||||
num = ((!(num5 > 2147483647.0)) ? 394334381 : 394334382);
|
||||
break;
|
||||
case 3:
|
||||
num = ((successRatePercent > 0) ? 394334377 : 394334383);
|
||||
break;
|
||||
case 8:
|
||||
return 1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
if (successRatePercent <= 0)
|
||||
{
|
||||
return int.MaxValue;
|
||||
}
|
||||
double num = (double)successRatePercent / 100.0;
|
||||
double num2 = (double)Math.Clamp(confidencePercent, 0, 99) / 100.0;
|
||||
double num3 = Math.Ceiling(Math.Log(1.0 - num2) / Math.Log(1.0 - num));
|
||||
if (num3 < 1.0)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
if (num3 > 2147483647.0)
|
||||
{
|
||||
return int.MaxValue;
|
||||
}
|
||||
return (int)num3;
|
||||
}
|
||||
|
||||
public static uint GetMateriaItemId(IDataManager dataManager, uint materiaRowId, byte grade)
|
||||
{
|
||||
Materia row;
|
||||
int num = (dataManager.GetExcelSheet<Materia>().TryGetRow(materiaRowId, out row) ? (-1528382481) : (-1528382482));
|
||||
while (true)
|
||||
if (!dataManager.GetExcelSheet<Materia>().TryGetRow(materiaRowId, out var row))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1528382483;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 1:
|
||||
return 0u;
|
||||
case 3:
|
||||
return 0u;
|
||||
case 4:
|
||||
return row.Item[grade].RowId;
|
||||
case 2:
|
||||
num = ((grade < row.Item.Count) ? (-1528382487) : (-1528382484));
|
||||
break;
|
||||
case 0:
|
||||
num = -1528382482;
|
||||
break;
|
||||
}
|
||||
return 0u;
|
||||
}
|
||||
}
|
||||
|
||||
static int _200E_200C_202D_202E_206D_206B_202B_202E_200E_200F_200F_202B_202A_202A_206D_200B_202E_200F_206E_206A_200D_206D_200F_200E_206B_200B_202A_200B_206A_200C_206E_202E_206E_206F_206B_206B_206A_200B_200B_202A_202E(int P_0, int P_1, int P_2)
|
||||
{
|
||||
return Math.Clamp(P_0, P_1, P_2);
|
||||
}
|
||||
|
||||
static double _200F_202B_200B_200C_206C_200E_202A_206D_206C_206D_200B_200C_202B_206A_200E_202A_206F_202B_206A_200D_200F_200D_200B_202E_202C_202C_200F_206B_206F_202E_200F_200C_200F_202C_202E_206F_200F_200B_206C_200C_202E(double P_0)
|
||||
{
|
||||
return Math.Log(P_0);
|
||||
}
|
||||
|
||||
static double _202B_200F_202E_202E_200D_202C_206D_206B_200E_200E_202A_200D_206D_206D_202E_202A_200C_202C_200C_202A_206A_206B_200F_200E_206B_202B_206F_202B_202E_200E_202D_202E_206B_202A_202C_206C_206B_202B_200C_206B_202E(double P_0)
|
||||
{
|
||||
return Math.Ceiling(P_0);
|
||||
if (grade >= row.Item.Count)
|
||||
{
|
||||
return 0u;
|
||||
}
|
||||
return row.Item[grade].RowId;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using Dalamud.Plugin.Services;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
using FFXIVClientStructs.FFXIV.Client.UI.Agent;
|
||||
|
|
@ -17,568 +16,216 @@ public static class MeldActions
|
|||
public unsafe static bool TryOpenMeldAgent()
|
||||
{
|
||||
ActionManager* ptr = ActionManager.Instance();
|
||||
int num = ((ptr != null) ? (-92377207) : (-92377206));
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -92377205;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0049;
|
||||
case 2:
|
||||
return ptr->UseAction(ActionType.GeneralAction, 13u, 3758096384uL, 0u, ActionManager.UseActionMode.None, 0u, null);
|
||||
case 1:
|
||||
return false;
|
||||
}
|
||||
continue;
|
||||
IL_0049:
|
||||
num = -92377206;
|
||||
return false;
|
||||
}
|
||||
return ptr->UseAction(ActionType.GeneralAction, 13u, 3758096384uL, 0u, ActionManager.UseActionMode.None, 0u, null);
|
||||
}
|
||||
|
||||
public unsafe static bool IsMeldAgentReady()
|
||||
{
|
||||
AgentInterface* agentByInternalId = AgentModule.Instance()->GetAgentByInternalId(AgentId.MateriaAttach);
|
||||
int num = ((agentByInternalId == null) ? 1012581320 : 1012581323);
|
||||
while (true)
|
||||
if (agentByInternalId != null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1012581322;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0050;
|
||||
case 2:
|
||||
return false;
|
||||
case 1:
|
||||
return agentByInternalId->IsAgentActive();
|
||||
}
|
||||
continue;
|
||||
IL_0050:
|
||||
num = 1012581323;
|
||||
return agentByInternalId->IsAgentActive();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public unsafe static void CloseMeldAgent()
|
||||
{
|
||||
AgentInterface* agentByInternalId = AgentModule.Instance()->GetAgentByInternalId(AgentId.MateriaAttach);
|
||||
int num = ((agentByInternalId == null) ? 1172237178 : 1172237177);
|
||||
while (true)
|
||||
if (agentByInternalId != null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1172237179;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 1:
|
||||
return;
|
||||
case 2:
|
||||
agentByInternalId->Hide();
|
||||
num = 1172237178;
|
||||
break;
|
||||
case 0:
|
||||
num = 1172237177;
|
||||
break;
|
||||
}
|
||||
agentByInternalId->Hide();
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe static bool TrySelectItemCategory(int category)
|
||||
{
|
||||
AgentInterface* agentByInternalId = AgentModule.Instance()->GetAgentByInternalId(AgentId.MateriaAttach);
|
||||
int num = ((agentByInternalId == null) ? 1631304881 : 1631304883);
|
||||
while (true)
|
||||
if (agentByInternalId == null || !agentByInternalId->IsAgentActive())
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1631304882;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 3:
|
||||
return false;
|
||||
case 2:
|
||||
AgentHelper.SendEvent(agentByInternalId, 0uL, 0, category);
|
||||
return true;
|
||||
case 0:
|
||||
num = 1631304883;
|
||||
break;
|
||||
case 1:
|
||||
num = (agentByInternalId->IsAgentActive() ? 1631304880 : 1631304881);
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
AgentHelper.SendEvent(agentByInternalId, 0uL, 0, category);
|
||||
return true;
|
||||
}
|
||||
|
||||
public unsafe static bool TrySelectItem(int itemIndex)
|
||||
{
|
||||
AgentInterface* agentByInternalId = AgentModule.Instance()->GetAgentByInternalId(AgentId.MateriaAttach);
|
||||
int num = ((agentByInternalId == null) ? (-2072200034) : (-2072200035));
|
||||
while (true)
|
||||
if (agentByInternalId == null || !agentByInternalId->IsAgentActive())
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -2072200036;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
num = -2072200035;
|
||||
break;
|
||||
case 2:
|
||||
return false;
|
||||
case 1:
|
||||
num = (agentByInternalId->IsAgentActive() ? (-2072200033) : (-2072200034));
|
||||
break;
|
||||
case 3:
|
||||
AgentHelper.SendEvent(agentByInternalId, 0uL, 1, itemIndex, 1, 0);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
AgentHelper.SendEvent(agentByInternalId, 0uL, 1, itemIndex, 1, 0);
|
||||
return true;
|
||||
}
|
||||
|
||||
public unsafe static bool TrySelectMateria(int materiaIndex)
|
||||
{
|
||||
AgentInterface* agentByInternalId = AgentModule.Instance()->GetAgentByInternalId(AgentId.MateriaAttach);
|
||||
int num = ((agentByInternalId == null) ? 1070130699 : 1070130696);
|
||||
while (true)
|
||||
if (agentByInternalId == null || !agentByInternalId->IsAgentActive())
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1070130698;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 1:
|
||||
return false;
|
||||
case 2:
|
||||
num = (agentByInternalId->IsAgentActive() ? 1070130697 : 1070130699);
|
||||
break;
|
||||
case 3:
|
||||
AgentHelper.SendEvent(agentByInternalId, 0uL, 2, materiaIndex, 1, 0);
|
||||
return true;
|
||||
case 0:
|
||||
num = 1070130696;
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
AgentHelper.SendEvent(agentByInternalId, 0uL, 2, materiaIndex, 1, 0);
|
||||
return true;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TryConfirmMeld(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(627835042), out addonPtr) ? 1229741423 : 1229741420);
|
||||
while (true)
|
||||
if (!gameGui.TryGetReadyAddon<AtkUnitBase>("MateriaAttachDialog", out var addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1229741422;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0052;
|
||||
case 2:
|
||||
return false;
|
||||
case 1:
|
||||
AddonCallback.Fire(addonPtr, 0, 0, 1);
|
||||
addonPtr->Close(fireCallback: true);
|
||||
return true;
|
||||
}
|
||||
continue;
|
||||
IL_0052:
|
||||
num = 1229741420;
|
||||
return false;
|
||||
}
|
||||
AddonCallback.Fire(addonPtr, 0, 0, 1);
|
||||
addonPtr->Close(fireCallback: true);
|
||||
return true;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TryConfirmOvermeld(IGameGui gameGui)
|
||||
{
|
||||
AgentInterface* agentByInternalId = AgentModule.Instance()->GetAgentByInternalId(AgentId.MateriaAttach);
|
||||
int num = ((agentByInternalId == null) ? (-1324266092) : (-1324266093));
|
||||
AtkUnitBase* addonPtr = default(AtkUnitBase*);
|
||||
while (true)
|
||||
if (agentByInternalId == null || !agentByInternalId->IsAgentActive())
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1324266089;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
AddonCallback.ClickYes(addonPtr);
|
||||
addonPtr->Close(fireCallback: true);
|
||||
return true;
|
||||
case 4:
|
||||
num = (agentByInternalId->IsAgentActive() ? (-1324266090) : (-1324266092));
|
||||
break;
|
||||
case 2:
|
||||
return false;
|
||||
case 1:
|
||||
num = (gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(184774238), out addonPtr) ? (-1324266089) : (-1324266091));
|
||||
break;
|
||||
case 5:
|
||||
num = -1324266093;
|
||||
break;
|
||||
case 3:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (!gameGui.TryGetReadyAddon<AtkUnitBase>("SelectYesno", out var addonPtr))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
AddonCallback.ClickYes(addonPtr);
|
||||
addonPtr->Close(fireCallback: true);
|
||||
return true;
|
||||
}
|
||||
|
||||
public unsafe static bool TryRequestRetrieve()
|
||||
{
|
||||
AgentInterface* agentByInternalId = AgentModule.Instance()->GetAgentByInternalId(AgentId.MateriaAttach);
|
||||
int num = ((agentByInternalId == null) ? (-1148814480) : (-1148814479));
|
||||
while (true)
|
||||
if (agentByInternalId == null || !agentByInternalId->IsAgentActive())
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1148814480;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
return false;
|
||||
case 1:
|
||||
num = (agentByInternalId->IsAgentActive() ? (-1148814477) : (-1148814480));
|
||||
break;
|
||||
case 2:
|
||||
num = -1148814479;
|
||||
break;
|
||||
case 3:
|
||||
AgentHelper.SendEvent(agentByInternalId, 4uL, 0, 1, 0, 0, 0);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
AgentHelper.SendEvent(agentByInternalId, 4uL, 0, 1, 0, 0, 0);
|
||||
return true;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TryConfirmRetrieve(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(-507581273), out addonPtr) ? (-1428512463) : (-1428512462));
|
||||
while (true)
|
||||
if (!gameGui.TryGetReadyAddon<AtkUnitBase>("MateriaRetrieveDialog", out var addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1428512461;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0052;
|
||||
case 2:
|
||||
AddonCallback.Fire(addonPtr, default(int));
|
||||
addonPtr->Close(fireCallback: true);
|
||||
return true;
|
||||
case 1:
|
||||
return false;
|
||||
}
|
||||
continue;
|
||||
IL_0052:
|
||||
num = -1428512462;
|
||||
return false;
|
||||
}
|
||||
AddonCallback.Fire(addonPtr, default(int));
|
||||
addonPtr->Close(fireCallback: true);
|
||||
return true;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool IsMeldDialogReady(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
return gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(2146370651), out addonPtr);
|
||||
return gameGui.TryGetReadyAddon<AtkUnitBase>("MateriaAttachDialog", out addonPtr);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool IsRetrieveDialogReady(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
return gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(1509768351), out addonPtr);
|
||||
return gameGui.TryGetReadyAddon<AtkUnitBase>("MateriaRetrieveDialog", out addonPtr);
|
||||
}
|
||||
|
||||
public unsafe static bool IsAgentLoading()
|
||||
{
|
||||
AgentMateriaAttach* ptr = AgentMateriaAttach.Instance();
|
||||
int num = ((ptr == null) ? (-1447124743) : (-1447124742));
|
||||
while (true)
|
||||
if (ptr != null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1447124741;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 2:
|
||||
return false;
|
||||
case 1:
|
||||
return ptr->UpdateState != 0;
|
||||
case 0:
|
||||
goto IL_0057;
|
||||
}
|
||||
continue;
|
||||
IL_0057:
|
||||
num = -1447124742;
|
||||
return ptr->UpdateState != 0;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public unsafe static int GetSelectedItemIndex()
|
||||
{
|
||||
AgentMateriaAttach* ptr = AgentMateriaAttach.Instance();
|
||||
int num = ((ptr == null) ? (-10593117) : (-10593120));
|
||||
while (true)
|
||||
if (ptr != null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -10593119;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 2:
|
||||
return -1;
|
||||
case 1:
|
||||
return ptr->SelectedItemIndex;
|
||||
case 0:
|
||||
goto IL_0054;
|
||||
}
|
||||
continue;
|
||||
IL_0054:
|
||||
num = -10593120;
|
||||
return ptr->SelectedItemIndex;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
public static AgentMateriaAttach.FilterCategory GetFilterCategory(InventoryType inventoryType)
|
||||
{
|
||||
int num = ((inventoryType > InventoryType.EquippedItems) ? (-1327648937) : (-1327648944));
|
||||
AgentMateriaAttach.FilterCategory result = default(AgentMateriaAttach.FilterCategory);
|
||||
while (true)
|
||||
switch (inventoryType)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1327648930;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 11:
|
||||
result = AgentMateriaAttach.FilterCategory.Equipped;
|
||||
num = -1327648933;
|
||||
break;
|
||||
case 4:
|
||||
result = AgentMateriaAttach.FilterCategory.ArmouryWeapon;
|
||||
num = -1327648933;
|
||||
break;
|
||||
case 10:
|
||||
result = AgentMateriaAttach.FilterCategory.Inventory;
|
||||
num = -1327648933;
|
||||
break;
|
||||
case 14:
|
||||
num = ((inventoryType <= InventoryType.Inventory4) ? (-1327648940) : (-1327648931));
|
||||
break;
|
||||
case 9:
|
||||
switch (inventoryType)
|
||||
{
|
||||
case InventoryType.ArmoryOffHand:
|
||||
break;
|
||||
default:
|
||||
goto IL_00f8;
|
||||
case InventoryType.ArmoryHead:
|
||||
case InventoryType.ArmoryBody:
|
||||
case InventoryType.ArmoryHands:
|
||||
goto IL_010e;
|
||||
case InventoryType.ArmoryWrist:
|
||||
goto IL_011b;
|
||||
case InventoryType.ArmoryLegs:
|
||||
case InventoryType.ArmoryFeets:
|
||||
goto IL_0128;
|
||||
case InventoryType.ArmoryEar:
|
||||
case InventoryType.ArmoryNeck:
|
||||
goto IL_0135;
|
||||
case InventoryType.ArmoryWaist:
|
||||
goto IL_016e;
|
||||
}
|
||||
goto case 4;
|
||||
case 15:
|
||||
num = -1327648944;
|
||||
break;
|
||||
case 7:
|
||||
goto IL_010e;
|
||||
case 2:
|
||||
goto IL_011b;
|
||||
case 6:
|
||||
goto IL_0128;
|
||||
case 8:
|
||||
goto IL_0135;
|
||||
case 1:
|
||||
num = ((inventoryType == InventoryType.ArmoryMainHand) ? (-1327648934) : (-1327648946));
|
||||
break;
|
||||
case 16:
|
||||
num = -1327648930;
|
||||
break;
|
||||
case 0:
|
||||
goto IL_016e;
|
||||
case 5:
|
||||
return result;
|
||||
case 3:
|
||||
num = ((inventoryType == InventoryType.EquippedItems) ? (-1327648939) : (-1327648942));
|
||||
break;
|
||||
case 12:
|
||||
num = -1327648930;
|
||||
break;
|
||||
case 13:
|
||||
{
|
||||
num = ((inventoryType == InventoryType.ArmoryRings) ? (-1327648932) : (-1327648929));
|
||||
break;
|
||||
}
|
||||
IL_010e:
|
||||
result = AgentMateriaAttach.FilterCategory.ArmouryHeadBodyHands;
|
||||
num = -1327648933;
|
||||
break;
|
||||
IL_00f8:
|
||||
num = -1327648941;
|
||||
break;
|
||||
IL_016e:
|
||||
result = AgentMateriaAttach.FilterCategory.None;
|
||||
num = -1327648933;
|
||||
break;
|
||||
IL_0135:
|
||||
result = AgentMateriaAttach.FilterCategory.ArmouryNeckEars;
|
||||
num = -1327648933;
|
||||
break;
|
||||
IL_0128:
|
||||
result = AgentMateriaAttach.FilterCategory.ArmouryLegsFeet;
|
||||
num = -1327648933;
|
||||
break;
|
||||
IL_011b:
|
||||
result = AgentMateriaAttach.FilterCategory.ArmouryWristRing;
|
||||
num = -1327648933;
|
||||
break;
|
||||
}
|
||||
case InventoryType.Inventory1:
|
||||
case InventoryType.Inventory2:
|
||||
case InventoryType.Inventory3:
|
||||
case InventoryType.Inventory4:
|
||||
return AgentMateriaAttach.FilterCategory.Inventory;
|
||||
case InventoryType.ArmoryOffHand:
|
||||
case InventoryType.ArmoryMainHand:
|
||||
return AgentMateriaAttach.FilterCategory.ArmouryWeapon;
|
||||
case InventoryType.ArmoryHead:
|
||||
case InventoryType.ArmoryBody:
|
||||
case InventoryType.ArmoryHands:
|
||||
return AgentMateriaAttach.FilterCategory.ArmouryHeadBodyHands;
|
||||
case InventoryType.ArmoryLegs:
|
||||
case InventoryType.ArmoryFeets:
|
||||
return AgentMateriaAttach.FilterCategory.ArmouryLegsFeet;
|
||||
case InventoryType.ArmoryEar:
|
||||
case InventoryType.ArmoryNeck:
|
||||
return AgentMateriaAttach.FilterCategory.ArmouryNeckEars;
|
||||
case InventoryType.ArmoryWrist:
|
||||
case InventoryType.ArmoryRings:
|
||||
return AgentMateriaAttach.FilterCategory.ArmouryWristRing;
|
||||
case InventoryType.EquippedItems:
|
||||
return AgentMateriaAttach.FilterCategory.Equipped;
|
||||
default:
|
||||
return AgentMateriaAttach.FilterCategory.None;
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe static int? FindItemIndex(InventoryItem* target)
|
||||
{
|
||||
int num = ((target != null) ? (-1032587333) : (-1032587331));
|
||||
AgentMateriaAttach* ptr = default(AgentMateriaAttach*);
|
||||
int num5 = default(int);
|
||||
AgentMateriaAttach.MateriaAttachEntry* value = default(AgentMateriaAttach.MateriaAttachEntry*);
|
||||
while (true)
|
||||
if (target == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1032587332;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
return null;
|
||||
}
|
||||
AgentMateriaAttach* ptr = AgentMateriaAttach.Instance();
|
||||
if (ptr == null || !ptr->IsAgentActive() || ptr->Data == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (int i = 0; i < ptr->ItemCount; i++)
|
||||
{
|
||||
AgentMateriaAttach.MateriaAttachEntry* value = ptr->Data->ItemsSorted[i].Value;
|
||||
if (value != null && value->Item == target)
|
||||
{
|
||||
case 8:
|
||||
num = ((!ptr->IsAgentActive()) ? (-1032587329) : (-1032587330));
|
||||
break;
|
||||
case 3:
|
||||
return null;
|
||||
case 10:
|
||||
num = ((num5 < ptr->ItemCount) ? (-1032587339) : (-1032587336));
|
||||
break;
|
||||
case 7:
|
||||
ptr = AgentMateriaAttach.Instance();
|
||||
num = ((ptr == null) ? (-1032587329) : (-1032587340));
|
||||
break;
|
||||
case 4:
|
||||
return null;
|
||||
case 12:
|
||||
{
|
||||
int num6 = num5;
|
||||
num3 = 1;
|
||||
num4 = num6;
|
||||
int num7 = num4 ^ num3;
|
||||
int num8 = num4 & num3;
|
||||
num5 = num7 + (num8 + num8);
|
||||
num = -1032587338;
|
||||
break;
|
||||
}
|
||||
case 9:
|
||||
value = ptr->Data->ItemsSorted[num5].Value;
|
||||
num = ((value == null) ? (-1032587344) : (-1032587335));
|
||||
break;
|
||||
case 5:
|
||||
num = ((value->Item != target) ? (-1032587344) : (-1032587337));
|
||||
break;
|
||||
case 1:
|
||||
return null;
|
||||
case 2:
|
||||
num = ((ptr->Data != null) ? (-1032587334) : (-1032587329));
|
||||
break;
|
||||
case 11:
|
||||
return num5;
|
||||
case 0:
|
||||
num = -1032587331;
|
||||
break;
|
||||
case 6:
|
||||
num5 = 0;
|
||||
num = -1032587338;
|
||||
break;
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public unsafe static int? FindMateriaIndex(uint materiaItemId)
|
||||
{
|
||||
AgentMateriaAttach* ptr = AgentMateriaAttach.Instance();
|
||||
int num = ((ptr == null) ? 2014235157 : 2014235164);
|
||||
AgentMateriaAttach.MateriaAttachEntry* value = default(AgentMateriaAttach.MateriaAttachEntry*);
|
||||
int num6 = default(int);
|
||||
while (true)
|
||||
if (ptr == null || !ptr->IsAgentActive() || ptr->Data == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 2014235167;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
return null;
|
||||
}
|
||||
for (int i = 0; i < ptr->MateriaCount; i++)
|
||||
{
|
||||
AgentMateriaAttach.MateriaAttachEntry* value = ptr->Data->MateriaSorted[i].Value;
|
||||
if (value != null && value->Item != null && value->Item->ItemId == materiaItemId)
|
||||
{
|
||||
case 11:
|
||||
num = ((value->Item->ItemId != materiaItemId) ? 2014235158 : 2014235159);
|
||||
break;
|
||||
case 0:
|
||||
num = ((ptr->Data != null) ? 2014235166 : 2014235157);
|
||||
break;
|
||||
case 10:
|
||||
return null;
|
||||
case 8:
|
||||
return num6;
|
||||
case 7:
|
||||
return null;
|
||||
case 3:
|
||||
num = ((!ptr->IsAgentActive()) ? 2014235157 : 2014235167);
|
||||
break;
|
||||
case 2:
|
||||
num = 2014235164;
|
||||
break;
|
||||
case 4:
|
||||
num = ((num6 < ptr->MateriaCount) ? 2014235162 : 2014235160);
|
||||
break;
|
||||
case 1:
|
||||
num6 = 0;
|
||||
num = 2014235163;
|
||||
break;
|
||||
case 5:
|
||||
value = ptr->Data->MateriaSorted[num6].Value;
|
||||
num = ((value == null) ? 2014235158 : 2014235161);
|
||||
break;
|
||||
case 6:
|
||||
num = ((value->Item == null) ? 2014235158 : 2014235156);
|
||||
break;
|
||||
case 9:
|
||||
{
|
||||
int num5 = num6;
|
||||
num3 = 1;
|
||||
num4 = num5;
|
||||
num6 = (num4 | num3) + (num4 & num3);
|
||||
num = 2014235163;
|
||||
break;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static bool IsMeldingUnlocked()
|
||||
|
|
@ -593,69 +240,30 @@ public static class MeldActions
|
|||
|
||||
public unsafe static bool CanMeldItem(IDataManager dataManager, InventoryItem* item)
|
||||
{
|
||||
int num = ((item == null) ? (-1684140330) : (-1684140332));
|
||||
Item row = default(Item);
|
||||
int num5 = default(int);
|
||||
int num6 = default(int);
|
||||
while (true)
|
||||
if (item == null || item->ItemId == 0)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1684140328;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
return false;
|
||||
}
|
||||
if (!dataManager.GetExcelSheet<Item>().TryGetRow(item->ItemId, out var row))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (row.MateriaSlotCount == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
int num = row.MateriaSlotCount;
|
||||
if (row.IsAdvancedMeldingPermitted)
|
||||
{
|
||||
num = 5;
|
||||
}
|
||||
for (int i = 0; i < num; i++)
|
||||
{
|
||||
if (item->Materia[i] == 0)
|
||||
{
|
||||
case 6:
|
||||
num = (dataManager.GetExcelSheet<Item>().TryGetRow(item->ItemId, out row) ? (-1684140324) : (-1684140325));
|
||||
break;
|
||||
case 5:
|
||||
num5 = row.MateriaSlotCount;
|
||||
num = ((!row.IsAdvancedMeldingPermitted) ? (-1684140336) : (-1684140333));
|
||||
break;
|
||||
case 4:
|
||||
num = ((row.MateriaSlotCount != 0) ? (-1684140323) : (-1684140335));
|
||||
break;
|
||||
case 2:
|
||||
num = -1684140332;
|
||||
break;
|
||||
case 1:
|
||||
num = ((item->Materia[num6] != 0) ? (-1684140334) : (-1684140321));
|
||||
break;
|
||||
case 13:
|
||||
return false;
|
||||
case 11:
|
||||
num5 = 5;
|
||||
num = -1684140336;
|
||||
break;
|
||||
case 0:
|
||||
num = ((num6 < num5) ? (-1684140327) : (-1684140331));
|
||||
break;
|
||||
case 10:
|
||||
{
|
||||
int num7 = num6;
|
||||
num3 = 1;
|
||||
num4 = num7;
|
||||
int num8 = num4 ^ num3;
|
||||
int num9 = num4 & num3;
|
||||
num6 = num8 + (num9 + num9);
|
||||
num = -1684140328;
|
||||
break;
|
||||
}
|
||||
case 8:
|
||||
num6 = 0;
|
||||
num = -1684140328;
|
||||
break;
|
||||
case 7:
|
||||
return true;
|
||||
case 9:
|
||||
return false;
|
||||
case 14:
|
||||
return false;
|
||||
case 3:
|
||||
return false;
|
||||
case 12:
|
||||
num = ((item->ItemId != 0) ? (-1684140322) : (-1684140330));
|
||||
break;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,111 +1,3 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
|
||||
namespace LLib.Gear;
|
||||
|
||||
public readonly record struct MeldInstruction(uint ItemId, int SlotIndex, uint MateriaItemId, bool IsOvermeld)
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder stringBuilder = _206F_202B_202C_200C_200F_202E_206B_206B_200F_206D_200F_206E_200F_202A_202E_202B_202B_206C_202A_200C_206D_202B_200F_200F_206F_200E_202B_206F_202A_200B_206E_206D_206B_202C_202A_200F_200C_206F_202A_202C_202E();
|
||||
_206B_202B_200E_206B_200D_200D_206E_206E_200B_206E_206E_206C_206A_200D_200B_202E_202D_206D_206B_206C_202D_206A_206F_206A_202E_206E_206F_200F_206B_200B_206F_206E_206D_200E_202E_206C_206A_200F_200D_202C_202E(stringBuilder, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(910491666));
|
||||
_206B_202B_200E_206B_200D_200D_206E_206E_200B_206E_206E_206C_206A_200D_200B_202E_202D_206D_206B_206C_202D_206A_206F_206A_202E_206E_206F_200F_206B_200B_206F_206E_206D_200E_202E_206C_206A_200F_200D_202C_202E(stringBuilder, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(1808631505));
|
||||
int num = ((!PrintMembers(stringBuilder)) ? 1348202798 : 1348202799);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1348202798;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 2:
|
||||
num = 1348202799;
|
||||
break;
|
||||
case 0:
|
||||
_202E_206B_202B_200B_206D_206D_200D_202D_200B_202D_206C_202C_206D_206C_202E_202D_202C_206A_202A_200D_202B_206B_206F_206E_202E_206A_200B_202E_202C_200B_206C_200B_200C_202A_202C_206C_206A_206C_206A_202A_202E(stringBuilder, '}');
|
||||
return _202A_200D_206C_206B_202A_202A_206D_200D_200B_200F_202A_202B_206C_200F_202E_206A_206C_206B_202A_202A_206B_200B_200E_202D_206C_206A_200D_202E_206E_202E_206C_202E_202D_200E_200B_202A_202E_200E_202D_206B_202E((object)stringBuilder);
|
||||
case 1:
|
||||
_202E_206B_202B_200B_206D_206D_200D_202D_200B_202D_206C_202C_206D_206C_202E_202D_202C_206A_202A_200D_202B_206B_206F_206E_202E_206A_200B_202E_202C_200B_206C_200B_200C_202A_202C_206C_206A_206C_206A_202A_202E(stringBuilder, ' ');
|
||||
num = 1348202798;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
private bool PrintMembers(StringBuilder builder)
|
||||
{
|
||||
_206B_202B_200E_206B_200D_200D_206E_206E_200B_206E_206E_206C_206A_200D_200B_202E_202D_206D_206B_206C_202D_206A_206F_206A_202E_206E_206F_200F_206B_200B_206F_206E_206D_200E_202E_206C_206A_200F_200D_202C_202E(builder, global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-1758736713));
|
||||
_206B_202B_200E_206B_200D_200D_206E_206E_200B_206E_206E_206C_206A_200D_200B_202E_202D_206D_206B_206C_202D_206A_206F_206A_202E_206E_206F_200F_206B_200B_206F_206E_206D_200E_202E_206C_206A_200F_200D_202C_202E(builder, ItemId.ToString());
|
||||
_206B_202B_200E_206B_200D_200D_206E_206E_200B_206E_206E_206C_206A_200D_200B_202E_202D_206D_206B_206C_202D_206A_206F_206A_202E_206E_206F_200F_206B_200B_206F_206E_206D_200E_202E_206C_206A_200F_200D_202C_202E(builder, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(66042605));
|
||||
_206B_202B_200E_206B_200D_200D_206E_206E_200B_206E_206E_206C_206A_200D_200B_202E_202D_206D_206B_206C_202D_206A_206F_206A_202E_206E_206F_200F_206B_200B_206F_206E_206D_200E_202E_206C_206A_200F_200D_202C_202E(builder, SlotIndex.ToString());
|
||||
_206B_202B_200E_206B_200D_200D_206E_206E_200B_206E_206E_206C_206A_200D_200B_202E_202D_206D_206B_206C_202D_206A_206F_206A_202E_206E_206F_200F_206B_200B_206F_206E_206D_200E_202E_206C_206A_200F_200D_202C_202E(builder, global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(1813688100));
|
||||
_206B_202B_200E_206B_200D_200D_206E_206E_200B_206E_206E_206C_206A_200D_200B_202E_202D_206D_206B_206C_202D_206A_206F_206A_202E_206E_206F_200F_206B_200B_206F_206E_206D_200E_202E_206C_206A_200F_200D_202C_202E(builder, MateriaItemId.ToString());
|
||||
_206B_202B_200E_206B_200D_200D_206E_206E_200B_206E_206E_206C_206A_200D_200B_202E_202D_206D_206B_206C_202D_206A_206F_206A_202E_206E_206F_200F_206B_200B_206F_206E_206D_200E_202E_206C_206A_200F_200D_202C_202E(builder, global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-2051131662));
|
||||
_206B_202B_200E_206B_200D_200D_206E_206E_200B_206E_206E_206C_206A_200D_200B_202E_202D_206D_206B_206C_202D_206A_206F_206A_202E_206E_206F_200F_206B_200B_206F_206E_206D_200E_202E_206C_206A_200F_200D_202C_202E(builder, IsOvermeld.ToString());
|
||||
return true;
|
||||
}
|
||||
|
||||
[CompilerGenerated]
|
||||
public bool Equals(MeldInstruction other)
|
||||
{
|
||||
int num = ((!EqualityComparer<uint>.Default.Equals(ItemId, other.ItemId)) ? 1583334064 : 1583334069);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1583334068;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 3:
|
||||
num = 1583334069;
|
||||
break;
|
||||
case 0:
|
||||
num = ((!EqualityComparer<uint>.Default.Equals(MateriaItemId, other.MateriaItemId)) ? 1583334064 : 1583334070);
|
||||
break;
|
||||
case 2:
|
||||
return EqualityComparer<bool>.Default.Equals(IsOvermeld, other.IsOvermeld);
|
||||
case 1:
|
||||
num = ((!EqualityComparer<int>.Default.Equals(SlotIndex, other.SlotIndex)) ? 1583334064 : 1583334068);
|
||||
break;
|
||||
case 4:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool IEquatable<MeldInstruction>.Equals(MeldInstruction other)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in Equals
|
||||
return this.Equals(other);
|
||||
}
|
||||
|
||||
static StringBuilder _206F_202B_202C_200C_200F_202E_206B_206B_200F_206D_200F_206E_200F_202A_202E_202B_202B_206C_202A_200C_206D_202B_200F_200F_206F_200E_202B_206F_202A_200B_206E_206D_206B_202C_202A_200F_200C_206F_202A_202C_202E()
|
||||
{
|
||||
return new StringBuilder();
|
||||
}
|
||||
|
||||
static StringBuilder _206B_202B_200E_206B_200D_200D_206E_206E_200B_206E_206E_206C_206A_200D_200B_202E_202D_206D_206B_206C_202D_206A_206F_206A_202E_206E_206F_200F_206B_200B_206F_206E_206D_200E_202E_206C_206A_200F_200D_202C_202E(StringBuilder P_0, string P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static StringBuilder _202E_206B_202B_200B_206D_206D_200D_202D_200B_202D_206C_202C_206D_206C_202E_202D_202C_206A_202A_200D_202B_206B_206F_206E_202E_206A_200B_202E_202C_200B_206C_200B_200C_202A_202C_206C_206A_206C_206A_202A_202E(StringBuilder P_0, char P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static string _202A_200D_206C_206B_202A_202A_206D_200D_200B_200F_202A_202B_206C_200F_202E_206A_206C_206B_202A_202A_206B_200B_200E_202D_206C_206A_200D_202E_206E_202E_206C_202E_202D_200E_200B_202A_202E_200E_202D_206B_202E(object P_0)
|
||||
{
|
||||
return P_0.ToString();
|
||||
}
|
||||
}
|
||||
public readonly record struct MeldInstruction(uint ItemId, int SlotIndex, uint MateriaItemId, bool IsOvermeld);
|
||||
|
|
|
|||
|
|
@ -1,110 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
|
||||
namespace LLib.Gear;
|
||||
|
||||
public readonly record struct MeldSlotInfo(int SlotIndex, uint MateriaId, byte Grade)
|
||||
{
|
||||
public bool IsEmpty => MateriaId == 0;
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder stringBuilder = _206D_206A_202B_206C_202D_200F_200E_206E_202D_202D_206B_202B_202C_202C_200B_200F_206F_202E_202E_206C_206D_206E_206F_200E_202E_206B_200B_202A_206E_200B_206A_206D_202B_202E_202E_202E_206C_200F_202A_200F_202E();
|
||||
_200B_202C_202A_202C_200B_202E_202E_200E_202C_206E_206D_202D_200F_202E_200B_206B_200F_206B_202E_202C_206D_200C_206C_200D_206C_200E_200D_202E_206D_200B_206B_206A_200D_200C_200D_206E_206A_202B_206A_206C_202E(stringBuilder, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(-178237641));
|
||||
_200B_202C_202A_202C_200B_202E_202E_200E_202C_206E_206D_202D_200F_202E_200B_206B_200F_206B_202E_202C_206D_200C_206C_200D_206C_200E_200D_202E_206D_200B_206B_206A_200D_200C_200D_206E_206A_202B_206A_206C_202E(stringBuilder, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(1808631505));
|
||||
int num = ((!PrintMembers(stringBuilder)) ? (-753586067) : (-753586066));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -753586068;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
num = -753586066;
|
||||
break;
|
||||
case 1:
|
||||
_202D_200E_206F_206F_202C_200D_202A_202C_202D_200C_206F_206F_206B_202B_206C_200E_206F_202C_202B_206A_206C_206B_206F_200E_206E_202A_202C_206C_206E_206C_200D_206D_206C_202C_202A_202B_202A_206E_200C_202E_202E(stringBuilder, '}');
|
||||
return _206F_202A_200E_202E_206A_206F_200F_206A_206C_206F_206D_206F_200F_200E_200E_202D_202D_206C_202C_206C_206D_206C_200F_202E_206A_200C_200D_200D_200D_206D_206C_202D_206D_200D_202C_206C_202E_200D_206A_206E_202E((object)stringBuilder);
|
||||
case 2:
|
||||
_202D_200E_206F_206F_202C_200D_202A_202C_202D_200C_206F_206F_206B_202B_206C_200E_206F_202C_202B_206A_206C_206B_206F_200E_206E_202A_202C_206C_206E_206C_200D_206D_206C_202C_202A_202B_202A_206E_200C_202E_202E(stringBuilder, ' ');
|
||||
num = -753586067;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
private bool PrintMembers(StringBuilder builder)
|
||||
{
|
||||
_200B_202C_202A_202C_200B_202E_202E_200E_202C_206E_206D_202D_200F_202E_200B_206B_200F_206B_202E_202C_206D_200C_206C_200D_206C_200E_200D_202E_206D_200B_206B_206A_200D_200C_200D_206E_206A_202B_206A_206C_202E(builder, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(1108590379));
|
||||
_200B_202C_202A_202C_200B_202E_202E_200E_202C_206E_206D_202D_200F_202E_200B_206B_200F_206B_202E_202C_206D_200C_206C_200D_206C_200E_200D_202E_206D_200B_206B_206A_200D_200C_200D_206E_206A_202B_206A_206C_202E(builder, SlotIndex.ToString());
|
||||
_200B_202C_202A_202C_200B_202E_202E_200E_202C_206E_206D_202D_200F_202E_200B_206B_200F_206B_202E_202C_206D_200C_206C_200D_206C_200E_200D_202E_206D_200B_206B_206A_200D_200C_200D_206E_206A_202B_206A_206C_202E(builder, global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-548869315));
|
||||
_200B_202C_202A_202C_200B_202E_202E_200E_202C_206E_206D_202D_200F_202E_200B_206B_200F_206B_202E_202C_206D_200C_206C_200D_206C_200E_200D_202E_206D_200B_206B_206A_200D_200C_200D_206E_206A_202B_206A_206C_202E(builder, MateriaId.ToString());
|
||||
_200B_202C_202A_202C_200B_202E_202E_200E_202C_206E_206D_202D_200F_202E_200B_206B_200F_206B_202E_202C_206D_200C_206C_200D_206C_200E_200D_202E_206D_200B_206B_206A_200D_200C_200D_206E_206A_202B_206A_206C_202E(builder, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(-1808759350));
|
||||
_200B_202C_202A_202C_200B_202E_202E_200E_202C_206E_206D_202D_200F_202E_200B_206B_200F_206B_202E_202C_206D_200C_206C_200D_206C_200E_200D_202E_206D_200B_206B_206A_200D_200C_200D_206E_206A_202B_206A_206C_202E(builder, Grade.ToString());
|
||||
_200B_202C_202A_202C_200B_202E_202E_200E_202C_206E_206D_202D_200F_202E_200B_206B_200F_206B_202E_202C_206D_200C_206C_200D_206C_200E_200D_202E_206D_200B_206B_206A_200D_200C_200D_206E_206A_202B_206A_206C_202E(builder, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(-1359578170));
|
||||
_200B_202C_202A_202C_200B_202E_202E_200E_202C_206E_206D_202D_200F_202E_200B_206B_200F_206B_202E_202C_206D_200C_206C_200D_206C_200E_200D_202E_206D_200B_206B_206A_200D_200C_200D_206E_206A_202B_206A_206C_202E(builder, IsEmpty.ToString());
|
||||
return true;
|
||||
}
|
||||
|
||||
[CompilerGenerated]
|
||||
public bool Equals(MeldSlotInfo other)
|
||||
{
|
||||
int num = ((!EqualityComparer<int>.Default.Equals(SlotIndex, other.SlotIndex)) ? (-1955436948) : (-1955436946));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1955436945;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
num = -1955436946;
|
||||
break;
|
||||
case 1:
|
||||
num = ((!EqualityComparer<uint>.Default.Equals(MateriaId, other.MateriaId)) ? (-1955436948) : (-1955436947));
|
||||
break;
|
||||
case 3:
|
||||
return false;
|
||||
case 2:
|
||||
return EqualityComparer<byte>.Default.Equals(Grade, other.Grade);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool IEquatable<MeldSlotInfo>.Equals(MeldSlotInfo other)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in Equals
|
||||
return this.Equals(other);
|
||||
}
|
||||
|
||||
static StringBuilder _206D_206A_202B_206C_202D_200F_200E_206E_202D_202D_206B_202B_202C_202C_200B_200F_206F_202E_202E_206C_206D_206E_206F_200E_202E_206B_200B_202A_206E_200B_206A_206D_202B_202E_202E_202E_206C_200F_202A_200F_202E()
|
||||
{
|
||||
return new StringBuilder();
|
||||
}
|
||||
|
||||
static StringBuilder _200B_202C_202A_202C_200B_202E_202E_200E_202C_206E_206D_202D_200F_202E_200B_206B_200F_206B_202E_202C_206D_200C_206C_200D_206C_200E_200D_202E_206D_200B_206B_206A_200D_200C_200D_206E_206A_202B_206A_206C_202E(StringBuilder P_0, string P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static StringBuilder _202D_200E_206F_206F_202C_200D_202A_202C_202D_200C_206F_206F_206B_202B_206C_200E_206F_202C_202B_206A_206C_206B_206F_200E_206E_202A_202C_206C_206E_206C_200D_206D_206C_202C_202A_202B_202A_206E_200C_202E_202E(StringBuilder P_0, char P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static string _206F_202A_200E_202E_206A_206F_200F_206A_206C_206F_206D_206F_200F_200E_200E_202D_202D_206C_202C_206C_206D_206C_200F_202E_206A_200C_200D_200D_200D_206D_206C_202D_206D_200D_202C_206C_202E_200D_206A_206E_202E(object P_0)
|
||||
{
|
||||
return P_0.ToString();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Dalamud.Plugin.Services;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
using FFXIVClientStructs.FFXIV.Client.UI;
|
||||
|
|
@ -17,434 +16,157 @@ public static class RepairActions
|
|||
public unsafe static bool TryOpenRepairWindow()
|
||||
{
|
||||
ActionManager* ptr = ActionManager.Instance();
|
||||
int num = ((ptr != null) ? 68220505 : 68220506);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 68220504;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 1:
|
||||
return ptr->UseAction(ActionType.GeneralAction, 6u, 3758096384uL, 0u, ActionManager.UseActionMode.None, 0u, null);
|
||||
case 2:
|
||||
return false;
|
||||
case 0:
|
||||
goto IL_0061;
|
||||
}
|
||||
continue;
|
||||
IL_0061:
|
||||
num = 68220506;
|
||||
return false;
|
||||
}
|
||||
return ptr->UseAction(ActionType.GeneralAction, 6u, 3758096384uL, 0u, ActionManager.UseActionMode.None, 0u, null);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool IsRepairAddonReady(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
return gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(2048825811), out addonPtr);
|
||||
return gameGui.TryGetReadyAddon<AtkUnitBase>("Repair", out addonPtr);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TryRepairAll(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(419098168), out addonPtr) ? (-498234615) : (-498234614));
|
||||
while (true)
|
||||
if (!gameGui.TryGetReadyAddon<AtkUnitBase>("Repair", out var addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -498234613;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0052;
|
||||
case 2:
|
||||
return AddonCallback.ClickButton(addonPtr, ((AddonRepair*)addonPtr)->RepairAllButton);
|
||||
case 1:
|
||||
return false;
|
||||
}
|
||||
continue;
|
||||
IL_0052:
|
||||
num = -498234614;
|
||||
return false;
|
||||
}
|
||||
return AddonCallback.ClickButton(addonPtr, ((AddonRepair*)addonPtr)->RepairAllButton);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TryConfirmDialog(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(2048825811), out addonPtr) ? 2047386500 : 2047386499);
|
||||
AtkUnitBase* addonPtr2 = default(AtkUnitBase*);
|
||||
while (true)
|
||||
if (!gameGui.TryGetReadyAddon<AtkUnitBase>("Repair", out var _))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 2047386496;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 2:
|
||||
AddonCallback.ClickYes(addonPtr2);
|
||||
return true;
|
||||
case 3:
|
||||
return false;
|
||||
case 4:
|
||||
num = (gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(423301839), out addonPtr2) ? 2047386498 : 2047386497);
|
||||
break;
|
||||
case 1:
|
||||
return false;
|
||||
case 0:
|
||||
num = 2047386499;
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (!gameGui.TryGetReadyAddon<AtkUnitBase>("SelectYesno", out var addonPtr2))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
AddonCallback.ClickYes(addonPtr2);
|
||||
return true;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static string DescribeRepairAddon(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(-469715628), out addonPtr) ? 1483181869 : 1483181871);
|
||||
AtkComponentButton* repairAllButton = default(AtkComponentButton*);
|
||||
while (true)
|
||||
if (!gameGui.TryGetAddonByName<AtkUnitBase>("Repair", out var addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1483181870;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
string text;
|
||||
string value;
|
||||
DefaultInterpolatedStringHandler defaultInterpolatedStringHandler;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 2:
|
||||
num = 1483181871;
|
||||
break;
|
||||
case 3:
|
||||
repairAllButton = ((AddonRepair*)addonPtr)->RepairAllButton;
|
||||
num = ((repairAllButton == null) ? 1483181864 : 1483181866);
|
||||
break;
|
||||
case 1:
|
||||
return global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(1020358053);
|
||||
case 0:
|
||||
text = global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(1832920714);
|
||||
goto IL_00eb;
|
||||
case 5:
|
||||
text = global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(120055411);
|
||||
goto IL_00eb;
|
||||
case 6:
|
||||
text = global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(2048905668);
|
||||
goto IL_00eb;
|
||||
case 4:
|
||||
{
|
||||
num = (repairAllButton->IsEnabled ? 1483181867 : 1483181870);
|
||||
break;
|
||||
}
|
||||
IL_00eb:
|
||||
value = text;
|
||||
defaultInterpolatedStringHandler = new DefaultInterpolatedStringHandler(44, 3);
|
||||
defaultInterpolatedStringHandler.AppendLiteral(global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(-734034791));
|
||||
defaultInterpolatedStringHandler.AppendFormatted(addonPtr->IsVisible);
|
||||
defaultInterpolatedStringHandler.AppendLiteral(global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-199296985));
|
||||
defaultInterpolatedStringHandler.AppendFormatted(LAddon.IsAddonReady(addonPtr));
|
||||
defaultInterpolatedStringHandler.AppendLiteral(global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-1116769434));
|
||||
defaultInterpolatedStringHandler.AppendFormatted(value);
|
||||
return defaultInterpolatedStringHandler.ToStringAndClear();
|
||||
}
|
||||
return "addon: not open";
|
||||
}
|
||||
AtkComponentButton* repairAllButton = ((AddonRepair*)addonPtr)->RepairAllButton;
|
||||
string value = ((repairAllButton == null) ? "null" : (repairAllButton->IsEnabled ? "enabled" : "disabled"));
|
||||
return $"addon: visible={addonPtr->IsVisible}, ready={LAddon.IsAddonReady(addonPtr)}, repair-all button: {value}";
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TryCloseRepairWindow(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(1033968236), out addonPtr) ? (-405897678) : (-405897677));
|
||||
while (true)
|
||||
if (!gameGui.TryGetAddonByName<AtkUnitBase>("Repair", out var addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -405897678;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 2:
|
||||
goto IL_0052;
|
||||
case 0:
|
||||
addonPtr->Close(fireCallback: true);
|
||||
return true;
|
||||
case 1:
|
||||
return false;
|
||||
}
|
||||
continue;
|
||||
IL_0052:
|
||||
num = -405897677;
|
||||
return false;
|
||||
}
|
||||
addonPtr->Close(fireCallback: true);
|
||||
return true;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TrySelectRepairFromMenu(IGameGui gameGui, int repairIndex)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetReadyAddon<AtkUnitBase>(global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(-779772561), out addonPtr) ? 1787787027 : 1787787024);
|
||||
while (true)
|
||||
if (!gameGui.TryGetReadyAddon<AtkUnitBase>("SelectIconString", out var addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1787787025;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0052;
|
||||
case 1:
|
||||
return false;
|
||||
case 2:
|
||||
AddonCallback.FireWithUpdate(addonPtr, repairIndex);
|
||||
return true;
|
||||
}
|
||||
continue;
|
||||
IL_0052:
|
||||
num = 1787787024;
|
||||
return false;
|
||||
}
|
||||
AddonCallback.FireWithUpdate(addonPtr, repairIndex);
|
||||
return true;
|
||||
}
|
||||
|
||||
public static int? FindRepairIndex(IDataManager dataManager, uint npcBaseId)
|
||||
{
|
||||
ENpcBase row;
|
||||
int num = (dataManager.GetExcelSheet<ENpcBase>().TryGetRow(npcBaseId, out row) ? (-1361038007) : (-1361038008));
|
||||
int num5 = default(int);
|
||||
while (true)
|
||||
if (!dataManager.GetExcelSheet<ENpcBase>().TryGetRow(npcBaseId, out var row))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1361038006;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
return null;
|
||||
}
|
||||
for (int i = 0; i < row.ENpcData.Count; i++)
|
||||
{
|
||||
if (row.ENpcData[i].RowId == 720915)
|
||||
{
|
||||
case 6:
|
||||
{
|
||||
int num6 = num5;
|
||||
num3 = 1;
|
||||
num4 = num6;
|
||||
int num7 = num4 ^ num3;
|
||||
int num8 = num4 & num3;
|
||||
num5 = num7 + (num8 + num8);
|
||||
num = -1361038003;
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
return null;
|
||||
case 3:
|
||||
num5 = 0;
|
||||
num = -1361038003;
|
||||
break;
|
||||
case 1:
|
||||
num = ((row.ENpcData[num5].RowId != 720915) ? (-1361038004) : (-1361038002));
|
||||
break;
|
||||
case 7:
|
||||
num = ((num5 < row.ENpcData.Count) ? (-1361038005) : (-1361038001));
|
||||
break;
|
||||
case 4:
|
||||
return num5;
|
||||
case 0:
|
||||
num = -1361038008;
|
||||
break;
|
||||
case 5:
|
||||
return null;
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static bool CanSelfRepairItem(uint itemId, IDataManager dataManager, Func<uint, byte> jobLevelLookup)
|
||||
{
|
||||
Item row;
|
||||
int num = (dataManager.GetExcelSheet<Item>().TryGetRow(itemId, out row) ? 1632671578 : 1632671580);
|
||||
uint rowId = default(uint);
|
||||
uint num7 = default(uint);
|
||||
while (true)
|
||||
if (!dataManager.GetExcelSheet<Item>().TryGetRow(itemId, out var row))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1632671577;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 7:
|
||||
return false;
|
||||
case 6:
|
||||
{
|
||||
byte num8 = jobLevelLookup(rowId);
|
||||
int num9 = _206E_206F_206E_202B_202E_202E_206A_202A_202B_200F_206E_200D_200F_206C_200B_206D_206D_202E_200D_200B_200D_206C_200D_202E_206F_202B_206C_206B_206B_206B_200D_202B_206C_200F_202B_206E_202C_206C_202B_202A_202E(row.LevelEquip - 10, 1);
|
||||
num = ((num8 >= num9) ? 1632671576 : 1632671581);
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
return HasDarkMatterOrBetter(dataManager, num7);
|
||||
case 5:
|
||||
return false;
|
||||
case 2:
|
||||
return false;
|
||||
case 4:
|
||||
return false;
|
||||
case 3:
|
||||
rowId = row.ClassJobRepair.RowId;
|
||||
num = ((rowId != 0) ? 1632671583 : 1632671579);
|
||||
break;
|
||||
case 8:
|
||||
num = 1632671580;
|
||||
break;
|
||||
case 1:
|
||||
num7 = row.ItemRepair.ValueNullable?.Item.RowId ?? 0;
|
||||
num = ((num7 != 0) ? 1632671577 : 1632671582);
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
uint rowId = row.ClassJobRepair.RowId;
|
||||
if (rowId == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
byte num = jobLevelLookup(rowId);
|
||||
int num2 = Math.Max(row.LevelEquip - 10, 1);
|
||||
if (num < num2)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
uint num3 = row.ItemRepair.ValueNullable?.Item.RowId ?? 0;
|
||||
if (num3 == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return HasDarkMatterOrBetter(dataManager, num3);
|
||||
}
|
||||
|
||||
public unsafe static bool CanSelfRepairAny(IDataManager dataManager, Func<uint, byte> jobLevelLookup, int thresholdPercent = 100)
|
||||
{
|
||||
InventoryManager* ptr = InventoryManager.Instance();
|
||||
int num = ((ptr != null) ? 1849138139 : 1849138142);
|
||||
int num7 = default(int);
|
||||
InventoryItem* inventorySlot = default(InventoryItem*);
|
||||
InventoryContainer* inventoryContainer = default(InventoryContainer*);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1849138143;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
return false;
|
||||
}
|
||||
InventoryContainer* inventoryContainer = ptr->GetInventoryContainer(InventoryType.EquippedItems);
|
||||
if (inventoryContainer == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
for (int i = 0; i < inventoryContainer->Size; i++)
|
||||
{
|
||||
InventoryItem* inventorySlot = inventoryContainer->GetInventorySlot(i);
|
||||
if (inventorySlot != null && inventorySlot->ItemId != 0 && inventorySlot->Condition * 100 / 30000 < thresholdPercent && CanSelfRepairItem(inventorySlot->ItemId, dataManager, jobLevelLookup))
|
||||
{
|
||||
case 0:
|
||||
return true;
|
||||
case 9:
|
||||
num7 = 0;
|
||||
num = 1849138140;
|
||||
break;
|
||||
case 5:
|
||||
num = ((!CanSelfRepairItem(inventorySlot->ItemId, dataManager, jobLevelLookup)) ? 1849138131 : 1849138143);
|
||||
break;
|
||||
case 2:
|
||||
num = 1849138142;
|
||||
break;
|
||||
case 7:
|
||||
inventorySlot = inventoryContainer->GetInventorySlot(num7);
|
||||
num = ((inventorySlot == null) ? 1849138131 : 1849138132);
|
||||
break;
|
||||
case 10:
|
||||
return false;
|
||||
case 6:
|
||||
num = ((inventorySlot->Condition * 100 / 30000 >= thresholdPercent) ? 1849138131 : 1849138138);
|
||||
break;
|
||||
case 11:
|
||||
num = ((inventorySlot->ItemId == 0) ? 1849138131 : 1849138137);
|
||||
break;
|
||||
case 8:
|
||||
return false;
|
||||
case 12:
|
||||
{
|
||||
int num8 = num7;
|
||||
num3 = 1;
|
||||
num4 = num8;
|
||||
int num9 = num4 ^ num3;
|
||||
int num10 = num4 & num3;
|
||||
num7 = num9 + (num10 + num10);
|
||||
num = 1849138140;
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
num = ((num7 < inventoryContainer->Size) ? 1849138136 : 1849138133);
|
||||
break;
|
||||
case 4:
|
||||
inventoryContainer = ptr->GetInventoryContainer(InventoryType.EquippedItems);
|
||||
num = ((inventoryContainer != null) ? 1849138134 : 1849138135);
|
||||
break;
|
||||
case 1:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private unsafe static bool HasDarkMatterOrBetter(IDataManager dataManager, uint requiredItemId)
|
||||
{
|
||||
InventoryManager* ptr = InventoryManager.Instance();
|
||||
int num = ((ptr != null) ? (-248963167) : (-248963166));
|
||||
ItemRepairResource current = default(ItemRepairResource);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -248963165;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0054;
|
||||
case 1:
|
||||
return false;
|
||||
case 2:
|
||||
{
|
||||
ExcelSheet<ItemRepairResource> excelSheet = dataManager.GetExcelSheet<ItemRepairResource>();
|
||||
bool flag = false;
|
||||
using (ExcelSheet<ItemRepairResource>.Enumerator enumerator = excelSheet.GetEnumerator())
|
||||
{
|
||||
num = 975190741;
|
||||
while (true)
|
||||
{
|
||||
int num7 = num;
|
||||
num3 = 975190742;
|
||||
num4 = num7;
|
||||
int num8 = num4 + num3;
|
||||
int num9 = num4 & num3;
|
||||
switch (num8 - (num9 + num9))
|
||||
{
|
||||
case 3:
|
||||
num = (enumerator.MoveNext() ? 975190743 : 975190742);
|
||||
break;
|
||||
case 6:
|
||||
flag = true;
|
||||
num = 975190737;
|
||||
break;
|
||||
case 1:
|
||||
current = enumerator.Current;
|
||||
num = ((current.Item.RowId != requiredItemId) ? 975190737 : 975190736);
|
||||
break;
|
||||
case 5:
|
||||
num = ((ptr->GetInventoryItemCount(current.Item.RowId, isHq: false, checkEquipped: true, checkArmory: true, 0) <= 0) ? 975190741 : 975190740);
|
||||
break;
|
||||
case 4:
|
||||
num = 975190741;
|
||||
break;
|
||||
case 7:
|
||||
num = ((!flag) ? 975190741 : 975190739);
|
||||
break;
|
||||
case 2:
|
||||
return true;
|
||||
case 0:
|
||||
goto end_IL_0086;
|
||||
}
|
||||
continue;
|
||||
end_IL_0086:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
continue;
|
||||
IL_0054:
|
||||
num = -248963166;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static int _206E_206F_206E_202B_202E_202E_206A_202A_202B_200F_206E_200D_200F_206C_200B_206D_206D_202E_200D_200B_200D_206C_200D_202E_206F_202B_206C_206B_206B_206B_200D_202B_206C_200F_202B_206E_202C_206C_202B_202A_202E(int P_0, int P_1)
|
||||
{
|
||||
return Math.Max(P_0, P_1);
|
||||
ExcelSheet<ItemRepairResource> excelSheet = dataManager.GetExcelSheet<ItemRepairResource>();
|
||||
bool flag = false;
|
||||
foreach (ItemRepairResource item in excelSheet)
|
||||
{
|
||||
if (item.Item.RowId == requiredItemId)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
if (flag && ptr->GetInventoryItemCount(item.Item.RowId, isHq: false, checkEquipped: true, checkArmory: true, 0) > 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,106 +1,3 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
|
||||
namespace LLib.Gear;
|
||||
|
||||
public readonly record struct SlotCondition(int SlotIndex, uint ItemId, int ConditionPercent)
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder stringBuilder = _200E_202C_206F_200F_200F_200E_202B_202C_206F_206B_200D_206B_206C_202B_200D_200F_206D_200E_200C_200E_206A_206D_206D_202E_206A_202D_206B_206C_206D_200D_200F_202B_206D_202D_202B_200B_202C_200C_206B_206C_202E();
|
||||
_202E_206A_200B_200C_206E_200D_206F_206C_206E_202B_200D_202D_206D_200B_206F_206A_206A_202A_206F_206B_206B_202A_206D_206C_202D_206C_202B_206F_200F_206D_202D_200E_206E_202D_200F_202B_206F_200E_202B_202C_202E(stringBuilder, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(401739836));
|
||||
_202E_206A_200B_200C_206E_200D_206F_206C_206E_202B_200D_202D_206D_200B_206F_206A_206A_202A_206F_206B_206B_202A_206D_206C_202D_206C_202B_206F_200F_206D_202D_200E_206E_202D_200F_202B_206F_200E_202B_202C_202E(stringBuilder, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(1148273145));
|
||||
int num = ((!PrintMembers(stringBuilder)) ? (-272952950) : (-272952951));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -272952952;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 2:
|
||||
_200D_202E_200E_202A_200E_206F_206E_202B_206D_202D_206E_200C_200D_200B_200E_206A_200F_206D_206F_202B_202D_200D_202C_206C_200F_206A_202E_206E_202A_202B_200C_202C_206C_200B_202B_200C_206A_200E_206A_206F_202E(stringBuilder, '}');
|
||||
return _206D_206E_206B_206B_202B_206F_202D_200E_200C_206D_200D_200F_200D_202D_202E_206A_200E_206D_200E_206C_200E_206F_206F_202E_200F_202E_202D_206B_200D_206D_200D_202C_206D_200D_200C_206E_202A_202B_202D_202E_202E((object)stringBuilder);
|
||||
case 1:
|
||||
_200D_202E_200E_202A_200E_206F_206E_202B_206D_202D_206E_200C_200D_200B_200E_206A_200F_206D_206F_202B_202D_200D_202C_206C_200F_206A_202E_206E_202A_202B_200C_202C_206C_200B_202B_200C_206A_200E_206A_206F_202E(stringBuilder, ' ');
|
||||
num = -272952950;
|
||||
break;
|
||||
case 0:
|
||||
num = -272952951;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
private bool PrintMembers(StringBuilder builder)
|
||||
{
|
||||
_202E_206A_200B_200C_206E_200D_206F_206C_206E_202B_200D_202D_206D_200B_206F_206A_206A_202A_206F_206B_206B_202A_206D_206C_202D_206C_202B_206F_200F_206D_202D_200E_206E_202D_200F_202B_206F_200E_202B_202C_202E(builder, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(-578928888));
|
||||
_202E_206A_200B_200C_206E_200D_206F_206C_206E_202B_200D_202D_206D_200B_206F_206A_206A_202A_206F_206B_206B_202A_206D_206C_202D_206C_202B_206F_200F_206D_202D_200E_206E_202D_200F_202B_206F_200E_202B_202C_202E(builder, SlotIndex.ToString());
|
||||
_202E_206A_200B_200C_206E_200D_206F_206C_206E_202B_200D_202D_206D_200B_206F_206A_206A_202A_206F_206B_206B_202A_206D_206C_202D_206C_202B_206F_200F_206D_202D_200E_206E_202D_200F_202B_206F_200E_202B_202C_202E(builder, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(466953188));
|
||||
_202E_206A_200B_200C_206E_200D_206F_206C_206E_202B_200D_202D_206D_200B_206F_206A_206A_202A_206F_206B_206B_202A_206D_206C_202D_206C_202B_206F_200F_206D_202D_200E_206E_202D_200F_202B_206F_200E_202B_202C_202E(builder, ItemId.ToString());
|
||||
_202E_206A_200B_200C_206E_200D_206F_206C_206E_202B_200D_202D_206D_200B_206F_206A_206A_202A_206F_206B_206B_202A_206D_206C_202D_206C_202B_206F_200F_206D_202D_200E_206E_202D_200F_202B_206F_200E_202B_202C_202E(builder, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(-1004296737));
|
||||
_202E_206A_200B_200C_206E_200D_206F_206C_206E_202B_200D_202D_206D_200B_206F_206A_206A_202A_206F_206B_206B_202A_206D_206C_202D_206C_202B_206F_200F_206D_202D_200E_206E_202D_200F_202B_206F_200E_202B_202C_202E(builder, ConditionPercent.ToString());
|
||||
return true;
|
||||
}
|
||||
|
||||
[CompilerGenerated]
|
||||
public bool Equals(SlotCondition other)
|
||||
{
|
||||
int num = ((!EqualityComparer<int>.Default.Equals(SlotIndex, other.SlotIndex)) ? (-1584065341) : (-1584065343));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1584065344;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
num = -1584065343;
|
||||
break;
|
||||
case 1:
|
||||
num = ((!EqualityComparer<uint>.Default.Equals(ItemId, other.ItemId)) ? (-1584065341) : (-1584065342));
|
||||
break;
|
||||
case 2:
|
||||
return EqualityComparer<int>.Default.Equals(ConditionPercent, other.ConditionPercent);
|
||||
case 3:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool IEquatable<SlotCondition>.Equals(SlotCondition other)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in Equals
|
||||
return this.Equals(other);
|
||||
}
|
||||
|
||||
static StringBuilder _200E_202C_206F_200F_200F_200E_202B_202C_206F_206B_200D_206B_206C_202B_200D_200F_206D_200E_200C_200E_206A_206D_206D_202E_206A_202D_206B_206C_206D_200D_200F_202B_206D_202D_202B_200B_202C_200C_206B_206C_202E()
|
||||
{
|
||||
return new StringBuilder();
|
||||
}
|
||||
|
||||
static StringBuilder _202E_206A_200B_200C_206E_200D_206F_206C_206E_202B_200D_202D_206D_200B_206F_206A_206A_202A_206F_206B_206B_202A_206D_206C_202D_206C_202B_206F_200F_206D_202D_200E_206E_202D_200F_202B_206F_200E_202B_202C_202E(StringBuilder P_0, string P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static StringBuilder _200D_202E_200E_202A_200E_206F_206E_202B_206D_202D_206E_200C_200D_200B_200E_206A_200F_206D_206F_202B_202D_200D_202C_206C_200F_206A_202E_206E_202A_202B_200C_202C_206C_200B_202B_200C_206A_200E_206A_206F_202E(StringBuilder P_0, char P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static string _206D_206E_206B_206B_202B_206F_202D_200E_200C_206D_200D_200F_200D_202D_202E_206A_200E_206D_200E_206C_200E_206F_206F_202E_200F_202E_202D_206B_200D_206D_200D_202C_206D_200D_200C_206E_202A_202B_202D_202E_202E(object P_0)
|
||||
{
|
||||
return P_0.ToString();
|
||||
}
|
||||
}
|
||||
public readonly record struct SlotCondition(int SlotIndex, uint ItemId, int ConditionPercent);
|
||||
|
|
|
|||
|
|
@ -1,109 +1,3 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
|
||||
namespace LLib.Gear;
|
||||
|
||||
public readonly record struct SlotSpiritbond(int SlotIndex, uint ItemId, int SpiritbondPercent, bool IsReady)
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder stringBuilder = _202D_206C_206D_200D_206C_206F_200B_202A_200D_200D_202B_202D_206E_202C_202D_200B_206A_206C_200E_200F_206A_202B_202A_200F_202E_202E_206B_202A_206C_202C_206C_206C_200E_202D_206B_206A_206E_202C_200F_202B_202E();
|
||||
_202D_202D_206E_202B_202C_200F_202E_206F_202A_206F_206E_200E_206A_202C_206D_202E_200F_206A_200C_202E_200F_206F_202B_202A_206B_202C_200E_200C_200D_200C_200B_200E_200F_202D_206A_202B_200D_206C_202D_202C_202E(stringBuilder, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(2109045036));
|
||||
_202D_202D_206E_202B_202C_200F_202E_206F_202A_206F_206E_200E_206A_202C_206D_202E_200F_206A_200C_202E_200F_206F_202B_202A_206B_202C_200E_200C_200D_200C_200B_200E_200F_202D_206A_202B_200D_206C_202D_202C_202E(stringBuilder, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(579144622));
|
||||
int num = ((!PrintMembers(stringBuilder)) ? (-2119618883) : (-2119618882));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -2119618881;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
num = -2119618882;
|
||||
break;
|
||||
case 1:
|
||||
_202E_200F_206D_202D_206A_206B_206E_202E_200D_200F_200C_206D_206E_200C_200C_206A_200D_200B_202B_206E_200C_200C_202A_202A_200F_206C_200C_206D_206C_202C_200B_200C_200C_200C_202C_200D_206F_200B_206A_206C_202E(stringBuilder, ' ');
|
||||
num = -2119618883;
|
||||
break;
|
||||
case 2:
|
||||
_202E_200F_206D_202D_206A_206B_206E_202E_200D_200F_200C_206D_206E_200C_200C_206A_200D_200B_202B_206E_200C_200C_202A_202A_200F_206C_200C_206D_206C_202C_200B_200C_200C_200C_202C_200D_206F_200B_206A_206C_202E(stringBuilder, '}');
|
||||
return _202E_206B_202D_206B_200C_200E_202E_206B_202B_202C_202E_206A_206F_206F_206F_202E_206F_200D_206D_200B_200E_202A_206B_206C_200D_206B_202B_206B_206D_202C_200C_202D_200D_202B_202C_200E_200E_206E_200F_206A_202E((object)stringBuilder);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
private bool PrintMembers(StringBuilder builder)
|
||||
{
|
||||
_202D_202D_206E_202B_202C_200F_202E_206F_202A_206F_206E_200E_206A_202C_206D_202E_200F_206A_200C_202E_200F_206F_202B_202A_206B_202C_200E_200C_200D_200C_200B_200E_200F_202D_206A_202B_200D_206C_202D_202C_202E(builder, global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-78434179));
|
||||
_202D_202D_206E_202B_202C_200F_202E_206F_202A_206F_206E_200E_206A_202C_206D_202E_200F_206A_200C_202E_200F_206F_202B_202A_206B_202C_200E_200C_200D_200C_200B_200E_200F_202D_206A_202B_200D_206C_202D_202C_202E(builder, SlotIndex.ToString());
|
||||
_202D_202D_206E_202B_202C_200F_202E_206F_202A_206F_206E_200E_206A_202C_206D_202E_200F_206A_200C_202E_200F_206F_202B_202A_206B_202C_200E_200C_200D_200C_200B_200E_200F_202D_206A_202B_200D_206C_202D_202C_202E(builder, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(-1773173997));
|
||||
_202D_202D_206E_202B_202C_200F_202E_206F_202A_206F_206E_200E_206A_202C_206D_202E_200F_206A_200C_202E_200F_206F_202B_202A_206B_202C_200E_200C_200D_200C_200B_200E_200F_202D_206A_202B_200D_206C_202D_202C_202E(builder, ItemId.ToString());
|
||||
_202D_202D_206E_202B_202C_200F_202E_206F_202A_206F_206E_200E_206A_202C_206D_202E_200F_206A_200C_202E_200F_206F_202B_202A_206B_202C_200E_200C_200D_200C_200B_200E_200F_202D_206A_202B_200D_206C_202D_202C_202E(builder, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(1225522819));
|
||||
_202D_202D_206E_202B_202C_200F_202E_206F_202A_206F_206E_200E_206A_202C_206D_202E_200F_206A_200C_202E_200F_206F_202B_202A_206B_202C_200E_200C_200D_200C_200B_200E_200F_202D_206A_202B_200D_206C_202D_202C_202E(builder, SpiritbondPercent.ToString());
|
||||
_202D_202D_206E_202B_202C_200F_202E_206F_202A_206F_206E_200E_206A_202C_206D_202E_200F_206A_200C_202E_200F_206F_202B_202A_206B_202C_200E_200C_200D_200C_200B_200E_200F_202D_206A_202B_200D_206C_202D_202C_202E(builder, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(1842281916));
|
||||
_202D_202D_206E_202B_202C_200F_202E_206F_202A_206F_206E_200E_206A_202C_206D_202E_200F_206A_200C_202E_200F_206F_202B_202A_206B_202C_200E_200C_200D_200C_200B_200E_200F_202D_206A_202B_200D_206C_202D_202C_202E(builder, IsReady.ToString());
|
||||
return true;
|
||||
}
|
||||
|
||||
[CompilerGenerated]
|
||||
public bool Equals(SlotSpiritbond other)
|
||||
{
|
||||
int num = ((!EqualityComparer<int>.Default.Equals(SlotIndex, other.SlotIndex)) ? (-364855096) : (-364855094));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -364855096;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 1:
|
||||
num = ((!EqualityComparer<int>.Default.Equals(SpiritbondPercent, other.SpiritbondPercent)) ? (-364855096) : (-364855093));
|
||||
break;
|
||||
case 2:
|
||||
num = ((!EqualityComparer<uint>.Default.Equals(ItemId, other.ItemId)) ? (-364855096) : (-364855095));
|
||||
break;
|
||||
case 4:
|
||||
num = -364855094;
|
||||
break;
|
||||
case 0:
|
||||
return false;
|
||||
case 3:
|
||||
return EqualityComparer<bool>.Default.Equals(IsReady, other.IsReady);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool IEquatable<SlotSpiritbond>.Equals(SlotSpiritbond other)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in Equals
|
||||
return this.Equals(other);
|
||||
}
|
||||
|
||||
static StringBuilder _202D_206C_206D_200D_206C_206F_200B_202A_200D_200D_202B_202D_206E_202C_202D_200B_206A_206C_200E_200F_206A_202B_202A_200F_202E_202E_206B_202A_206C_202C_206C_206C_200E_202D_206B_206A_206E_202C_200F_202B_202E()
|
||||
{
|
||||
return new StringBuilder();
|
||||
}
|
||||
|
||||
static StringBuilder _202D_202D_206E_202B_202C_200F_202E_206F_202A_206F_206E_200E_206A_202C_206D_202E_200F_206A_200C_202E_200F_206F_202B_202A_206B_202C_200E_200C_200D_200C_200B_200E_200F_202D_206A_202B_200D_206C_202D_202C_202E(StringBuilder P_0, string P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static StringBuilder _202E_200F_206D_202D_206A_206B_206E_202E_200D_200F_200C_206D_206E_200C_200C_206A_200D_200B_202B_206E_200C_200C_202A_202A_200F_206C_200C_206D_206C_202C_200B_200C_200C_200C_202C_200D_206F_200B_206A_206C_202E(StringBuilder P_0, char P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static string _202E_206B_202D_206B_200C_200E_202E_206B_202B_202C_202E_206A_206F_206F_206F_202E_206F_200D_206D_200B_200E_202A_206B_206C_200D_206B_202B_206B_206D_202C_200C_202D_200D_202B_202C_200E_200E_206E_200F_206A_202E(object P_0)
|
||||
{
|
||||
return P_0.ToString();
|
||||
}
|
||||
}
|
||||
public readonly record struct SlotSpiritbond(int SlotIndex, uint ItemId, int SpiritbondPercent, bool IsReady);
|
||||
|
|
|
|||
|
|
@ -1,147 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
|
||||
namespace LLib.Gear;
|
||||
|
||||
public sealed record StatInfo(short EquipmentValue, short MateriaValue, bool Overcapped)
|
||||
{
|
||||
[CompilerGenerated]
|
||||
private Type EqualityContract
|
||||
{
|
||||
[CompilerGenerated]
|
||||
get
|
||||
{
|
||||
return _202C_200D_206E_200F_202B_200B_200B_206C_206A_202A_202A_206B_200D_202B_206E_206C_202B_200D_206B_206E_206F_200B_206B_206A_200D_202A_206C_202C_206F_206E_200F_202B_200D_202E_206E_206A_206C_200F_202B_202D_202E(typeof(StatInfo).TypeHandle);
|
||||
}
|
||||
}
|
||||
|
||||
public short TotalValue => (short)(EquipmentValue + MateriaValue);
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder stringBuilder = _202B_202A_202C_200D_202C_200C_200F_200F_206A_206A_200E_202A_200D_202D_206B_206E_200E_202B_202A_200C_202B_206A_206C_202C_206D_202B_206E_202D_200D_206A_202A_206A_200C_200E_206A_206E_206E_202E_200F_202D_202E();
|
||||
_200C_202A_206E_202A_206A_202E_202D_200E_202A_202A_200F_200F_206F_202D_200C_202C_200E_206F_202A_202D_200D_200B_202E_206E_206A_206E_206B_200B_200E_200C_202D_202D_202C_206C_200F_206A_200B_200B_202C_206F_202E(stringBuilder, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(-1952140969));
|
||||
_200C_202A_206E_202A_206A_202E_202D_200E_202A_202A_200F_200F_206F_202D_200C_202C_200E_206F_202A_202D_200D_200B_202E_206E_206A_206E_206B_200B_200E_200C_202D_202D_202C_206C_200F_206A_200B_200B_202C_206F_202E(stringBuilder, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(579144622));
|
||||
int num = ((!PrintMembers(stringBuilder)) ? 1013311267 : 1013311264);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1013311266;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
num = 1013311264;
|
||||
break;
|
||||
case 2:
|
||||
_200C_206C_202D_200D_200C_202E_200F_202C_206A_206A_206A_200C_206C_206C_206F_202E_202B_200D_200B_202C_202D_206F_200F_202E_206B_202E_200D_200D_206E_202D_202E_206D_206C_200C_200E_200F_206D_206F_200E_200D_202E(stringBuilder, ' ');
|
||||
num = 1013311267;
|
||||
break;
|
||||
case 1:
|
||||
_200C_206C_202D_200D_200C_202E_200F_202C_206A_206A_206A_200C_206C_206C_206F_202E_202B_200D_200B_202C_202D_206F_200F_202E_206B_202E_200D_200D_206E_202D_202E_206D_206C_200C_200E_200F_206D_206F_200E_200D_202E(stringBuilder, '}');
|
||||
return _202A_200B_206C_200E_206C_202B_202D_206F_206B_202A_200D_200F_202D_200D_202B_202A_200F_200D_200E_202B_202C_202B_202A_200F_206E_206C_206F_202E_206D_202D_202B_200C_202D_200B_202B_202A_200B_206F_200F_206E_202E((object)stringBuilder);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
private bool PrintMembers(StringBuilder builder)
|
||||
{
|
||||
_206D_206C_202B_206D_206F_206C_206D_202C_202D_206E_200D_200B_200E_206E_200B_200B_200E_206D_206D_200E_202E_202C_206F_202D_206C_206E_206F_206C_206A_206A_200E_206F_206E_206F_206A_200C_206A_206F_206D_200F_202E();
|
||||
_200C_202A_206E_202A_206A_202E_202D_200E_202A_202A_200F_200F_206F_202D_200C_202C_200E_206F_202A_202D_200D_200B_202E_206E_206A_206E_206B_200B_200E_200C_202D_202D_202C_206C_200F_206A_200B_200B_202C_206F_202E(builder, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(771577716));
|
||||
_200C_202A_206E_202A_206A_202E_202D_200E_202A_202A_200F_200F_206F_202D_200C_202C_200E_206F_202A_202D_200D_200B_202E_206E_206A_206E_206B_200B_200E_200C_202D_202D_202C_206C_200F_206A_200B_200B_202C_206F_202E(builder, EquipmentValue.ToString());
|
||||
_200C_202A_206E_202A_206A_202E_202D_200E_202A_202A_200F_200F_206F_202D_200C_202C_200E_206F_202A_202D_200D_200B_202E_206E_206A_206E_206B_200B_200E_200C_202D_202D_202C_206C_200F_206A_200B_200B_202C_206F_202E(builder, global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(1148322998));
|
||||
_200C_202A_206E_202A_206A_202E_202D_200E_202A_202A_200F_200F_206F_202D_200C_202C_200E_206F_202A_202D_200D_200B_202E_206E_206A_206E_206B_200B_200E_200C_202D_202D_202C_206C_200F_206A_200B_200B_202C_206F_202E(builder, MateriaValue.ToString());
|
||||
_200C_202A_206E_202A_206A_202E_202D_200E_202A_202A_200F_200F_206F_202D_200C_202C_200E_206F_202A_202D_200D_200B_202E_206E_206A_206E_206B_200B_200E_200C_202D_202D_202C_206C_200F_206A_200B_200B_202C_206F_202E(builder, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(2107946747));
|
||||
_200C_202A_206E_202A_206A_202E_202D_200E_202A_202A_200F_200F_206F_202D_200C_202C_200E_206F_202A_202D_200D_200B_202E_206E_206A_206E_206B_200B_200E_200C_202D_202D_202C_206C_200F_206A_200B_200B_202C_206F_202E(builder, Overcapped.ToString());
|
||||
_200C_202A_206E_202A_206A_202E_202D_200E_202A_202A_200F_200F_206F_202D_200C_202C_200E_206F_202A_202D_200D_200B_202E_206E_206A_206E_206B_200B_200E_200C_202D_202D_202C_206C_200F_206A_200B_200B_202C_206F_202E(builder, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(-2076013549));
|
||||
_200C_202A_206E_202A_206A_202E_202D_200E_202A_202A_200F_200F_206F_202D_200C_202C_200E_206F_202A_202D_200D_200B_202E_206E_206A_206E_206B_200B_200E_200C_202D_202D_202C_206C_200F_206A_200B_200B_202C_206F_202E(builder, TotalValue.ToString());
|
||||
return true;
|
||||
}
|
||||
|
||||
[CompilerGenerated]
|
||||
public bool Equals(StatInfo? other)
|
||||
{
|
||||
int num = (((object)this == other) ? 1623034008 : 1623034013);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1623034015;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 7:
|
||||
return true;
|
||||
case 2:
|
||||
num = (((object)other == null) ? 1623034011 : 1623034010);
|
||||
break;
|
||||
case 4:
|
||||
return false;
|
||||
case 0:
|
||||
num = 1623034013;
|
||||
break;
|
||||
case 6:
|
||||
return EqualityComparer<bool>.Default.Equals(Overcapped, other.Overcapped);
|
||||
case 1:
|
||||
num = ((!EqualityComparer<short>.Default.Equals(EquipmentValue, other.EquipmentValue)) ? 1623034011 : 1623034012);
|
||||
break;
|
||||
case 3:
|
||||
num = ((!EqualityComparer<short>.Default.Equals(MateriaValue, other.MateriaValue)) ? 1623034011 : 1623034009);
|
||||
break;
|
||||
case 5:
|
||||
num = ((!_202A_202C_206E_202E_206B_202B_202E_200B_200D_200E_200C_206D_206A_200D_206D_202B_206C_202E_206B_202D_206E_206F_206C_206A_202C_202B_206D_200B_200C_200C_200C_202D_206D_200C_206F_206D_206E_206B_200F_202E(EqualityContract, other.EqualityContract)) ? 1623034011 : 1623034014);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool IEquatable<StatInfo>.Equals(StatInfo? other)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in Equals
|
||||
return this.Equals(other);
|
||||
}
|
||||
|
||||
static Type _202C_200D_206E_200F_202B_200B_200B_206C_206A_202A_202A_206B_200D_202B_206E_206C_202B_200D_206B_206E_206F_200B_206B_206A_200D_202A_206C_202C_206F_206E_200F_202B_200D_202E_206E_206A_206C_200F_202B_202D_202E(RuntimeTypeHandle P_0)
|
||||
{
|
||||
return Type.GetTypeFromHandle(P_0);
|
||||
}
|
||||
|
||||
static StringBuilder _202B_202A_202C_200D_202C_200C_200F_200F_206A_206A_200E_202A_200D_202D_206B_206E_200E_202B_202A_200C_202B_206A_206C_202C_206D_202B_206E_202D_200D_206A_202A_206A_200C_200E_206A_206E_206E_202E_200F_202D_202E()
|
||||
{
|
||||
return new StringBuilder();
|
||||
}
|
||||
|
||||
static StringBuilder _200C_202A_206E_202A_206A_202E_202D_200E_202A_202A_200F_200F_206F_202D_200C_202C_200E_206F_202A_202D_200D_200B_202E_206E_206A_206E_206B_200B_200E_200C_202D_202D_202C_206C_200F_206A_200B_200B_202C_206F_202E(StringBuilder P_0, string P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static StringBuilder _200C_206C_202D_200D_200C_202E_200F_202C_206A_206A_206A_200C_206C_206C_206F_202E_202B_200D_200B_202C_202D_206F_200F_202E_206B_202E_200D_200D_206E_202D_202E_206D_206C_200C_200E_200F_206D_206F_200E_200D_202E(StringBuilder P_0, char P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static string _202A_200B_206C_200E_206C_202B_202D_206F_206B_202A_200D_200F_202D_200D_202B_202A_200F_200D_200E_202B_202C_202B_202A_200F_206E_206C_206F_202E_206D_202D_202B_200C_202D_200B_202B_202A_200B_206F_200F_206E_202E(object P_0)
|
||||
{
|
||||
return P_0.ToString();
|
||||
}
|
||||
|
||||
static void _206D_206C_202B_206D_206F_206C_206D_202C_202D_206E_200D_200B_200E_206E_200B_200B_200E_206D_206D_200E_202E_202C_206F_202D_206C_206E_206F_206C_206A_206A_200E_206F_206E_206F_206A_200C_206A_206F_206D_200F_202E()
|
||||
{
|
||||
RuntimeHelpers.EnsureSufficientExecutionStack();
|
||||
}
|
||||
|
||||
static bool _202A_202C_206E_202E_206B_202B_202E_200B_200D_200E_200C_206D_206A_200D_206D_202B_206C_202E_206B_202D_206E_206F_206C_206A_202C_202B_206D_200B_200C_200C_200C_202D_206D_200C_206F_206D_206E_206B_200F_202E(Type P_0, Type P_1)
|
||||
{
|
||||
return P_0 == P_1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using LLib.GameData;
|
||||
|
||||
namespace LLib.Gear;
|
||||
|
|
@ -20,69 +18,14 @@ public sealed class StatPriority
|
|||
public float Score(EquipmentStats stats)
|
||||
{
|
||||
float num = 0f;
|
||||
IEnumerator<KeyValuePair<EBaseParam, float>> enumerator = _weights.GetEnumerator();
|
||||
try
|
||||
foreach (var (param, num3) in _weights)
|
||||
{
|
||||
int num2 = -280188401;
|
||||
EBaseParam param = default(EBaseParam);
|
||||
float num6 = default(float);
|
||||
while (true)
|
||||
if (num3 != 0f)
|
||||
{
|
||||
int num3 = num2;
|
||||
int num4 = -280188405;
|
||||
int num5 = num3;
|
||||
switch ((num5 | num4) - (num5 & num4))
|
||||
{
|
||||
case 0:
|
||||
num2 = -280188401;
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
enumerator.Current.Deconstruct(out var key, out var value);
|
||||
param = key;
|
||||
num6 = value;
|
||||
num2 = ((num6 == 0f) ? (-280188401) : (-280188406));
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
num += (float)stats.Get(param) * num6;
|
||||
num2 = -280188401;
|
||||
break;
|
||||
case 4:
|
||||
num2 = (_202C_206A_206A_200E_202C_206E_206B_200B_206A_202B_202C_206A_206B_200F_206A_206D_200C_206D_202E_200F_206B_206C_206E_202A_200B_206D_202B_202A_202C_202A_206B_206C_202D_206D_202E_206F_200C_202D_200D_206F_202E((IEnumerator)enumerator) ? (-280188407) : (-280188408));
|
||||
break;
|
||||
case 3:
|
||||
return num;
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
int num2 = ((enumerator == null) ? (-1972077866) : (-1972077865));
|
||||
while (true)
|
||||
{
|
||||
int num7 = num2;
|
||||
int num4 = -1972077866;
|
||||
int num5 = num7;
|
||||
int num8 = num5 + num4;
|
||||
int num9 = num5 & num4;
|
||||
switch (num8 - (num9 + num9))
|
||||
{
|
||||
case 2:
|
||||
num2 = -1972077865;
|
||||
break;
|
||||
case 0:
|
||||
goto end_IL_00f9;
|
||||
case 1:
|
||||
_206B_200F_206A_200C_200F_202A_200C_206A_206F_200D_206A_206C_206A_206C_202C_202C_202A_206E_206B_202D_202E_200F_202D_206D_206E_206D_206B_200F_200D_206B_200D_202B_202A_206F_202D_206D_206C_200B_200F_206C_202E((IDisposable)enumerator);
|
||||
num2 = -1972077866;
|
||||
break;
|
||||
}
|
||||
continue;
|
||||
end_IL_00f9:
|
||||
break;
|
||||
num += (float)stats.Get(param) * num3;
|
||||
}
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
public static StatPriority ForJob(EClassJob job)
|
||||
|
|
@ -90,155 +33,96 @@ public sealed class StatPriority
|
|||
EBaseParam[] relevantParams = GetRelevantParams(job);
|
||||
Dictionary<EBaseParam, float> dictionary = new Dictionary<EBaseParam, float>(relevantParams.Length);
|
||||
EBaseParam[] array = relevantParams;
|
||||
int num = 0;
|
||||
int num2 = 1591763655;
|
||||
while (true)
|
||||
foreach (EBaseParam key in array)
|
||||
{
|
||||
int num3 = num2;
|
||||
int num4 = 1591763652;
|
||||
int num5 = num3;
|
||||
int num6 = num5 + num4;
|
||||
int num7 = num5 & num4;
|
||||
switch (num6 - (num7 + num7))
|
||||
{
|
||||
case 0:
|
||||
num2 = 1591763655;
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
EBaseParam key = array[num];
|
||||
dictionary[key] = 1f;
|
||||
int num8 = num;
|
||||
num4 = 1;
|
||||
num5 = num8;
|
||||
num = (num5 | num4) + (num5 & num4);
|
||||
num2 = 1591763655;
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
return new StatPriority(dictionary);
|
||||
case 3:
|
||||
num2 = ((num < array.Length) ? 1591763654 : 1591763653);
|
||||
break;
|
||||
}
|
||||
dictionary[key] = 1f;
|
||||
}
|
||||
return new StatPriority(dictionary);
|
||||
}
|
||||
|
||||
private static EBaseParam[] GetRelevantParams(EClassJob job)
|
||||
{
|
||||
int num = ((!job.IsCrafter()) ? 1757392226 : 1757392244);
|
||||
bool flag = default(bool);
|
||||
bool flag2 = default(bool);
|
||||
while (true)
|
||||
if (job.IsCrafter())
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1757392228;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
return new EBaseParam[3]
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
EBaseParam[] array4 = new EBaseParam[5];
|
||||
_206A_202D_202E_200E_206C_206D_202E_206E_200B_202A_206C_206E_206E_200F_202C_202B_206C_200F_202C_202C_206E_200B_202A_202C_202C_206C_206F_202E_206B_206D_202D_206D_202D_200E_206C_200C_200E_206C_206B_206A_202E((Array)array4, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
|
||||
return array4;
|
||||
}
|
||||
case 16:
|
||||
{
|
||||
EBaseParam[] array = new EBaseParam[3];
|
||||
_206A_202D_202E_200E_206C_206D_202E_206E_200B_202A_206C_206E_206E_200F_202C_202B_206C_200F_202C_202C_206E_200B_202A_202C_202C_206C_206F_202E_206B_206D_202D_206D_202D_200E_206C_200C_200E_206C_206B_206A_202E((Array)array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
|
||||
return array;
|
||||
}
|
||||
case 14:
|
||||
{
|
||||
EBaseParam[] array6 = new EBaseParam[5];
|
||||
_206A_202D_202E_200E_206C_206D_202E_206E_200B_202A_206C_206E_206E_200F_202C_202B_206C_200F_202C_202C_206E_200B_202A_202C_202C_206C_206F_202E_206B_206D_202D_206D_202D_200E_206C_200C_200E_206C_206B_206A_202E((Array)array6, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
|
||||
return array6;
|
||||
}
|
||||
case 2:
|
||||
num = ((job - 29 <= EClassJob.Gladiator) ? 1757392232 : 1757392225);
|
||||
break;
|
||||
case 9:
|
||||
{
|
||||
EBaseParam[] array7 = new EBaseParam[5];
|
||||
_206A_202D_202E_200E_206C_206D_202E_206E_200B_202A_206C_206E_206E_200F_202C_202B_206C_200F_202C_202C_206E_200B_202A_202C_202C_206C_206F_202E_206B_206D_202D_206D_202D_200E_206C_200C_200E_206C_206B_206A_202E((Array)array7, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
|
||||
return array7;
|
||||
}
|
||||
case 13:
|
||||
num = ((!job.IsTank()) ? 1757392239 : 1757392227);
|
||||
break;
|
||||
case 19:
|
||||
{
|
||||
EBaseParam[] array3 = new EBaseParam[5];
|
||||
_206A_202D_202E_200E_206C_206D_202E_206E_200B_202A_206C_206E_206E_200F_202C_202B_206C_200F_202C_202C_206E_200B_202A_202C_202C_206C_206F_202E_206B_206D_202D_206D_202D_200E_206C_200C_200E_206C_206B_206A_202E((Array)array3, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
|
||||
return array3;
|
||||
}
|
||||
case 8:
|
||||
flag = flag2;
|
||||
num = 1757392229;
|
||||
break;
|
||||
case 4:
|
||||
{
|
||||
EBaseParam[] array2 = new EBaseParam[3];
|
||||
_206A_202D_202E_200E_206C_206D_202E_206E_200B_202A_206C_206E_206E_200F_202C_202B_206C_200F_202C_202C_206E_200B_202A_202C_202C_206C_206F_202E_206B_206D_202D_206D_202D_200E_206C_200C_200E_206C_206B_206A_202E((Array)array2, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
|
||||
return array2;
|
||||
}
|
||||
case 3:
|
||||
flag2 = false;
|
||||
num = 1757392236;
|
||||
break;
|
||||
case 18:
|
||||
num = 1757392244;
|
||||
break;
|
||||
case 5:
|
||||
num = ((job != EClassJob.Viper) ? 1757392231 : 1757392232);
|
||||
break;
|
||||
case 17:
|
||||
num = ((!job.IsCaster()) ? 1757392235 : 1757392228);
|
||||
break;
|
||||
case 15:
|
||||
return Array.Empty<EBaseParam>();
|
||||
case 7:
|
||||
{
|
||||
EBaseParam[] array5 = new EBaseParam[7];
|
||||
_206A_202D_202E_200E_206C_206D_202E_206E_200B_202A_206C_206E_206E_200F_202C_202B_206C_200F_202C_202C_206E_200B_202A_202C_202C_206C_206F_202E_206B_206D_202D_206D_202D_200E_206C_200C_200E_206C_206B_206A_202E((Array)array5, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
|
||||
return array5;
|
||||
}
|
||||
case 10:
|
||||
num = ((!job.IsMelee()) ? 1757392245 : 1757392237);
|
||||
break;
|
||||
case 12:
|
||||
flag2 = true;
|
||||
num = 1757392236;
|
||||
break;
|
||||
case 1:
|
||||
num = ((!flag) ? 1757392238 : 1757392247);
|
||||
break;
|
||||
case 11:
|
||||
flag = job.IsPhysicalRanged();
|
||||
num = (flag ? 1757392229 : 1757392230);
|
||||
break;
|
||||
case 6:
|
||||
num = ((!job.IsGatherer()) ? 1757392240 : 1757392224);
|
||||
break;
|
||||
case 20:
|
||||
num = ((!job.IsHealer()) ? 1757392233 : 1757392234);
|
||||
break;
|
||||
}
|
||||
EBaseParam.CP,
|
||||
EBaseParam.Control,
|
||||
EBaseParam.Craftsmanship
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
static bool _202C_206A_206A_200E_202C_206E_206B_200B_206A_202B_202C_206A_206B_200F_206A_206D_200C_206D_202E_200F_206B_206C_206E_202A_200B_206D_202B_202A_202C_202A_206B_206C_202D_206D_202E_206F_200C_202D_200D_206F_202E(IEnumerator P_0)
|
||||
{
|
||||
return P_0.MoveNext();
|
||||
}
|
||||
|
||||
static void _206B_200F_206A_200C_200F_202A_200C_206A_206F_200D_206A_206C_206A_206C_202C_202C_202A_206E_206B_202D_202E_200F_202D_206D_206E_206D_206B_200F_200D_206B_200D_202B_202A_206F_202D_206D_206C_200B_200F_206C_202E(IDisposable P_0)
|
||||
{
|
||||
P_0.Dispose();
|
||||
}
|
||||
|
||||
static void _206A_202D_202E_200E_206C_206D_202E_206E_200B_202A_206C_206E_206E_200F_202C_202B_206C_200F_202C_202C_206E_200B_202A_202C_202C_206C_206F_202E_206B_206D_202D_206D_202D_200E_206C_200C_200E_206C_206B_206A_202E(Array P_0, RuntimeFieldHandle P_1)
|
||||
{
|
||||
RuntimeHelpers.InitializeArray(P_0, P_1);
|
||||
if (job.IsGatherer())
|
||||
{
|
||||
return new EBaseParam[3]
|
||||
{
|
||||
EBaseParam.GP,
|
||||
EBaseParam.Gathering,
|
||||
EBaseParam.Perception
|
||||
};
|
||||
}
|
||||
if (job.IsHealer())
|
||||
{
|
||||
return new EBaseParam[5]
|
||||
{
|
||||
EBaseParam.Mind,
|
||||
EBaseParam.Piety,
|
||||
EBaseParam.SpellSpeed,
|
||||
EBaseParam.Determination,
|
||||
EBaseParam.Crit
|
||||
};
|
||||
}
|
||||
if (job.IsTank())
|
||||
{
|
||||
return new EBaseParam[7]
|
||||
{
|
||||
EBaseParam.Strength,
|
||||
EBaseParam.Vitality,
|
||||
EBaseParam.Determination,
|
||||
EBaseParam.Tenacity,
|
||||
EBaseParam.DirectHit,
|
||||
EBaseParam.Crit,
|
||||
EBaseParam.SkillSpeed
|
||||
};
|
||||
}
|
||||
bool flag = job.IsPhysicalRanged();
|
||||
if (!flag)
|
||||
{
|
||||
bool flag2 = ((job - 29 <= EClassJob.Gladiator || job == EClassJob.Viper) ? true : false);
|
||||
flag = flag2;
|
||||
}
|
||||
if (flag)
|
||||
{
|
||||
return new EBaseParam[5]
|
||||
{
|
||||
EBaseParam.Dexterity,
|
||||
EBaseParam.Determination,
|
||||
EBaseParam.DirectHit,
|
||||
EBaseParam.Crit,
|
||||
EBaseParam.SkillSpeed
|
||||
};
|
||||
}
|
||||
if (job.IsMelee())
|
||||
{
|
||||
return new EBaseParam[5]
|
||||
{
|
||||
EBaseParam.Strength,
|
||||
EBaseParam.Determination,
|
||||
EBaseParam.DirectHit,
|
||||
EBaseParam.Crit,
|
||||
EBaseParam.SkillSpeed
|
||||
};
|
||||
}
|
||||
if (job.IsCaster())
|
||||
{
|
||||
return new EBaseParam[5]
|
||||
{
|
||||
EBaseParam.Intelligence,
|
||||
EBaseParam.Determination,
|
||||
EBaseParam.DirectHit,
|
||||
EBaseParam.Crit,
|
||||
EBaseParam.SpellSpeed
|
||||
};
|
||||
}
|
||||
return Array.Empty<EBaseParam>();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
using System;
|
||||
using System.Reflection;
|
||||
using Dalamud.Bindings.ImGui;
|
||||
using Dalamud.Interface.Windowing;
|
||||
|
||||
namespace LLib.ImGui;
|
||||
|
||||
[Obfuscation(Feature = "-rename", Exclude = false, ApplyToMembers = true)]
|
||||
public abstract class LWindow : Window
|
||||
{
|
||||
private bool _initializedConfig;
|
||||
|
|
@ -18,29 +20,15 @@ public abstract class LWindow : Window
|
|||
{
|
||||
get
|
||||
{
|
||||
int num = ((!_202C_202D_206F_200C_202D_202E_200B_200E_206C_206A_200F_200F_202D_200D_200C_200B_200E_202C_200E_206C_200E_206D_202B_200D_202C_206E_200D_200E_202A_202C_202A_202B_200B_206C_206A_200D_200C_200F_202A_200F_202E()) ? 683185440 : 683185441);
|
||||
while (true)
|
||||
if (base.IsOpen)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 683185440;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 2:
|
||||
goto IL_0046;
|
||||
case 0:
|
||||
return false;
|
||||
case 1:
|
||||
return !_wasCollapsedLastFrame;
|
||||
}
|
||||
continue;
|
||||
IL_0046:
|
||||
num = 683185441;
|
||||
return !_wasCollapsedLastFrame;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
set
|
||||
{
|
||||
_200F_200D_206A_200C_200C_200F_206F_200F_206C_202A_200D_206F_206D_206F_206D_200D_202D_202B_202D_206B_202D_202A_202B_202A_206E_200C_206D_202E_202C_200F_206B_206F_202D_202E_202A_202D_202E_202E_202C_206F_202E(value);
|
||||
base.IsOpen = value;
|
||||
UncollapseNextFrame = value;
|
||||
}
|
||||
}
|
||||
|
|
@ -49,35 +37,17 @@ public abstract class LWindow : Window
|
|||
{
|
||||
get
|
||||
{
|
||||
float? num = _202B_200B_200F_206E_202D_200E_200F_206B_202C_200F_206F_206E_206A_206B_200F_206C_202D_202E_200C_206B_200B_206C_202D_206C_206F_200B_206B_202E_206A_200D_206A_206D_206C_206C_202A_206A_202C_206C_206F_202E();
|
||||
int num2 = ((!num.HasValue) ? (-473648869) : (-473648872));
|
||||
float valueOrDefault = default(float);
|
||||
while (true)
|
||||
float? bgAlpha = base.BgAlpha;
|
||||
if (bgAlpha.HasValue)
|
||||
{
|
||||
int num3 = num2;
|
||||
int num4 = -473648870;
|
||||
int num5 = num3;
|
||||
int num6 = num5 + num4;
|
||||
int num7 = num5 & num4;
|
||||
switch (num6 - (num7 + num7))
|
||||
{
|
||||
case 0:
|
||||
num2 = -473648872;
|
||||
break;
|
||||
case 3:
|
||||
return (int)_202B_202B_200E_200C_200F_200B_200D_200D_200D_206D_200B_206B_202A_202B_200C_206C_206E_206D_206A_202C_206A_202D_206D_206E_206D_200E_202A_206C_200B_200D_206F_206F_200E_200C_206B_200E_200C_206F_206D_200D_202E(100000f * valueOrDefault);
|
||||
case 2:
|
||||
valueOrDefault = num.GetValueOrDefault();
|
||||
num2 = -473648871;
|
||||
break;
|
||||
case 1:
|
||||
return null;
|
||||
}
|
||||
float valueOrDefault = bgAlpha.GetValueOrDefault();
|
||||
return (int)MathF.Round(100000f * valueOrDefault);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
set
|
||||
{
|
||||
_200F_202B_206C_202C_206F_200C_200B_202D_200C_206E_202C_206D_202A_206D_202C_206A_202B_202B_202C_206E_200C_206D_206E_200D_202C_200B_200D_202C_200C_200C_206B_200E_200B_200D_200C_200C_206F_200E_202C_206D_202E((float?)value / 100000f);
|
||||
base.BgAlpha = (float?)value / 100000f;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -88,123 +58,54 @@ public abstract class LWindow : Window
|
|||
|
||||
private void LoadWindowConfig()
|
||||
{
|
||||
IPersistableWindowConfig persistableWindowConfig = this as IPersistableWindowConfig;
|
||||
int num = ((persistableWindowConfig == null) ? (-1866426683) : (-1866426684));
|
||||
WindowConfig windowConfig = default(WindowConfig);
|
||||
while (true)
|
||||
if (!(this is IPersistableWindowConfig persistableWindowConfig))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1866426683;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 5:
|
||||
Alpha = windowConfig.Alpha;
|
||||
num = -1866426685;
|
||||
break;
|
||||
case 4:
|
||||
_202A_202A_206B_206A_202A_200B_200B_206D_206E_206A_200C_202D_206E_202B_202B_206C_202D_206A_202B_200E_202C_202D_206E_202E_200F_202B_206D_206B_206A_202A_206B_200E_206C_200E_200D_206A_206B_200B_202E_206E_202E(windowConfig.IsPinned);
|
||||
num = -1866426686;
|
||||
break;
|
||||
case 8:
|
||||
num = ((!_206F_202C_200E_206A_202C_202E_200D_202E_202E_200F_206C_200C_200C_202C_202B_200F_200E_200C_206E_200E_200D_206F_206C_202A_206C_206B_206E_202E_202B_206B_200F_202A_202E_202B_200D_206A_206E_200C_202C_202C_202E()) ? (-1866426686) : (-1866426687));
|
||||
break;
|
||||
case 6:
|
||||
_initializedConfig = true;
|
||||
num = -1866426683;
|
||||
break;
|
||||
case 0:
|
||||
return;
|
||||
case 7:
|
||||
num = ((!_202A_206A_200E_200F_202C_206F_206E_206A_206E_200C_200E_202E_202C_202B_206D_206A_206F_200B_200D_202B_206A_202C_200E_206C_206F_206D_206D_200B_206F_202D_200F_206E_206E_206D_206A_200E_202C_206C_202B_206A_202E()) ? (-1866426688) : (-1866426682));
|
||||
break;
|
||||
case 3:
|
||||
_200D_200B_202D_200D_200D_206F_200B_202E_200E_202A_206D_202B_206D_202B_206F_200D_200E_206C_200D_206A_206E_200B_206A_200E_200F_200C_202B_206E_206A_200C_202B_206E_206F_206A_200B_202C_202B_202C_206B_206F_202E(windowConfig.IsClickthrough);
|
||||
num = -1866426688;
|
||||
break;
|
||||
case 1:
|
||||
windowConfig = persistableWindowConfig.WindowConfig;
|
||||
num = ((windowConfig == null) ? (-1866426685) : (-1866426675));
|
||||
break;
|
||||
case 2:
|
||||
num = -1866426684;
|
||||
break;
|
||||
}
|
||||
return;
|
||||
}
|
||||
WindowConfig windowConfig = persistableWindowConfig.WindowConfig;
|
||||
if (windowConfig != null)
|
||||
{
|
||||
if (base.AllowPinning)
|
||||
{
|
||||
base.IsPinned = windowConfig.IsPinned;
|
||||
}
|
||||
if (base.AllowClickthrough)
|
||||
{
|
||||
base.IsClickthrough = windowConfig.IsClickthrough;
|
||||
}
|
||||
Alpha = windowConfig.Alpha;
|
||||
}
|
||||
_initializedConfig = true;
|
||||
}
|
||||
|
||||
private void UpdateWindowConfig()
|
||||
{
|
||||
IPersistableWindowConfig persistableWindowConfig = this as IPersistableWindowConfig;
|
||||
int num = ((persistableWindowConfig == null) ? (-692903602) : (-692903601));
|
||||
WindowConfig windowConfig = default(WindowConfig);
|
||||
bool flag = default(bool);
|
||||
while (true)
|
||||
if (!(this is IPersistableWindowConfig persistableWindowConfig) || Dalamud.Bindings.ImGui.ImGui.IsAnyMouseDown())
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -692903608;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
return;
|
||||
}
|
||||
WindowConfig windowConfig = persistableWindowConfig.WindowConfig;
|
||||
if (windowConfig != null)
|
||||
{
|
||||
bool flag = false;
|
||||
if (base.AllowPinning && windowConfig.IsPinned != base.IsPinned)
|
||||
{
|
||||
case 0:
|
||||
num = -692903601;
|
||||
break;
|
||||
case 6:
|
||||
return;
|
||||
case 1:
|
||||
windowConfig.IsPinned = _200C_202C_202B_206A_206E_202C_200C_202A_206A_206B_202D_202C_200F_200F_206C_206C_206D_206E_202D_206A_206B_200D_202C_206C_200E_206E_200F_200F_202E_206B_206C_200E_206B_202E_202A_200C_202A_206B_206F_206B_202E();
|
||||
windowConfig.IsPinned = base.IsPinned;
|
||||
flag = true;
|
||||
num = -692903603;
|
||||
break;
|
||||
case 3:
|
||||
num = ((windowConfig.IsClickthrough == _200C_206A_200D_200B_202B_202B_206A_202B_206A_206A_202D_202B_202E_206E_202E_200B_206B_202E_200F_202D_202C_200F_202D_200F_202C_200F_202C_206A_206E_202C_202D_200C_202C_200C_206D_206E_206B_200F_200C_206B_202E()) ? (-692903606) : (-692903604));
|
||||
break;
|
||||
case 4:
|
||||
windowConfig.IsClickthrough = _200C_206A_200D_200B_202B_202B_206A_202B_206A_206A_202D_202B_202E_206E_202E_200B_206B_202E_200F_202D_202C_200F_202D_200F_202C_200F_202C_206A_206E_202C_202D_200C_202C_200C_206D_206E_206B_200F_200C_206B_202E();
|
||||
}
|
||||
if (base.AllowClickthrough && windowConfig.IsClickthrough != base.IsClickthrough)
|
||||
{
|
||||
windowConfig.IsClickthrough = base.IsClickthrough;
|
||||
flag = true;
|
||||
num = -692903606;
|
||||
break;
|
||||
case 12:
|
||||
flag = false;
|
||||
num = ((!_206F_202C_200E_206A_202C_202E_200D_202E_202E_200F_206C_200C_200C_202C_202B_200F_200E_200C_206E_200E_200D_206F_206C_202A_206C_206B_206E_202E_202B_206B_200F_202A_202E_202B_200D_206A_206E_200C_202C_202C_202E()) ? (-692903603) : (-692903615));
|
||||
break;
|
||||
case 13:
|
||||
}
|
||||
if (windowConfig.Alpha != Alpha)
|
||||
{
|
||||
windowConfig.Alpha = Alpha;
|
||||
flag = true;
|
||||
num = -692903616;
|
||||
break;
|
||||
case 5:
|
||||
num = ((!_202A_206A_200E_200F_202C_206F_206E_206A_206E_200C_200E_202E_202C_202B_206D_206A_206F_200B_200D_202B_206A_202C_200E_206C_206F_206D_206D_200B_206F_202D_200F_206E_206E_206D_206A_200E_202C_206C_202B_206A_202E()) ? (-692903606) : (-692903605));
|
||||
break;
|
||||
case 10:
|
||||
windowConfig = persistableWindowConfig.WindowConfig;
|
||||
num = ((windowConfig == null) ? (-692903602) : (-692903612));
|
||||
break;
|
||||
case 7:
|
||||
num = (_206E_206F_206B_200D_200F_202D_202A_202D_206D_200F_200B_200F_200C_202E_200E_200E_202C_206E_206C_206F_206E_202E_202C_206B_200F_202C_206E_206A_206B_206D_206D_202A_200F_206A_206C_200E_206F_200B_200C_206A_202E() ? (-692903602) : (-692903614));
|
||||
break;
|
||||
case 8:
|
||||
num = ((!flag) ? (-692903602) : (-692903613));
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
int? alpha = windowConfig.Alpha;
|
||||
int? alpha2 = Alpha;
|
||||
bool num7 = alpha.GetValueOrDefault() == alpha2.GetValueOrDefault();
|
||||
num3 = ((alpha.HasValue == alpha2.HasValue) ? 1 : 0);
|
||||
num4 = (num7 ? 1 : 0);
|
||||
num = ((num4 + num3 - (num4 | num3) != 0) ? (-692903616) : (-692903611));
|
||||
break;
|
||||
}
|
||||
case 11:
|
||||
if (flag)
|
||||
{
|
||||
persistableWindowConfig.SaveWindowConfig();
|
||||
num = -692903602;
|
||||
break;
|
||||
case 9:
|
||||
num = ((windowConfig.IsPinned == _200C_202C_202B_206A_206E_202C_200C_202A_206A_206B_202D_202C_200F_200F_206C_206C_206D_206E_202D_206A_206B_200D_202C_206C_200E_206E_200F_200F_202E_206B_206C_200E_206B_202E_202A_200C_202A_206B_206F_206B_202E()) ? (-692903603) : (-692903607));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -223,7 +124,7 @@ public abstract class LWindow : Window
|
|||
{
|
||||
_closeRequested = false;
|
||||
UncollapseNextFrame = true;
|
||||
_202B_206D_200D_206C_206F_202B_202C_200F_206E_206F_206B_200D_200E_202E_202A_200E_202C_202E_206A_202C_206F_206B_206B_206C_206F_202D_200E_200D_206A_202E_200B_200F_206E_202B_202A_202C_206D_206B_200C_206E_202E();
|
||||
base.OnOpen();
|
||||
}
|
||||
|
||||
public override void Update()
|
||||
|
|
@ -233,42 +134,21 @@ public abstract class LWindow : Window
|
|||
|
||||
public override void PreDraw()
|
||||
{
|
||||
int num = ((!_closeRequested) ? (-306664405) : (-306664404));
|
||||
while (true)
|
||||
if (_closeRequested)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -306664406;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 1:
|
||||
num = (_initializedConfig ? (-306664408) : (-306664402));
|
||||
break;
|
||||
case 6:
|
||||
_closeRequested = false;
|
||||
_200F_200D_206A_200C_200C_200F_206F_200F_206C_202A_200D_206F_206D_206F_206D_200D_202D_202B_202D_206B_202D_202A_202B_202A_206E_200C_206D_202E_202C_200F_206B_206F_202D_202E_202A_202D_202E_202E_202C_206F_202E(false);
|
||||
num = -306664405;
|
||||
break;
|
||||
case 4:
|
||||
LoadWindowConfig();
|
||||
num = -306664408;
|
||||
break;
|
||||
case 0:
|
||||
_202E_206B_206E_206C_202C_202A_200D_202C_206E_200E_206C_206F_202B_202D_206A_206B_200F_206C_200D_206E_206A_206C_200C_200B_200B_202A_200D_200C_202A_206A_206D_206C_202A_202C_200B_200D_202E_200D_200E_202B_202E(false);
|
||||
UncollapseNextFrame = false;
|
||||
num = -306664407;
|
||||
break;
|
||||
case 5:
|
||||
num = -306664404;
|
||||
break;
|
||||
case 3:
|
||||
_200E_200F_200F_202A_206E_202D_200D_206C_206A_200D_202E_200C_200F_202D_200B_202E_200E_200D_202A_206C_206F_202E_202E_200F_200D_206E_206A_202A_206A_206B_206E_202D_202C_200F_206E_206C_206E_200C_206A_200C_202E();
|
||||
return;
|
||||
case 2:
|
||||
num = ((!UncollapseNextFrame) ? (-306664407) : (-306664406));
|
||||
break;
|
||||
}
|
||||
_closeRequested = false;
|
||||
base.IsOpen = false;
|
||||
}
|
||||
if (!_initializedConfig)
|
||||
{
|
||||
LoadWindowConfig();
|
||||
}
|
||||
if (UncollapseNextFrame)
|
||||
{
|
||||
Dalamud.Bindings.ImGui.ImGui.SetNextWindowCollapsed(collapsed: false);
|
||||
UncollapseNextFrame = false;
|
||||
}
|
||||
base.PreDraw();
|
||||
}
|
||||
|
||||
public sealed override void Draw()
|
||||
|
|
@ -281,105 +161,10 @@ public abstract class LWindow : Window
|
|||
|
||||
public override void PostDraw()
|
||||
{
|
||||
_200B_202E_202E_206B_202B_202A_206B_200B_202D_206E_202D_200F_202B_200C_200C_200B_206A_206E_206C_206B_206E_202D_202D_206E_200C_206B_202B_206F_202E_202B_206A_206B_206D_202E_202B_206E_200B_206A_200E_200C_202E();
|
||||
int num = ((!_initializedConfig) ? (-1105315844) : (-1105315843));
|
||||
while (true)
|
||||
base.PostDraw();
|
||||
if (_initializedConfig)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1105315844;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 2:
|
||||
num = -1105315843;
|
||||
break;
|
||||
case 0:
|
||||
return;
|
||||
case 1:
|
||||
UpdateWindowConfig();
|
||||
num = -1105315844;
|
||||
break;
|
||||
}
|
||||
UpdateWindowConfig();
|
||||
}
|
||||
}
|
||||
|
||||
bool _202C_202D_206F_200C_202D_202E_200B_200E_206C_206A_200F_200F_202D_200D_200C_200B_200E_202C_200E_206C_200E_206D_202B_200D_202C_206E_200D_200E_202A_202C_202A_202B_200B_206C_206A_200D_200C_200F_202A_200F_202E()
|
||||
{
|
||||
return base.IsOpen;
|
||||
}
|
||||
|
||||
void _200F_200D_206A_200C_200C_200F_206F_200F_206C_202A_200D_206F_206D_206F_206D_200D_202D_202B_202D_206B_202D_202A_202B_202A_206E_200C_206D_202E_202C_200F_206B_206F_202D_202E_202A_202D_202E_202E_202C_206F_202E(bool P_0)
|
||||
{
|
||||
base.IsOpen = P_0;
|
||||
}
|
||||
|
||||
float? _202B_200B_200F_206E_202D_200E_200F_206B_202C_200F_206F_206E_206A_206B_200F_206C_202D_202E_200C_206B_200B_206C_202D_206C_206F_200B_206B_202E_206A_200D_206A_206D_206C_206C_202A_206A_202C_206C_206F_202E()
|
||||
{
|
||||
return base.BgAlpha;
|
||||
}
|
||||
|
||||
static float _202B_202B_200E_200C_200F_200B_200D_200D_200D_206D_200B_206B_202A_202B_200C_206C_206E_206D_206A_202C_206A_202D_206D_206E_206D_200E_202A_206C_200B_200D_206F_206F_200E_200C_206B_200E_200C_206F_206D_200D_202E(float P_0)
|
||||
{
|
||||
return MathF.Round(P_0);
|
||||
}
|
||||
|
||||
void _200F_202B_206C_202C_206F_200C_200B_202D_200C_206E_202C_206D_202A_206D_202C_206A_202B_202B_202C_206E_200C_206D_206E_200D_202C_200B_200D_202C_200C_200C_206B_200E_200B_200D_200C_200C_206F_200E_202C_206D_202E(float? P_0)
|
||||
{
|
||||
base.BgAlpha = P_0;
|
||||
}
|
||||
|
||||
bool _206F_202C_200E_206A_202C_202E_200D_202E_202E_200F_206C_200C_200C_202C_202B_200F_200E_200C_206E_200E_200D_206F_206C_202A_206C_206B_206E_202E_202B_206B_200F_202A_202E_202B_200D_206A_206E_200C_202C_202C_202E()
|
||||
{
|
||||
return base.AllowPinning;
|
||||
}
|
||||
|
||||
void _202A_202A_206B_206A_202A_200B_200B_206D_206E_206A_200C_202D_206E_202B_202B_206C_202D_206A_202B_200E_202C_202D_206E_202E_200F_202B_206D_206B_206A_202A_206B_200E_206C_200E_200D_206A_206B_200B_202E_206E_202E(bool P_0)
|
||||
{
|
||||
base.IsPinned = P_0;
|
||||
}
|
||||
|
||||
bool _202A_206A_200E_200F_202C_206F_206E_206A_206E_200C_200E_202E_202C_202B_206D_206A_206F_200B_200D_202B_206A_202C_200E_206C_206F_206D_206D_200B_206F_202D_200F_206E_206E_206D_206A_200E_202C_206C_202B_206A_202E()
|
||||
{
|
||||
return base.AllowClickthrough;
|
||||
}
|
||||
|
||||
void _200D_200B_202D_200D_200D_206F_200B_202E_200E_202A_206D_202B_206D_202B_206F_200D_200E_206C_200D_206A_206E_200B_206A_200E_200F_200C_202B_206E_206A_200C_202B_206E_206F_206A_200B_202C_202B_202C_206B_206F_202E(bool P_0)
|
||||
{
|
||||
base.IsClickthrough = P_0;
|
||||
}
|
||||
|
||||
static bool _206E_206F_206B_200D_200F_202D_202A_202D_206D_200F_200B_200F_200C_202E_200E_200E_202C_206E_206C_206F_206E_202E_202C_206B_200F_202C_206E_206A_206B_206D_206D_202A_200F_206A_206C_200E_206F_200B_200C_206A_202E()
|
||||
{
|
||||
return Dalamud.Bindings.ImGui.ImGui.IsAnyMouseDown();
|
||||
}
|
||||
|
||||
bool _200C_202C_202B_206A_206E_202C_200C_202A_206A_206B_202D_202C_200F_200F_206C_206C_206D_206E_202D_206A_206B_200D_202C_206C_200E_206E_200F_200F_202E_206B_206C_200E_206B_202E_202A_200C_202A_206B_206F_206B_202E()
|
||||
{
|
||||
return base.IsPinned;
|
||||
}
|
||||
|
||||
bool _200C_206A_200D_200B_202B_202B_206A_202B_206A_206A_202D_202B_202E_206E_202E_200B_206B_202E_200F_202D_202C_200F_202D_200F_202C_200F_202C_206A_206E_202C_202D_200C_202C_200C_206D_206E_206B_200F_200C_206B_202E()
|
||||
{
|
||||
return base.IsClickthrough;
|
||||
}
|
||||
|
||||
void _202B_206D_200D_206C_206F_202B_202C_200F_206E_206F_206B_200D_200E_202E_202A_200E_202C_202E_206A_202C_206F_206B_206B_206C_206F_202D_200E_200D_206A_202E_200B_200F_206E_202B_202A_202C_206D_206B_200C_206E_202E()
|
||||
{
|
||||
base.OnOpen();
|
||||
}
|
||||
|
||||
static void _202E_206B_206E_206C_202C_202A_200D_202C_206E_200E_206C_206F_202B_202D_206A_206B_200F_206C_200D_206E_206A_206C_200C_200B_200B_202A_200D_200C_202A_206A_206D_206C_202A_202C_200B_200D_202E_200D_200E_202B_202E(bool P_0)
|
||||
{
|
||||
Dalamud.Bindings.ImGui.ImGui.SetNextWindowCollapsed(P_0);
|
||||
}
|
||||
|
||||
void _200E_200F_200F_202A_206E_202D_200D_206C_206A_200D_202E_200C_200F_202D_200B_202E_200E_200D_202A_206C_206F_202E_202E_200F_200D_206E_206A_202A_206A_206B_206E_202D_202C_200F_206E_206C_206E_200C_206A_200C_202E()
|
||||
{
|
||||
base.PreDraw();
|
||||
}
|
||||
|
||||
void _200B_202E_202E_206B_202B_202A_206B_200B_202D_206E_202D_200F_202B_200C_200C_200B_206A_206E_206C_206B_206E_202D_202D_206E_200C_206B_202B_206F_202E_202B_206A_206B_206D_202E_202B_206E_200B_206A_200E_200C_202E()
|
||||
{
|
||||
base.PostDraw();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -2,7 +2,6 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Dalamud.Interface.Textures;
|
||||
using Dalamud.Interface.Textures.TextureWraps;
|
||||
using Dalamud.Plugin.Services;
|
||||
|
|
@ -54,238 +53,92 @@ public sealed class MapTextureService
|
|||
_logger = logger;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public bool LoadForTerritory(uint territoryType)
|
||||
{
|
||||
int num = ((territoryType != _loadedTerritoryType) ? (-703602804) : (-703602806));
|
||||
List<string> list2 = default(List<string>);
|
||||
string value = default(string);
|
||||
Map? map = default(Map?);
|
||||
string[] array = default(string[]);
|
||||
string text = default(string);
|
||||
TerritoryType? rowOrDefault = default(TerritoryType?);
|
||||
while (true)
|
||||
if (territoryType == _loadedTerritoryType && _resolvedTexture != null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -703602814;
|
||||
int num4 = num2;
|
||||
Map? obj;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
default:
|
||||
continue;
|
||||
case 0:
|
||||
return false;
|
||||
case 3:
|
||||
num = ((_200E_206C_202D_200C_200F_206A_202A_200E_200E_202C_202D_202D_202B_206B_206F_206F_200F_206D_206A_206E_202C_206E_200F_200F_206B_202A_206A_202A_200F_206A_206F_206A_200E_200D_206E_206D_206B_206B_200D_206E_202E() >= _retryAtMs) ? (-703602796) : (-703602814));
|
||||
continue;
|
||||
case 16:
|
||||
num = ((_candidateTextures == null) ? (-703602797) : (-703602813));
|
||||
continue;
|
||||
case 21:
|
||||
_failed = true;
|
||||
return false;
|
||||
case 1:
|
||||
PollCandidates();
|
||||
return _resolvedTexture != null;
|
||||
case 7:
|
||||
num = ((!_failed) ? (-703602799) : (-703602816));
|
||||
continue;
|
||||
case 15:
|
||||
{
|
||||
List<string> list = list2;
|
||||
DefaultInterpolatedStringHandler defaultInterpolatedStringHandler = new DefaultInterpolatedStringHandler(19, 2);
|
||||
defaultInterpolatedStringHandler.AppendLiteral(global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(674220722));
|
||||
defaultInterpolatedStringHandler.AppendFormatted(value);
|
||||
defaultInterpolatedStringHandler.AppendLiteral(global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-27764842));
|
||||
defaultInterpolatedStringHandler.AppendFormatted(value);
|
||||
defaultInterpolatedStringHandler.AppendLiteral(global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(582629916));
|
||||
list.Add(defaultInterpolatedStringHandler.ToStringAndClear());
|
||||
num = -703602795;
|
||||
continue;
|
||||
}
|
||||
case 23:
|
||||
_206F_200B_200E_206D_200C_200B_206B_206C_202A_206C_206C_206C_206D_202E_206E_206F_206A_200C_200D_200C_202D_202D_200E_206D_202E_202D_200D_202C_206C_200B_200E_202B_200F_202E_202E_206A_202D_206C_206A_206C_202E((ILogger)_logger, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(1609496745), new object[2]
|
||||
{
|
||||
territoryType,
|
||||
_200C_200F_206E_202C_206F_206E_206F_206F_200E_206B_202E_200B_206C_200F_200B_206A_200C_200E_202C_202A_202A_200B_202D_202C_202D_206B_202E_206A_200D_200E_202D_206E_202B_202C_200C_200C_202B_206C_206B_202E_202E(global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(1645706687), (IEnumerable<string>)list2)
|
||||
});
|
||||
_candidateTextures = list2.Select((string p) => _202E_206B_206B_200F_206B_206E_202B_202D_200C_200F_202C_202E_200B_206B_200B_202B_202B_200D_202B_202A_202C_202C_206F_206C_206D_200E_202A_200C_200E_200E_202C_202B_206B_200C_202D_202B_200B_202E_200D_206B_202E(_textureProvider, p)).ToList();
|
||||
PollCandidates();
|
||||
return _resolvedTexture != null;
|
||||
case 14:
|
||||
num = ((territoryType != _loadedTerritoryType) ? (-703602799) : (-703602811));
|
||||
continue;
|
||||
case 17:
|
||||
num = ((territoryType != _loadedTerritoryType) ? (-703602796) : (-703602815));
|
||||
continue;
|
||||
case 20:
|
||||
num = ((map.Value.RowId != 0) ? (-703602808) : (-703602809));
|
||||
continue;
|
||||
case 19:
|
||||
num = ((territoryType != _loadedTerritoryType) ? (-703602797) : (-703602798));
|
||||
continue;
|
||||
case 13:
|
||||
return true;
|
||||
case 9:
|
||||
obj = null;
|
||||
break;
|
||||
case 4:
|
||||
num = -703602806;
|
||||
continue;
|
||||
case 2:
|
||||
return false;
|
||||
case 18:
|
||||
array = _202B_200D_202E_202E_200B_206D_206C_206E_200C_200B_200E_202E_202B_200F_202C_200F_202E_206B_200E_206B_200C_202E_206D_206C_206F_206C_202D_200F_200B_200F_202D_206B_202A_206E_206D_206B_206A_202B_202A_200D_202E(text, '/', StringSplitOptions.None);
|
||||
num = ((array.Length == 2) ? (-703602807) : (-703602793));
|
||||
continue;
|
||||
case 5:
|
||||
_failed = true;
|
||||
return false;
|
||||
case 11:
|
||||
{
|
||||
value = array[0];
|
||||
string text2 = array[1];
|
||||
List<string> list3 = new List<string>();
|
||||
DefaultInterpolatedStringHandler defaultInterpolatedStringHandler2 = new DefaultInterpolatedStringHandler(14, 3);
|
||||
defaultInterpolatedStringHandler2.AppendLiteral(global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(1333505234));
|
||||
defaultInterpolatedStringHandler2.AppendFormatted(text);
|
||||
defaultInterpolatedStringHandler2.AppendLiteral(global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(-102430846));
|
||||
defaultInterpolatedStringHandler2.AppendFormatted(value);
|
||||
defaultInterpolatedStringHandler2.AppendFormatted(text2);
|
||||
defaultInterpolatedStringHandler2.AppendLiteral(global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(-25096421));
|
||||
list3.Add(defaultInterpolatedStringHandler2.ToStringAndClear());
|
||||
list2 = list3;
|
||||
num = ((!_206A_200E_206B_206F_206B_200E_202B_206E_202E_200C_206F_206A_202E_200F_206B_206E_206A_200B_200D_202D_200B_202B_206A_200C_202E_206C_206D_206D_206D_206C_200F_202B_200D_200D_202C_206F_206B_206A_206A_206D_202E(text2, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(-1596345032))) ? (-703602795) : (-703602803));
|
||||
continue;
|
||||
}
|
||||
case 6:
|
||||
_failed = true;
|
||||
return false;
|
||||
case 8:
|
||||
num = ((_resolvedTexture == null) ? (-703602804) : (-703602801));
|
||||
continue;
|
||||
case 22:
|
||||
_resolvedTexture = null;
|
||||
_candidateTextures = null;
|
||||
_failed = false;
|
||||
_retryAtMs = 0L;
|
||||
_loadedTerritoryType = territoryType;
|
||||
_searchFrames = 0;
|
||||
rowOrDefault = _dataManager.GetExcelSheet<TerritoryType>().GetRowOrDefault(territoryType);
|
||||
num = (rowOrDefault.HasValue ? (-703602802) : (-703602805));
|
||||
continue;
|
||||
case 10:
|
||||
_sizeFactor = map.Value.SizeFactor;
|
||||
_offsetX = map.Value.OffsetX;
|
||||
_offsetY = map.Value.OffsetY;
|
||||
text = map.Value.Id.ExtractText();
|
||||
num = ((!_206C_200D_202E_202D_202C_202E_200C_202D_202C_202A_200F_206D_200B_206B_200B_206B_202A_206A_200D_206F_206C_200B_206A_200E_206C_206E_200B_202E_200C_200E_206E_206F_206F_202A_206C_200D_200B_200B_206C_206B_202E(text)) ? (-703602800) : (-703602812));
|
||||
continue;
|
||||
case 12:
|
||||
obj = rowOrDefault.GetValueOrDefault().Map.ValueNullable;
|
||||
break;
|
||||
}
|
||||
map = obj;
|
||||
num = ((!map.HasValue) ? (-703602809) : (-703602794));
|
||||
return true;
|
||||
}
|
||||
if (territoryType == _loadedTerritoryType && _failed)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (territoryType == _loadedTerritoryType && _candidateTextures != null)
|
||||
{
|
||||
PollCandidates();
|
||||
return _resolvedTexture != null;
|
||||
}
|
||||
if (territoryType == _loadedTerritoryType && Environment.TickCount64 < _retryAtMs)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
_resolvedTexture = null;
|
||||
_candidateTextures = null;
|
||||
_failed = false;
|
||||
_retryAtMs = 0L;
|
||||
_loadedTerritoryType = territoryType;
|
||||
_searchFrames = 0;
|
||||
Map? map = _dataManager.GetExcelSheet<TerritoryType>().GetRowOrDefault(territoryType)?.Map.ValueNullable;
|
||||
if (!map.HasValue || map.Value.RowId == 0)
|
||||
{
|
||||
_failed = true;
|
||||
return false;
|
||||
}
|
||||
_sizeFactor = map.Value.SizeFactor;
|
||||
_offsetX = map.Value.OffsetX;
|
||||
_offsetY = map.Value.OffsetY;
|
||||
string text = map.Value.Id.ExtractText();
|
||||
if (string.IsNullOrEmpty(text))
|
||||
{
|
||||
_failed = true;
|
||||
return false;
|
||||
}
|
||||
string[] array = text.Split('/');
|
||||
if (array.Length != 2)
|
||||
{
|
||||
_failed = true;
|
||||
return false;
|
||||
}
|
||||
string value = array[0];
|
||||
string text2 = array[1];
|
||||
List<string> list = new List<string> { $"ui/map/{text}/{value}{text2}_m.tex" };
|
||||
if (text2 != "00")
|
||||
{
|
||||
list.Add($"ui/map/{value}/00/{value}00_m.tex");
|
||||
}
|
||||
_logger.LogDebug("Starting map texture search for territory {TerritoryType}: {Paths}", territoryType, string.Join(", ", list));
|
||||
_candidateTextures = list.Select((string p) => _textureProvider.GetFromGame(p)).ToList();
|
||||
PollCandidates();
|
||||
return _resolvedTexture != null;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
private void PollCandidates()
|
||||
{
|
||||
int num = ((_candidateTextures != null) ? 1719406812 : 1719406813);
|
||||
ISharedImmediateTexture current = default(ISharedImmediateTexture);
|
||||
while (true)
|
||||
if (_candidateTextures == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1719406812;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
return;
|
||||
}
|
||||
foreach (ISharedImmediateTexture candidateTexture in _candidateTextures)
|
||||
{
|
||||
if (candidateTexture.GetWrapOrDefault() != null)
|
||||
{
|
||||
case 2:
|
||||
goto IL_004b;
|
||||
case 1:
|
||||
_resolvedTexture = candidateTexture;
|
||||
_candidateTextures = null;
|
||||
return;
|
||||
case 0:
|
||||
{
|
||||
using (List<ISharedImmediateTexture>.Enumerator enumerator = _candidateTextures.GetEnumerator())
|
||||
{
|
||||
num = -2142994811;
|
||||
while (true)
|
||||
{
|
||||
int num7 = num;
|
||||
num3 = -2142994811;
|
||||
num4 = num7;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
num = (enumerator.MoveNext() ? (-2142994815) : (-2142994809));
|
||||
break;
|
||||
case 4:
|
||||
current = enumerator.Current;
|
||||
num = ((_202E_200B_200C_200B_206D_200E_200B_206F_200D_206E_202C_206D_200C_206C_200D_202D_206E_200E_206F_200C_206B_200F_200B_206A_206E_200F_202D_200D_200D_202E_202E_200C_200B_206A_206B_202E_206D_202E_202A_202D_202E(current, (IDalamudTextureWrap)null) == null) ? (-2142994811) : (-2142994812));
|
||||
break;
|
||||
case 3:
|
||||
num = -2142994811;
|
||||
break;
|
||||
case 1:
|
||||
_resolvedTexture = current;
|
||||
_candidateTextures = null;
|
||||
return;
|
||||
case 2:
|
||||
goto end_IL_006e;
|
||||
}
|
||||
continue;
|
||||
end_IL_006e:
|
||||
break;
|
||||
}
|
||||
}
|
||||
int searchFrames = _searchFrames;
|
||||
num3 = 1;
|
||||
num4 = searchFrames;
|
||||
int num8 = num4 ^ num3;
|
||||
int num9 = num4 & num3;
|
||||
_searchFrames = num8 + (num9 + num9);
|
||||
num = ((_searchFrames < 120) ? 613954225 : 613954226);
|
||||
while (true)
|
||||
{
|
||||
int num10 = num;
|
||||
num3 = 613954224;
|
||||
num4 = num10;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
num = 613954226;
|
||||
break;
|
||||
case 2:
|
||||
_206D_206F_202C_200D_202B_202E_200C_200B_206C_206A_206D_202B_206B_202B_206B_202C_202A_206B_202C_200E_206E_200F_200F_206D_202A_206B_206F_206B_200D_200F_200D_206D_200C_206B_200D_202B_200D_206A_206D_200C_202E((ILogger)_logger, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(1519773533), new object[2] { _loadedTerritoryType, 30L });
|
||||
_candidateTextures = null;
|
||||
_retryAtMs = _200E_206C_202D_200C_200F_206A_202A_200E_200E_202C_202D_202D_202B_206B_206F_206F_200F_206D_206A_206E_202C_206E_200F_200F_206B_202A_206A_202A_200F_206A_206F_206A_200E_200D_206E_206D_206B_206B_200D_206E_202E() + 30000;
|
||||
num = 613954225;
|
||||
break;
|
||||
case 1:
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
continue;
|
||||
IL_004b:
|
||||
num = 1719406813;
|
||||
}
|
||||
_searchFrames++;
|
||||
if (_searchFrames >= 120)
|
||||
{
|
||||
_logger.LogWarning("Map texture search timed out for territory {TerritoryType}, retrying in {Delay}s", _loadedTerritoryType, 30L);
|
||||
_candidateTextures = null;
|
||||
_retryAtMs = Environment.TickCount64 + 30000;
|
||||
}
|
||||
}
|
||||
|
||||
public IDalamudTextureWrap? GetTextureWrap()
|
||||
{
|
||||
ISharedImmediateTexture? resolvedTexture = _resolvedTexture;
|
||||
if (resolvedTexture == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return _202E_200B_200C_200B_206D_200E_200B_206F_200D_206E_202C_206D_200C_206C_200D_202D_206E_200E_206F_200C_206B_200F_200B_206A_206E_200F_202D_200D_200D_202E_202E_200C_200B_206A_206B_202E_206D_202E_202A_202D_202E(resolvedTexture, (IDalamudTextureWrap)null);
|
||||
return _resolvedTexture?.GetWrapOrDefault();
|
||||
}
|
||||
|
||||
public Vector2 WorldToUV(float worldX, float worldZ)
|
||||
|
|
@ -315,49 +168,4 @@ public sealed class MapTextureService
|
|||
Vector2 vector = (screenPos - imagePos) / imageSize;
|
||||
return UVToWorld(vector.X, vector.Y);
|
||||
}
|
||||
|
||||
static long _200E_206C_202D_200C_200F_206A_202A_200E_200E_202C_202D_202D_202B_206B_206F_206F_200F_206D_206A_206E_202C_206E_200F_200F_206B_202A_206A_202A_200F_206A_206F_206A_200E_200D_206E_206D_206B_206B_200D_206E_202E()
|
||||
{
|
||||
return Environment.TickCount64;
|
||||
}
|
||||
|
||||
static bool _206C_200D_202E_202D_202C_202E_200C_202D_202C_202A_200F_206D_200B_206B_200B_206B_202A_206A_200D_206F_206C_200B_206A_200E_206C_206E_200B_202E_200C_200E_206E_206F_206F_202A_206C_200D_200B_200B_206C_206B_202E(string P_0)
|
||||
{
|
||||
return string.IsNullOrEmpty(P_0);
|
||||
}
|
||||
|
||||
static string[] _202B_200D_202E_202E_200B_206D_206C_206E_200C_200B_200E_202E_202B_200F_202C_200F_202E_206B_200E_206B_200C_202E_206D_206C_206F_206C_202D_200F_200B_200F_202D_206B_202A_206E_206D_206B_206A_202B_202A_200D_202E(string P_0, char P_1, StringSplitOptions P_2)
|
||||
{
|
||||
return P_0.Split(P_1, P_2);
|
||||
}
|
||||
|
||||
static bool _206A_200E_206B_206F_206B_200E_202B_206E_202E_200C_206F_206A_202E_200F_206B_206E_206A_200B_200D_202D_200B_202B_206A_200C_202E_206C_206D_206D_206D_206C_200F_202B_200D_200D_202C_206F_206B_206A_206A_206D_202E(string P_0, string P_1)
|
||||
{
|
||||
return P_0 != P_1;
|
||||
}
|
||||
|
||||
static string _200C_200F_206E_202C_206F_206E_206F_206F_200E_206B_202E_200B_206C_200F_200B_206A_200C_200E_202C_202A_202A_200B_202D_202C_202D_206B_202E_206A_200D_200E_202D_206E_202B_202C_200C_200C_202B_206C_206B_202E_202E(string P_0, IEnumerable<string> P_1)
|
||||
{
|
||||
return string.Join(P_0, P_1);
|
||||
}
|
||||
|
||||
static void _206F_200B_200E_206D_200C_200B_206B_206C_202A_206C_206C_206C_206D_202E_206E_206F_206A_200C_200D_200C_202D_202D_200E_206D_202E_202D_200D_202C_206C_200B_200E_202B_200F_202E_202E_206A_202D_206C_206A_206C_202E(ILogger P_0, string P_1, object[] P_2)
|
||||
{
|
||||
P_0.LogDebug(P_1, P_2);
|
||||
}
|
||||
|
||||
static IDalamudTextureWrap _202E_200B_200C_200B_206D_200E_200B_206F_200D_206E_202C_206D_200C_206C_200D_202D_206E_200E_206F_200C_206B_200F_200B_206A_206E_200F_202D_200D_200D_202E_202E_200C_200B_206A_206B_202E_206D_202E_202A_202D_202E(ISharedImmediateTexture P_0, IDalamudTextureWrap P_1)
|
||||
{
|
||||
return P_0.GetWrapOrDefault(P_1);
|
||||
}
|
||||
|
||||
static void _206D_206F_202C_200D_202B_202E_200C_200B_206C_206A_206D_202B_206B_202B_206B_202C_202A_206B_202C_200E_206E_200F_200F_206D_202A_206B_206F_206B_200D_200F_200D_206D_200C_206B_200D_202B_200D_206A_206D_200C_202E(ILogger P_0, string P_1, object[] P_2)
|
||||
{
|
||||
P_0.LogWarning(P_1, P_2);
|
||||
}
|
||||
|
||||
static ISharedImmediateTexture _202E_206B_206B_200F_206B_206E_202B_202D_200C_200F_202C_202E_200B_206B_200B_202B_202B_200D_202B_202A_202C_202C_206F_206C_206D_200E_202A_200C_200E_200E_202C_202B_206B_200C_202D_202B_200B_202E_200D_206B_202E(ITextureProvider P_0, string P_1)
|
||||
{
|
||||
return P_0.GetFromGame(P_1);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
using System.Reflection;
|
||||
|
||||
namespace LLib.ImGui;
|
||||
|
||||
[Obfuscation(Feature = "-rename", Exclude = false, ApplyToMembers = true)]
|
||||
public class WindowConfig
|
||||
{
|
||||
public bool IsPinned { get; set; }
|
||||
|
|
|
|||
|
|
@ -43,37 +43,17 @@ public static class WindowFlash
|
|||
|
||||
public static void Flash(nint hwnd, uint count = 3u)
|
||||
{
|
||||
int num = ((hwnd != 0) ? (-1584485795) : (-1584485796));
|
||||
while (true)
|
||||
if (hwnd != 0)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1584485795;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
FLASHWINFO pwfi = new FLASHWINFO
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
FLASHWINFO pwfi = new FLASHWINFO
|
||||
{
|
||||
cbSize = (uint)Marshal.SizeOf<FLASHWINFO>(),
|
||||
hwnd = hwnd,
|
||||
dwFlags = ((count == 0) ? 15u : 3u),
|
||||
uCount = count,
|
||||
dwTimeout = 0u
|
||||
};
|
||||
FlashWindowEx(ref pwfi);
|
||||
return;
|
||||
}
|
||||
case 1:
|
||||
return;
|
||||
case 2:
|
||||
goto IL_0093;
|
||||
}
|
||||
continue;
|
||||
IL_0093:
|
||||
num = -1584485796;
|
||||
cbSize = (uint)Marshal.SizeOf<FLASHWINFO>(),
|
||||
hwnd = hwnd,
|
||||
dwFlags = ((count == 0) ? 15u : 3u),
|
||||
uCount = count,
|
||||
dwTimeout = 0u
|
||||
};
|
||||
FlashWindowEx(ref pwfi);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,46 +7,15 @@ public static class CofferHelper
|
|||
public static bool IsGearCoffer(Item item)
|
||||
{
|
||||
ItemAction? valueNullable = item.ItemAction.ValueNullable;
|
||||
int num = (valueNullable.HasValue ? (-77683553) : (-77683554));
|
||||
bool flag = default(bool);
|
||||
uint rowId = default(uint);
|
||||
while (true)
|
||||
if (!valueNullable.HasValue)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -77683553;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 4:
|
||||
return false;
|
||||
case 8:
|
||||
return item.ItemUICategory.RowId == 61;
|
||||
case 7:
|
||||
flag = false;
|
||||
num = -77683558;
|
||||
break;
|
||||
case 5:
|
||||
num = ((!flag) ? (-77683557) : (-77683561));
|
||||
break;
|
||||
case 3:
|
||||
flag = true;
|
||||
num = -77683558;
|
||||
break;
|
||||
case 2:
|
||||
num = -77683554;
|
||||
break;
|
||||
case 6:
|
||||
num = ((rowId != 1085) ? (-77683560) : (-77683556));
|
||||
break;
|
||||
case 1:
|
||||
return false;
|
||||
case 0:
|
||||
rowId = valueNullable.Value.RowId;
|
||||
num = ((rowId == 388) ? (-77683556) : (-77683559));
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
uint rowId = valueNullable.Value.RowId;
|
||||
if ((rowId == 388 || rowId == 1085) ? true : false)
|
||||
{
|
||||
return item.ItemUICategory.RowId == 61;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,264 +50,87 @@ public static class InventoryContainers
|
|||
public unsafe static int CountFreeSlots(ReadOnlySpan<InventoryType> containers)
|
||||
{
|
||||
InventoryManager* ptr = InventoryManager.Instance();
|
||||
int num = ((ptr != null) ? 422803500 : 422803490);
|
||||
ReadOnlySpan<InventoryType> readOnlySpan = default(ReadOnlySpan<InventoryType>);
|
||||
int num7 = default(int);
|
||||
InventoryContainer* inventoryContainer = default(InventoryContainer*);
|
||||
int num9 = default(int);
|
||||
int num11 = default(int);
|
||||
InventoryItem* inventorySlot = default(InventoryItem*);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 422803495;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
return 0;
|
||||
}
|
||||
int num = 0;
|
||||
ReadOnlySpan<InventoryType> readOnlySpan = containers;
|
||||
for (int i = 0; i < readOnlySpan.Length; i++)
|
||||
{
|
||||
InventoryType inventoryType = readOnlySpan[i];
|
||||
InventoryContainer* inventoryContainer = ptr->GetInventoryContainer(inventoryType);
|
||||
if (inventoryContainer == null)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
InventoryType inventoryType = readOnlySpan[num7];
|
||||
inventoryContainer = ptr->GetInventoryContainer(inventoryType);
|
||||
num = ((inventoryContainer == null) ? 422803501 : 422803493);
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
case 11:
|
||||
num9 = 0;
|
||||
readOnlySpan = containers;
|
||||
num7 = 0;
|
||||
num = 422803492;
|
||||
break;
|
||||
case 0:
|
||||
num = ((num11 < inventoryContainer->Size) ? 422803491 : 422803501);
|
||||
break;
|
||||
case 10:
|
||||
for (int j = 0; j < inventoryContainer->Size; j++)
|
||||
{
|
||||
int num14 = num7;
|
||||
num3 = 1;
|
||||
num4 = num14;
|
||||
num7 = (num4 | num3) + (num4 & num3);
|
||||
num = 422803492;
|
||||
break;
|
||||
}
|
||||
case 7:
|
||||
{
|
||||
int num10 = num11;
|
||||
num3 = 1;
|
||||
num4 = num10;
|
||||
int num12 = num4 ^ num3;
|
||||
int num13 = num4 & num3;
|
||||
num11 = num12 + (num13 + num13);
|
||||
num = 422803495;
|
||||
break;
|
||||
}
|
||||
case 9:
|
||||
{
|
||||
int num8 = num9;
|
||||
num3 = 1;
|
||||
num4 = num8;
|
||||
num9 = (num4 | num3) + (num4 & num3);
|
||||
num = 422803488;
|
||||
break;
|
||||
}
|
||||
case 5:
|
||||
return 0;
|
||||
case 12:
|
||||
return num9;
|
||||
case 6:
|
||||
num = 422803490;
|
||||
break;
|
||||
case 8:
|
||||
num = ((inventorySlot->ItemId != 0) ? 422803488 : 422803502);
|
||||
break;
|
||||
case 2:
|
||||
num11 = 0;
|
||||
num = 422803495;
|
||||
break;
|
||||
case 4:
|
||||
inventorySlot = inventoryContainer->GetInventorySlot(num11);
|
||||
num = ((inventorySlot == null) ? 422803502 : 422803503);
|
||||
break;
|
||||
case 3:
|
||||
num = ((num7 < readOnlySpan.Length) ? 422803494 : 422803499);
|
||||
break;
|
||||
InventoryItem* inventorySlot = inventoryContainer->GetInventorySlot(j);
|
||||
if (inventorySlot == null || inventorySlot->ItemId == 0)
|
||||
{
|
||||
num++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
public unsafe static int CountItems(uint itemId, ReadOnlySpan<InventoryType> containers)
|
||||
{
|
||||
InventoryManager* ptr = InventoryManager.Instance();
|
||||
int num = ((ptr != null) ? 107037197 : 107037193);
|
||||
int num11 = default(int);
|
||||
InventoryContainer* inventoryContainer = default(InventoryContainer*);
|
||||
int num7 = default(int);
|
||||
ReadOnlySpan<InventoryType> readOnlySpan = default(ReadOnlySpan<InventoryType>);
|
||||
int num5 = default(int);
|
||||
InventoryItem* inventorySlot = default(InventoryItem*);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 107037196;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
return 0;
|
||||
}
|
||||
int num = 0;
|
||||
ReadOnlySpan<InventoryType> readOnlySpan = containers;
|
||||
for (int i = 0; i < readOnlySpan.Length; i++)
|
||||
{
|
||||
InventoryType inventoryType = readOnlySpan[i];
|
||||
InventoryContainer* inventoryContainer = ptr->GetInventoryContainer(inventoryType);
|
||||
if (inventoryContainer == null)
|
||||
{
|
||||
case 9:
|
||||
num11 = 0;
|
||||
num = 107037196;
|
||||
break;
|
||||
case 0:
|
||||
num = ((num11 < inventoryContainer->Size) ? 107037190 : 107037191);
|
||||
break;
|
||||
case 1:
|
||||
num7 = 0;
|
||||
readOnlySpan = containers;
|
||||
num5 = 0;
|
||||
num = 107037184;
|
||||
break;
|
||||
case 3:
|
||||
num = ((inventorySlot->ItemId != itemId) ? 107037192 : 107037188);
|
||||
break;
|
||||
case 7:
|
||||
num = 107037193;
|
||||
break;
|
||||
case 8:
|
||||
{
|
||||
int num6 = num7;
|
||||
num3 = inventorySlot->Quantity;
|
||||
num4 = num6;
|
||||
int num8 = num4 ^ num3;
|
||||
int num9 = num4 & num3;
|
||||
num7 = num8 + (num9 + num9);
|
||||
num = 107037192;
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
case 5:
|
||||
return 0;
|
||||
case 10:
|
||||
inventorySlot = inventoryContainer->GetInventorySlot(num11);
|
||||
num = ((inventorySlot == null) ? 107037192 : 107037199);
|
||||
break;
|
||||
case 4:
|
||||
for (int j = 0; j < inventoryContainer->Size; j++)
|
||||
{
|
||||
int num12 = num11;
|
||||
num3 = 1;
|
||||
num4 = num12;
|
||||
int num13 = num4 ^ num3;
|
||||
int num14 = num4 & num3;
|
||||
num11 = num13 + (num14 + num14);
|
||||
num = 107037196;
|
||||
break;
|
||||
}
|
||||
case 6:
|
||||
{
|
||||
InventoryType inventoryType = readOnlySpan[num5];
|
||||
inventoryContainer = ptr->GetInventoryContainer(inventoryType);
|
||||
num = ((inventoryContainer == null) ? 107037191 : 107037189);
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
return num7;
|
||||
case 11:
|
||||
{
|
||||
int num10 = num5;
|
||||
num3 = 1;
|
||||
num4 = num10;
|
||||
num5 = (num4 | num3) + (num4 & num3);
|
||||
num = 107037184;
|
||||
break;
|
||||
}
|
||||
case 12:
|
||||
num = ((num5 < readOnlySpan.Length) ? 107037194 : 107037198);
|
||||
break;
|
||||
InventoryItem* inventorySlot = inventoryContainer->GetInventorySlot(j);
|
||||
if (inventorySlot != null && inventorySlot->ItemId == itemId)
|
||||
{
|
||||
num += inventorySlot->Quantity;
|
||||
}
|
||||
}
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
public unsafe static List<InventoryItem> GetHqItems(ReadOnlySpan<InventoryType> containers)
|
||||
{
|
||||
List<InventoryItem> list = new List<InventoryItem>();
|
||||
InventoryManager* ptr = InventoryManager.Instance();
|
||||
int num = ((ptr != null) ? (-877452053) : (-877452056));
|
||||
InventoryItem* inventorySlot = default(InventoryItem*);
|
||||
InventoryContainer* inventoryContainer = default(InventoryContainer*);
|
||||
int num5 = default(int);
|
||||
ReadOnlySpan<InventoryType> readOnlySpan = default(ReadOnlySpan<InventoryType>);
|
||||
int num9 = default(int);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -877452054;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
return list;
|
||||
}
|
||||
ReadOnlySpan<InventoryType> readOnlySpan = containers;
|
||||
for (int i = 0; i < readOnlySpan.Length; i++)
|
||||
{
|
||||
InventoryType inventoryType = readOnlySpan[i];
|
||||
InventoryContainer* inventoryContainer = ptr->GetInventoryContainer(inventoryType);
|
||||
if (inventoryContainer == null)
|
||||
{
|
||||
case 5:
|
||||
inventorySlot = inventoryContainer->GetInventorySlot(num5);
|
||||
num = ((inventorySlot == null) ? (-877452055) : (-877452050));
|
||||
break;
|
||||
case 2:
|
||||
return list;
|
||||
case 9:
|
||||
num = -877452056;
|
||||
break;
|
||||
case 0:
|
||||
{
|
||||
InventoryType inventoryType = readOnlySpan[num9];
|
||||
inventoryContainer = ptr->GetInventoryContainer(inventoryType);
|
||||
num = ((inventoryContainer == null) ? (-877452051) : (-877452057));
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
case 7:
|
||||
for (int j = 0; j < inventoryContainer->Size; j++)
|
||||
{
|
||||
int num10 = num9;
|
||||
num3 = 1;
|
||||
num4 = num10;
|
||||
int num11 = num4 ^ num3;
|
||||
int num12 = num4 & num3;
|
||||
num9 = num11 + (num12 + num12);
|
||||
num = -877452064;
|
||||
break;
|
||||
}
|
||||
case 10:
|
||||
num = ((num9 < readOnlySpan.Length) ? (-877452054) : (-877452063));
|
||||
break;
|
||||
case 6:
|
||||
num = ((num5 < inventoryContainer->Size) ? (-877452049) : (-877452051));
|
||||
break;
|
||||
case 12:
|
||||
num = (((inventorySlot->Flags & InventoryItem.ItemFlags.HighQuality) == 0) ? (-877452055) : (-877452062));
|
||||
break;
|
||||
case 8:
|
||||
list.Add(*inventorySlot);
|
||||
num = -877452055;
|
||||
break;
|
||||
case 1:
|
||||
readOnlySpan = containers;
|
||||
num9 = 0;
|
||||
num = -877452064;
|
||||
break;
|
||||
case 4:
|
||||
num = ((inventorySlot->ItemId == 0) ? (-877452055) : (-877452058));
|
||||
break;
|
||||
case 3:
|
||||
{
|
||||
int num6 = num5;
|
||||
num3 = 1;
|
||||
num4 = num6;
|
||||
int num7 = num4 ^ num3;
|
||||
int num8 = num4 & num3;
|
||||
num5 = num7 + (num8 + num8);
|
||||
num = -877452052;
|
||||
break;
|
||||
}
|
||||
case 11:
|
||||
return list;
|
||||
case 13:
|
||||
num5 = 0;
|
||||
num = -877452052;
|
||||
break;
|
||||
InventoryItem* inventorySlot = inventoryContainer->GetInventorySlot(j);
|
||||
if (inventorySlot != null && inventorySlot->ItemId != 0 && (inventorySlot->Flags & InventoryItem.ItemFlags.HighQuality) != InventoryItem.ItemFlags.None)
|
||||
{
|
||||
list.Add(*inventorySlot);
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
using Lumina.Excel;
|
||||
using Lumina.Excel.Sheets;
|
||||
|
|
@ -11,94 +10,35 @@ public static class InventoryHelper
|
|||
public unsafe static int GetItemCount(uint itemId, bool checkEquipped = false, bool checkArmory = false)
|
||||
{
|
||||
InventoryManager* ptr = InventoryManager.Instance();
|
||||
int num = ((ptr != null) ? (-1076709592) : (-1076709591));
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1076709592;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
return ptr->GetInventoryItemCount(itemId, isHq: false, checkEquipped, checkArmory, 0) + ptr->GetInventoryItemCount(itemId, isHq: true, checkEquipped, checkArmory, 0);
|
||||
case 1:
|
||||
return 0;
|
||||
case 2:
|
||||
goto IL_0063;
|
||||
}
|
||||
continue;
|
||||
IL_0063:
|
||||
num = -1076709591;
|
||||
return 0;
|
||||
}
|
||||
return ptr->GetInventoryItemCount(itemId, isHq: false, checkEquipped, checkArmory, 0) + ptr->GetInventoryItemCount(itemId, isHq: true, checkEquipped, checkArmory, 0);
|
||||
}
|
||||
|
||||
public unsafe static int GetItemCount(uint itemId, InventoryType inventoryType)
|
||||
{
|
||||
InventoryManager* ptr = InventoryManager.Instance();
|
||||
int num = ((ptr != null) ? (-397486013) : (-397486005));
|
||||
int num7 = default(int);
|
||||
int num8 = default(int);
|
||||
InventoryItem* inventorySlot = default(InventoryItem*);
|
||||
InventoryContainer* inventoryContainer = default(InventoryContainer*);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -397486013;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
return 0;
|
||||
}
|
||||
InventoryContainer* inventoryContainer = ptr->GetInventoryContainer(inventoryType);
|
||||
if (inventoryContainer == null)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
int num = 0;
|
||||
for (int i = 0; i < inventoryContainer->Size; i++)
|
||||
{
|
||||
InventoryItem* inventorySlot = inventoryContainer->GetInventorySlot(i);
|
||||
if (inventorySlot != null && inventorySlot->ItemId == itemId)
|
||||
{
|
||||
case 1:
|
||||
return 0;
|
||||
case 7:
|
||||
{
|
||||
int num9 = num7;
|
||||
num3 = 1;
|
||||
num4 = num9;
|
||||
num7 = (num4 | num3) + (num4 & num3);
|
||||
num = -397486009;
|
||||
break;
|
||||
}
|
||||
case 8:
|
||||
return 0;
|
||||
case 3:
|
||||
{
|
||||
int num10 = num8;
|
||||
num3 = inventorySlot->Quantity;
|
||||
num4 = num10;
|
||||
int num11 = num4 ^ num3;
|
||||
int num12 = num4 & num3;
|
||||
num8 = num11 + (num12 + num12);
|
||||
num = -397486012;
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
inventoryContainer = ptr->GetInventoryContainer(inventoryType);
|
||||
num = ((inventoryContainer != null) ? (-397486007) : (-397486014));
|
||||
break;
|
||||
case 4:
|
||||
num = ((num7 < inventoryContainer->Size) ? (-397486010) : (-397486011));
|
||||
break;
|
||||
case 6:
|
||||
return num8;
|
||||
case 9:
|
||||
num = ((inventorySlot->ItemId != itemId) ? (-397486012) : (-397486016));
|
||||
break;
|
||||
case 10:
|
||||
num8 = 0;
|
||||
num7 = 0;
|
||||
num = -397486009;
|
||||
break;
|
||||
case 5:
|
||||
inventorySlot = inventoryContainer->GetInventorySlot(num7);
|
||||
num = ((inventorySlot == null) ? (-397486012) : (-397486006));
|
||||
break;
|
||||
case 2:
|
||||
num = -397486005;
|
||||
break;
|
||||
num += inventorySlot->Quantity;
|
||||
}
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
public static bool HasFreeInventorySlot()
|
||||
|
|
@ -109,167 +49,56 @@ public static class InventoryHelper
|
|||
public unsafe static int CountFreeInventorySlots()
|
||||
{
|
||||
InventoryManager* ptr = InventoryManager.Instance();
|
||||
int num = ((ptr != null) ? 1747914912 : 1747914917);
|
||||
InventoryContainer* inventoryContainer = default(InventoryContainer*);
|
||||
InventoryType inventoryType = default(InventoryType);
|
||||
int num5 = default(int);
|
||||
int num9 = default(int);
|
||||
InventoryItem* inventorySlot = default(InventoryItem*);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1747914921;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
return 0;
|
||||
}
|
||||
int num = 0;
|
||||
for (InventoryType inventoryType = InventoryType.Inventory1; inventoryType <= InventoryType.Inventory4; inventoryType++)
|
||||
{
|
||||
InventoryContainer* inventoryContainer = ptr->GetInventoryContainer(inventoryType);
|
||||
if (inventoryContainer == null)
|
||||
{
|
||||
case 6:
|
||||
inventoryContainer = ptr->GetInventoryContainer(inventoryType);
|
||||
num = ((inventoryContainer == null) ? 1747914922 : 1747914926);
|
||||
break;
|
||||
case 4:
|
||||
num = ((inventoryType <= InventoryType.Inventory4) ? 1747914927 : 1747914915);
|
||||
break;
|
||||
case 2:
|
||||
num = ((num5 < inventoryContainer->Size) ? 1747914921 : 1747914922);
|
||||
break;
|
||||
case 3:
|
||||
inventoryType++;
|
||||
num = 1747914925;
|
||||
break;
|
||||
case 5:
|
||||
{
|
||||
int num10 = num9;
|
||||
num3 = 1;
|
||||
num4 = num10;
|
||||
num9 = (num4 | num3) + (num4 & num3);
|
||||
num = 1747914920;
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
case 7:
|
||||
num5 = 0;
|
||||
num = 1747914923;
|
||||
break;
|
||||
case 9:
|
||||
num9 = 0;
|
||||
inventoryType = InventoryType.Inventory1;
|
||||
num = 1747914925;
|
||||
break;
|
||||
case 8:
|
||||
num = ((inventorySlot->ItemId != 0) ? 1747914920 : 1747914924);
|
||||
break;
|
||||
case 10:
|
||||
return num9;
|
||||
case 12:
|
||||
return 0;
|
||||
case 11:
|
||||
num = 1747914917;
|
||||
break;
|
||||
case 1:
|
||||
for (int i = 0; i < inventoryContainer->Size; i++)
|
||||
{
|
||||
int num6 = num5;
|
||||
num3 = 1;
|
||||
num4 = num6;
|
||||
int num7 = num4 ^ num3;
|
||||
int num8 = num4 & num3;
|
||||
num5 = num7 + (num8 + num8);
|
||||
num = 1747914923;
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
inventorySlot = inventoryContainer->GetInventorySlot(num5);
|
||||
num = ((inventorySlot == null) ? 1747914924 : 1747914913);
|
||||
break;
|
||||
InventoryItem* inventorySlot = inventoryContainer->GetInventorySlot(i);
|
||||
if (inventorySlot == null || inventorySlot->ItemId == 0)
|
||||
{
|
||||
num++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static int CountInventorySlotsWithCondition(uint itemId, Predicate<int> predicate)
|
||||
{
|
||||
_206A_202D_202D_202C_200F_206B_206C_202C_206D_202D_206C_200C_206B_202B_200C_200E_202C_200E_200F_206B_202B_202D_200F_202D_200B_200B_206D_206A_200C_200B_202D_206F_202C_200F_206C_206A_206A_206D_200E_200C_202E((object)predicate, global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-279872189));
|
||||
ArgumentNullException.ThrowIfNull(predicate, "predicate");
|
||||
InventoryManager* ptr = InventoryManager.Instance();
|
||||
int num = ((ptr != null) ? (-1746491217) : (-1746491226));
|
||||
InventoryType inventoryType = default(InventoryType);
|
||||
int num7 = default(int);
|
||||
int num11 = default(int);
|
||||
InventoryContainer* inventoryContainer = default(InventoryContainer*);
|
||||
InventoryItem* inventorySlot = default(InventoryItem*);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1746491230;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
return 0;
|
||||
}
|
||||
int num = 0;
|
||||
for (InventoryType inventoryType = InventoryType.Inventory1; inventoryType <= InventoryType.Inventory4; inventoryType++)
|
||||
{
|
||||
InventoryContainer* inventoryContainer = ptr->GetInventoryContainer(inventoryType);
|
||||
if (inventoryContainer == null)
|
||||
{
|
||||
case 14:
|
||||
num = ((inventoryType <= InventoryType.Inventory4) ? (-1746491221) : (-1746491231));
|
||||
break;
|
||||
case 11:
|
||||
num7 = 0;
|
||||
num = -1746491225;
|
||||
break;
|
||||
case 13:
|
||||
num11 = 0;
|
||||
inventoryType = InventoryType.Inventory1;
|
||||
num = -1746491220;
|
||||
break;
|
||||
case 9:
|
||||
inventoryContainer = ptr->GetInventoryContainer(inventoryType);
|
||||
num = ((inventoryContainer == null) ? (-1746491230) : (-1746491223));
|
||||
break;
|
||||
case 5:
|
||||
num = ((num7 < inventoryContainer->Size) ? (-1746491232) : (-1746491230));
|
||||
break;
|
||||
case 10:
|
||||
{
|
||||
int num8 = num7;
|
||||
num3 = 1;
|
||||
num4 = num8;
|
||||
int num9 = num4 ^ num3;
|
||||
int num10 = num4 & num3;
|
||||
num7 = num9 + (num10 + num10);
|
||||
num = -1746491225;
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
case 2:
|
||||
inventorySlot = inventoryContainer->GetInventorySlot(num7);
|
||||
num = ((inventorySlot == null) ? (-1746491224) : (-1746491227));
|
||||
break;
|
||||
case 8:
|
||||
for (int i = 0; i < inventoryContainer->Size; i++)
|
||||
{
|
||||
int num12 = num11;
|
||||
num3 = 1;
|
||||
num4 = num12;
|
||||
int num13 = num4 ^ num3;
|
||||
int num14 = num4 & num3;
|
||||
num11 = num13 + (num14 + num14);
|
||||
num = -1746491224;
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
inventoryType++;
|
||||
num = -1746491220;
|
||||
break;
|
||||
case 7:
|
||||
num = ((inventorySlot->ItemId == 0) ? (-1746491224) : (-1746491218));
|
||||
break;
|
||||
case 6:
|
||||
num = -1746491226;
|
||||
break;
|
||||
case 3:
|
||||
return num11;
|
||||
case 1:
|
||||
num = ((!predicate(inventorySlot->Quantity)) ? (-1746491224) : (-1746491222));
|
||||
break;
|
||||
case 12:
|
||||
num = ((inventorySlot->ItemId != itemId) ? (-1746491224) : (-1746491229));
|
||||
break;
|
||||
case 4:
|
||||
return 0;
|
||||
InventoryItem* inventorySlot = inventoryContainer->GetInventorySlot(i);
|
||||
if (inventorySlot != null && inventorySlot->ItemId != 0 && inventorySlot->ItemId == itemId && predicate(inventorySlot->Quantity))
|
||||
{
|
||||
num++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
public static bool IsItemEquipped(uint itemId)
|
||||
|
|
@ -280,195 +109,76 @@ public static class InventoryHelper
|
|||
public unsafe static int GetEquippedItemSlot(uint itemId)
|
||||
{
|
||||
InventoryManager* ptr = InventoryManager.Instance();
|
||||
int num = ((ptr != null) ? 1216447237 : 1216447232);
|
||||
InventoryItem* inventorySlot = default(InventoryItem*);
|
||||
InventoryContainer* inventoryContainer = default(InventoryContainer*);
|
||||
int num8 = default(int);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1216447236;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
return -1;
|
||||
}
|
||||
InventoryContainer* inventoryContainer = ptr->GetInventoryContainer(InventoryType.EquippedItems);
|
||||
if (inventoryContainer == null)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
for (int i = 0; i < inventoryContainer->Size; i++)
|
||||
{
|
||||
InventoryItem* inventorySlot = inventoryContainer->GetInventorySlot(i);
|
||||
if (inventorySlot != null && inventorySlot->ItemId == itemId)
|
||||
{
|
||||
case 9:
|
||||
inventorySlot = inventoryContainer->GetInventorySlot(num8);
|
||||
num = ((inventorySlot == null) ? 1216447246 : 1216447244);
|
||||
break;
|
||||
case 3:
|
||||
return num8;
|
||||
case 10:
|
||||
{
|
||||
int num7 = num8;
|
||||
num3 = 1;
|
||||
num4 = num7;
|
||||
int num9 = num4 ^ num3;
|
||||
int num10 = num4 & num3;
|
||||
num8 = num9 + (num10 + num10);
|
||||
num = 1216447236;
|
||||
break;
|
||||
}
|
||||
case 4:
|
||||
return -1;
|
||||
case 6:
|
||||
return -1;
|
||||
case 5:
|
||||
num = 1216447232;
|
||||
break;
|
||||
case 0:
|
||||
num = ((num8 < inventoryContainer->Size) ? 1216447245 : 1216447234);
|
||||
break;
|
||||
case 2:
|
||||
num8 = 0;
|
||||
num = 1216447236;
|
||||
break;
|
||||
case 7:
|
||||
return -1;
|
||||
case 1:
|
||||
inventoryContainer = ptr->GetInventoryContainer(InventoryType.EquippedItems);
|
||||
num = ((inventoryContainer != null) ? 1216447238 : 1216447235);
|
||||
break;
|
||||
case 8:
|
||||
num = ((inventorySlot->ItemId != itemId) ? 1216447246 : 1216447239);
|
||||
break;
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static int GetRemainingStackCapacity(uint itemId, ExcelSheet<Item> itemSheet)
|
||||
{
|
||||
_206A_202D_202D_202C_200F_206B_206C_202C_206D_202D_206C_200C_206B_202B_200C_200E_202C_200E_200F_206B_202B_202D_200F_202D_200B_200B_206D_206A_200C_200B_202D_206F_202C_200F_206C_206A_206A_206D_200E_200C_202E((object)itemSheet, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(-2041652730));
|
||||
ArgumentNullException.ThrowIfNull(itemSheet, "itemSheet");
|
||||
InventoryManager* ptr = InventoryManager.Instance();
|
||||
int num = ((ptr != null) ? 2074514221 : 2074514216);
|
||||
int num9 = default(int);
|
||||
InventoryType inventoryType = default(InventoryType);
|
||||
int num7 = default(int);
|
||||
InventoryItem* inventorySlot = default(InventoryItem*);
|
||||
InventoryContainer* inventoryContainer = default(InventoryContainer*);
|
||||
int num8 = default(int);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 2074514213;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
return 0;
|
||||
}
|
||||
int num = (int)(itemSheet.GetRowOrDefault(itemId)?.StackSize ?? 0);
|
||||
if (num <= 1)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
int num2 = 0;
|
||||
for (InventoryType inventoryType = InventoryType.Inventory1; inventoryType <= InventoryType.Inventory4; inventoryType++)
|
||||
{
|
||||
InventoryContainer* inventoryContainer = ptr->GetInventoryContainer(inventoryType);
|
||||
if (inventoryContainer == null)
|
||||
{
|
||||
case 14:
|
||||
return 0;
|
||||
case 8:
|
||||
num9 = (int)(itemSheet.GetRowOrDefault(itemId)?.StackSize ?? 0);
|
||||
num = ((num9 > 1) ? 2074514215 : 2074514219);
|
||||
break;
|
||||
case 10:
|
||||
inventoryType++;
|
||||
num = 2074514220;
|
||||
break;
|
||||
case 11:
|
||||
num7 = 0;
|
||||
num = 2074514213;
|
||||
break;
|
||||
case 1:
|
||||
inventorySlot = inventoryContainer->GetInventorySlot(num7);
|
||||
num = ((inventorySlot == null) ? 2074514214 : 2074514211);
|
||||
break;
|
||||
case 4:
|
||||
return num8;
|
||||
case 2:
|
||||
num8 = 0;
|
||||
inventoryType = InventoryType.Inventory1;
|
||||
num = 2074514220;
|
||||
break;
|
||||
case 6:
|
||||
num = ((inventorySlot->ItemId != itemId) ? 2074514214 : 2074514208);
|
||||
break;
|
||||
case 15:
|
||||
{
|
||||
int num11 = num8;
|
||||
int num12 = num9;
|
||||
num3 = inventorySlot->Quantity;
|
||||
num4 = num12;
|
||||
num3 = ~(~num4 + num3);
|
||||
num4 = num11;
|
||||
num8 = (num4 | num3) + (num4 & num3);
|
||||
num = 2074514214;
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
case 12:
|
||||
num = 2074514216;
|
||||
break;
|
||||
case 3:
|
||||
for (int i = 0; i < inventoryContainer->Size; i++)
|
||||
{
|
||||
int num10 = num7;
|
||||
num3 = 1;
|
||||
num4 = num10;
|
||||
num7 = (num4 | num3) + (num4 & num3);
|
||||
num = 2074514213;
|
||||
break;
|
||||
}
|
||||
case 7:
|
||||
inventoryContainer = ptr->GetInventoryContainer(inventoryType);
|
||||
num = ((inventoryContainer == null) ? 2074514223 : 2074514222);
|
||||
break;
|
||||
case 9:
|
||||
num = ((inventoryType <= InventoryType.Inventory4) ? 2074514210 : 2074514209);
|
||||
break;
|
||||
case 0:
|
||||
num = ((num7 < inventoryContainer->Size) ? 2074514212 : 2074514223);
|
||||
break;
|
||||
case 13:
|
||||
return 0;
|
||||
case 5:
|
||||
num = (((inventorySlot->Flags & InventoryItem.ItemFlags.HighQuality) != InventoryItem.ItemFlags.None) ? 2074514214 : 2074514218);
|
||||
break;
|
||||
InventoryItem* inventorySlot = inventoryContainer->GetInventorySlot(i);
|
||||
if (inventorySlot != null && inventorySlot->ItemId == itemId && (inventorySlot->Flags & InventoryItem.ItemFlags.HighQuality) == 0)
|
||||
{
|
||||
num2 += num - inventorySlot->Quantity;
|
||||
}
|
||||
}
|
||||
}
|
||||
return num2;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public static int GetMaxHoldableQuantity(uint itemId, ExcelSheet<Item> itemSheet)
|
||||
{
|
||||
_206A_202D_202D_202C_200F_206B_206C_202C_206D_202D_206C_200C_206B_202B_200C_200E_202C_200E_200F_206B_202B_202D_200F_202D_200B_200B_206D_206A_200C_200B_202D_206F_202C_200F_206C_206A_206A_206D_200E_200C_202E((object)itemSheet, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(-2041652730));
|
||||
ArgumentNullException.ThrowIfNull(itemSheet, "itemSheet");
|
||||
Item? rowOrDefault = itemSheet.GetRowOrDefault(itemId);
|
||||
int num = (rowOrDefault.HasValue ? (-1200966345) : (-1200966350));
|
||||
int stackSize = default(int);
|
||||
while (true)
|
||||
if (!rowOrDefault.HasValue)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1200966351;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 6:
|
||||
num = ((!rowOrDefault.Value.IsUnique) ? (-1200966349) : (-1200966352));
|
||||
break;
|
||||
case 1:
|
||||
return (GetItemCount(itemId, checkEquipped: true, checkArmory: true) <= 0) ? 1 : 0;
|
||||
case 4:
|
||||
return GetRemainingStackCapacity(itemId, itemSheet) + CountFreeInventorySlots() * stackSize;
|
||||
case 3:
|
||||
return 0;
|
||||
case 2:
|
||||
stackSize = (int)rowOrDefault.Value.StackSize;
|
||||
num = ((stackSize > 0) ? (-1200966347) : (-1200966348));
|
||||
break;
|
||||
case 0:
|
||||
num = -1200966350;
|
||||
break;
|
||||
case 5:
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
static void _206A_202D_202D_202C_200F_206B_206C_202C_206D_202D_206C_200C_206B_202B_200C_200E_202C_200E_200F_206B_202B_202D_200F_202D_200B_200B_206D_206A_200C_200B_202D_206F_202C_200F_206C_206A_206A_206D_200E_200C_202E(object P_0, string P_1)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(P_0, P_1);
|
||||
if (rowOrDefault.Value.IsUnique)
|
||||
{
|
||||
return (GetItemCount(itemId, checkEquipped: true, checkArmory: true) <= 0) ? 1 : 0;
|
||||
}
|
||||
int stackSize = (int)rowOrDefault.Value.StackSize;
|
||||
if (stackSize <= 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return GetRemainingStackCapacity(itemId, itemSheet) + CountFreeInventorySlots() * stackSize;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
using Dalamud.Plugin.Services;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
using Lumina.Excel.Sheets;
|
||||
|
|
@ -13,25 +11,11 @@ public readonly record struct ItemHandle(uint RawId)
|
|||
{
|
||||
get
|
||||
{
|
||||
int num = ((RawId >= 1000000) ? 357166028 : 357166029);
|
||||
while (true)
|
||||
if (RawId < 1000000)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 357166028;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 2:
|
||||
goto IL_004b;
|
||||
case 1:
|
||||
return RawId;
|
||||
case 0:
|
||||
return RawId % 1000000;
|
||||
}
|
||||
continue;
|
||||
IL_004b:
|
||||
num = 357166029;
|
||||
return RawId;
|
||||
}
|
||||
return RawId % 1000000;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -61,49 +45,21 @@ public readonly record struct ItemHandle(uint RawId)
|
|||
|
||||
public unsafe static ItemHandle FromInventorySlot(InventoryItem* slot)
|
||||
{
|
||||
int num = ((slot != null) ? (-1287272070) : (-1287272069));
|
||||
while (true)
|
||||
if (slot == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1287272070;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 2:
|
||||
goto IL_0043;
|
||||
case 0:
|
||||
return new ItemHandle(slot->ItemId);
|
||||
case 1:
|
||||
return new ItemHandle(0u);
|
||||
}
|
||||
continue;
|
||||
IL_0043:
|
||||
num = -1287272069;
|
||||
return new ItemHandle(0u);
|
||||
}
|
||||
return new ItemHandle(slot->ItemId);
|
||||
}
|
||||
|
||||
public unsafe int GetCount(bool checkEquipped = false, bool checkArmory = false)
|
||||
{
|
||||
InventoryManager* ptr = InventoryManager.Instance();
|
||||
int num = ((ptr != null) ? 991214794 : 991214795);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 991214794;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 2:
|
||||
goto IL_0049;
|
||||
case 0:
|
||||
return ptr->GetInventoryItemCount(Id, isHq: false, checkEquipped, checkArmory, 0) + ptr->GetInventoryItemCount(Id, isHq: true, checkEquipped, checkArmory, 0);
|
||||
case 1:
|
||||
return 0;
|
||||
}
|
||||
continue;
|
||||
IL_0049:
|
||||
num = 991214795;
|
||||
return 0;
|
||||
}
|
||||
return ptr->GetInventoryItemCount(Id, isHq: false, checkEquipped, checkArmory, 0) + ptr->GetInventoryItemCount(Id, isHq: true, checkEquipped, checkArmory, 0);
|
||||
}
|
||||
|
||||
public int GetCountInContainer(InventoryType container)
|
||||
|
|
@ -140,68 +96,4 @@ public readonly record struct ItemHandle(uint RawId)
|
|||
{
|
||||
return GetRow(dataManager)?.LevelItem.RowId ?? 0;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder stringBuilder = _206E_206E_206A_200B_206C_200B_202B_202B_200C_206E_206F_206C_206C_202A_200B_200B_200C_206D_206F_200E_206A_200E_202A_202B_206A_206D_200C_200E_206D_200D_202A_202D_206A_206C_200F_200C_206C_200F_202E_206E_202E();
|
||||
_200F_206B_200D_200E_206E_206A_206E_200F_206F_200C_200E_206E_206D_200E_200B_202C_202D_202E_200F_206D_202D_200C_206E_200D_206B_206D_206F_206A_200F_206E_202E_202A_206A_200B_200C_206C_206F_206B_200D_202A_202E(stringBuilder, global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(29412539));
|
||||
_200F_206B_200D_200E_206E_206A_206E_200F_206F_200C_200E_206E_206D_200E_200B_202C_202D_202E_200F_206D_202D_200C_206E_200D_206B_206D_206F_206A_200F_206E_202E_202A_206A_200B_200C_206C_206F_206B_200D_202A_202E(stringBuilder, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(1808631505));
|
||||
int num = ((!PrintMembers(stringBuilder)) ? 631534302 : 631534303);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 631534302;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 2:
|
||||
num = 631534303;
|
||||
break;
|
||||
case 1:
|
||||
_202C_200E_202D_200E_200E_200C_202C_206A_206B_206D_202C_206B_200E_200C_200E_202D_202D_206F_206B_206B_202A_200E_202E_206A_202B_206C_206E_200C_200F_206B_200B_200C_202A_200C_202E_200E_200E_206B_200C_206C_202E(stringBuilder, ' ');
|
||||
num = 631534302;
|
||||
break;
|
||||
case 0:
|
||||
_202C_200E_202D_200E_200E_200C_202C_206A_206B_206D_202C_206B_200E_200C_200E_202D_202D_206F_206B_206B_202A_200E_202E_206A_202B_206C_206E_200C_200F_206B_200B_200C_202A_200C_202E_200E_200E_206B_200C_206C_202E(stringBuilder, '}');
|
||||
return _200B_202B_206F_200F_200E_202E_206C_202B_206E_200B_206C_200B_202E_202E_206C_206F_206D_206A_202A_206B_206C_202B_200B_200C_206C_200F_202E_202B_200E_200B_202A_200D_200E_206F_200C_200F_202B_206B_206C_206E_202E((object)stringBuilder);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
private bool PrintMembers(StringBuilder builder)
|
||||
{
|
||||
_200F_206B_200D_200E_206E_206A_206E_200F_206F_200C_200E_206E_206D_200E_200B_202C_202D_202E_200F_206D_202D_200C_206E_200D_206B_206D_206F_206A_200F_206E_202E_202A_206A_200B_200C_206C_206F_206B_200D_202A_202E(builder, global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-595664961));
|
||||
_200F_206B_200D_200E_206E_206A_206E_200F_206F_200C_200E_206E_206D_200E_200B_202C_202D_202E_200F_206D_202D_200C_206E_200D_206B_206D_206F_206A_200F_206E_202E_202A_206A_200B_200C_206C_206F_206B_200D_202A_202E(builder, RawId.ToString());
|
||||
_200F_206B_200D_200E_206E_206A_206E_200F_206F_200C_200E_206E_206D_200E_200B_202C_202D_202E_200F_206D_202D_200C_206E_200D_206B_206D_206F_206A_200F_206E_202E_202A_206A_200B_200C_206C_206F_206B_200D_202A_202E(builder, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(-1970731150));
|
||||
_200F_206B_200D_200E_206E_206A_206E_200F_206F_200C_200E_206E_206D_200E_200B_202C_202D_202E_200F_206D_202D_200C_206E_200D_206B_206D_206F_206A_200F_206E_202E_202A_206A_200B_200C_206C_206F_206B_200D_202A_202E(builder, Id.ToString());
|
||||
_200F_206B_200D_200E_206E_206A_206E_200F_206F_200C_200E_206E_206D_200E_200B_202C_202D_202E_200F_206D_202D_200C_206E_200D_206B_206D_206F_206A_200F_206E_202E_202A_206A_200B_200C_206C_206F_206B_200D_202A_202E(builder, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(1700323707));
|
||||
_200F_206B_200D_200E_206E_206A_206E_200F_206F_200C_200E_206E_206D_200E_200B_202C_202D_202E_200F_206D_202D_200C_206E_200D_206B_206D_206F_206A_200F_206E_202E_202A_206A_200B_200C_206C_206F_206B_200D_202A_202E(builder, IsHq.ToString());
|
||||
return true;
|
||||
}
|
||||
|
||||
static StringBuilder _206E_206E_206A_200B_206C_200B_202B_202B_200C_206E_206F_206C_206C_202A_200B_200B_200C_206D_206F_200E_206A_200E_202A_202B_206A_206D_200C_200E_206D_200D_202A_202D_206A_206C_200F_200C_206C_200F_202E_206E_202E()
|
||||
{
|
||||
return new StringBuilder();
|
||||
}
|
||||
|
||||
static StringBuilder _200F_206B_200D_200E_206E_206A_206E_200F_206F_200C_200E_206E_206D_200E_200B_202C_202D_202E_200F_206D_202D_200C_206E_200D_206B_206D_206F_206A_200F_206E_202E_202A_206A_200B_200C_206C_206F_206B_200D_202A_202E(StringBuilder P_0, string P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static StringBuilder _202C_200E_202D_200E_200E_200C_202C_206A_206B_206D_202C_206B_200E_200C_200E_202D_202D_206F_206B_206B_202A_200E_202E_206A_202B_206C_206E_200C_200F_206B_200B_200C_202A_200C_202E_200E_200E_206B_200C_206C_202E(StringBuilder P_0, char P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static string _200B_202B_206F_200F_200E_202E_206C_202B_206E_200B_206C_200B_202E_202E_206C_206F_206D_206A_202A_206B_206C_202B_200B_200C_206C_200F_202E_202B_200E_200B_202A_200D_200E_206F_200C_200F_202B_206B_206C_206E_202E(object P_0)
|
||||
{
|
||||
return P_0.ToString();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
using Dalamud.Plugin.Services;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
|
@ -25,130 +23,6 @@ public sealed class DalamudLoggerProvider : ILoggerProvider, IDisposable, ISuppo
|
|||
public void Dispose()
|
||||
{
|
||||
}
|
||||
|
||||
void IDisposable.Dispose()
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in Dispose
|
||||
this.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
[CompilerGenerated]
|
||||
private sealed class _003C_003Ec__8<TState> where TState : notnull
|
||||
{
|
||||
public static readonly _003C_003Ec__8<TState> _003C_003E9 = new _003C_003Ec__8<TState>();
|
||||
|
||||
public static Action<object?, StringBuilder> _003C_003E9__8_0;
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
internal void _003CLog_003Eb__8_0(object? scope, StringBuilder builder)
|
||||
{
|
||||
int num;
|
||||
if (scope is IEnumerable<KeyValuePair<string, object>> enumerable)
|
||||
{
|
||||
IEnumerator<KeyValuePair<string, object>> enumerator = enumerable.GetEnumerator();
|
||||
try
|
||||
{
|
||||
num = 1757387982;
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1757387982;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
num = (_202E_200F_206A_200B_200E_206F_200D_206F_200E_202A_206D_200F_206F_202C_200F_206C_200F_202E_200E_200C_202C_200F_206F_200E_200B_200C_200B_202A_200F_206D_200E_206C_200B_206B_200C_202B_206C_200E_202D_206D_202E((IEnumerator)enumerator) ? 1757387983 : 1757387980);
|
||||
break;
|
||||
case 1:
|
||||
{
|
||||
KeyValuePair<string, object> current = enumerator.Current;
|
||||
_206C_206C_200B_206D_202D_206E_202E_202D_200E_206A_200E_200C_206E_206B_206A_200D_200C_200D_200E_206E_200B_202E_202E_206A_206A_206A_206E_200B_200E_200E_200D_200F_206F_200F_206F_202B_200C_206A_202E_202B_202E(_202B_202D_202A_202C_202B_200C_200F_202C_206A_206D_200E_202C_200C_200F_200E_200B_202B_206F_202E_200E_200C_200C_206F_206E_200E_206D_200D_202C_200C_206B_200E_202D_202C_202A_202E_200F_200E_200B_200D_200F_202E(_202E_202A_206C_206E_206F_202C_206D_206E_202C_200C_200C_202B_200E_202B_202B_200D_200E_200B_202B_206B_202B_206E_200C_206B_206E_206B_200E_202C_202C_202C_206E_206B_202A_206B_206A_200D_200B_200B_206F_202E_202E(_206C_206C_200B_206D_202D_206E_202E_202D_200E_206A_200E_200C_206E_206B_206A_200D_200C_200D_200E_206E_200B_202E_202E_206A_206A_206A_206E_200B_200E_200E_200D_200F_206F_200F_206F_202B_200C_206A_202E_202B_202E(_202E_202A_206C_206E_206F_202C_206D_206E_202C_200C_200C_202B_200E_202B_202B_200D_200E_200B_202B_206B_202B_206E_200C_206B_206E_206B_200E_202C_202C_202C_206E_206B_202A_206B_206A_200D_200B_200B_206F_202E_202E(builder, '<'), current.Key), '='), current.Value), global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(783152655));
|
||||
num = 1757387982;
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
num = 1757387982;
|
||||
break;
|
||||
case 2:
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
num = ((enumerator == null) ? 1601489106 : 1601489107);
|
||||
while (true)
|
||||
{
|
||||
int num7 = num;
|
||||
int num3 = 1601489106;
|
||||
int num4 = num7;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 2:
|
||||
num = 1601489107;
|
||||
break;
|
||||
case 1:
|
||||
_200E_202B_206E_200C_200B_200E_206F_200F_200B_206F_200B_202A_200D_206D_206C_202C_200D_200C_206F_200F_206C_206A_202B_206B_200C_206A_202E_206F_206B_200B_206F_202C_200E_202C_202D_202E_206A_202D_206F_206B_202E((IDisposable)enumerator);
|
||||
num = 1601489106;
|
||||
break;
|
||||
case 0:
|
||||
goto end_IL_00e6;
|
||||
}
|
||||
continue;
|
||||
end_IL_00e6:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
num = ((scope == null) ? (-1655192650) : (-1655192651));
|
||||
while (true)
|
||||
{
|
||||
int num8 = num;
|
||||
int num3 = -1655192649;
|
||||
int num4 = num8;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
num = -1655192651;
|
||||
break;
|
||||
case 2:
|
||||
_206C_206C_200B_206D_202D_206E_202E_202D_200E_206A_200E_200C_206E_206B_206A_200D_200C_200D_200E_206E_200B_202E_202E_206A_206A_206A_206E_200B_200E_200E_200D_200F_206F_200F_206F_202B_200C_206A_202E_202B_202E(_202B_202D_202A_202C_202B_200C_200F_202C_206A_206D_200E_202C_200C_200F_200E_200B_202B_206F_202E_200E_200C_200C_206F_206E_200E_206D_200D_202C_200C_206B_200E_202D_202C_202A_202E_200F_200E_200B_200D_200F_202E(_202E_202A_206C_206E_206F_202C_206D_206E_202C_200C_200C_202B_200E_202B_202B_200D_200E_200B_202B_206B_202B_206E_200C_206B_206E_206B_200E_202C_202C_202C_206E_206B_202A_206B_206A_200D_200B_200B_206F_202E_202E(builder, '<'), scope), global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(783152655));
|
||||
num = -1655192650;
|
||||
break;
|
||||
case 1:
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static StringBuilder _202E_202A_206C_206E_206F_202C_206D_206E_202C_200C_200C_202B_200E_202B_202B_200D_200E_200B_202B_206B_202B_206E_200C_206B_206E_206B_200E_202C_202C_202C_206E_206B_202A_206B_206A_200D_200B_200B_206F_202E_202E(StringBuilder P_0, char P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static StringBuilder _206C_206C_200B_206D_202D_206E_202E_202D_200E_206A_200E_200C_206E_206B_206A_200D_200C_200D_200E_206E_200B_202E_202E_206A_206A_206A_206E_200B_200E_200E_200D_200F_206F_200F_206F_202B_200C_206A_202E_202B_202E(StringBuilder P_0, string P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static StringBuilder _202B_202D_202A_202C_202B_200C_200F_202C_206A_206D_200E_202C_200C_200F_200E_200B_202B_206F_202E_200E_200C_200C_206F_206E_200E_206D_200D_202C_200C_206B_200E_202D_202C_202A_202E_200F_200E_200B_200D_200F_202E(StringBuilder P_0, object P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static bool _202E_200F_206A_200B_200E_206F_200D_206F_200E_202A_206D_200F_206F_202C_200F_206C_200F_202E_200E_200C_202C_200F_206F_200E_200B_200C_200B_202A_200F_206D_200E_206C_200B_206B_200C_202B_206C_200E_202D_206D_202E(IEnumerator P_0)
|
||||
{
|
||||
return P_0.MoveNext();
|
||||
}
|
||||
|
||||
static void _200E_202B_206E_200C_200B_200E_206F_200F_200B_206F_200B_202A_200D_206D_206C_202C_200D_200C_206F_200F_206C_206A_202B_206B_200C_206A_202E_206F_206B_200B_206F_202C_200E_202C_202D_202E_206A_202D_206F_206B_202E(IDisposable P_0)
|
||||
{
|
||||
P_0.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
private readonly string? _name;
|
||||
|
|
@ -168,309 +42,66 @@ public sealed class DalamudLoggerProvider : ILoggerProvider, IDisposable, ISuppo
|
|||
|
||||
public IDisposable BeginScope<TState>(TState state) where TState : notnull
|
||||
{
|
||||
IExternalScopeProvider? scopeProvider = ScopeProvider;
|
||||
return ((scopeProvider != null) ? _200D_200D_200D_200D_202E_202C_202B_202A_200D_206C_202C_202B_206E_200C_202A_200F_202E_200C_202C_202D_206B_206A_206D_206C_206B_200D_200B_202E_206B_200B_202A_202E_200B_200F_206D_206C_202A_200F_200F_202E(scopeProvider, (object)state) : null) ?? NullScope.Instance;
|
||||
}
|
||||
|
||||
IDisposable ILogger.BeginScope<TState>(TState state)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in BeginScope
|
||||
return this.BeginScope<TState>(state);
|
||||
return ScopeProvider?.Push(state) ?? NullScope.Instance;
|
||||
}
|
||||
|
||||
public bool IsEnabled(LogLevel logLevel)
|
||||
{
|
||||
int num = ((logLevel != LogLevel.None) ? 833573961 : 833573962);
|
||||
while (true)
|
||||
if (logLevel == LogLevel.None)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 833573960;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0042;
|
||||
case 1:
|
||||
return ToSerilogLevel(logLevel) >= _200C_202A_200F_206D_200B_200B_206C_206B_202D_202A_206F_206A_202E_200E_200E_202B_202A_202B_200F_202E_206E_200C_206D_202C_200B_202E_206B_206B_202B_202C_202D_206B_202B_200C_202E_206A_202E_202B_202C_206B_202E(_pluginLog);
|
||||
case 2:
|
||||
return false;
|
||||
}
|
||||
continue;
|
||||
IL_0042:
|
||||
num = 833573962;
|
||||
return false;
|
||||
}
|
||||
return ToSerilogLevel(logLevel) >= _pluginLog.MinimumLogLevel;
|
||||
}
|
||||
|
||||
bool ILogger.IsEnabled(LogLevel logLevel)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in IsEnabled
|
||||
return this.IsEnabled(logLevel);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
|
||||
{
|
||||
int num = (IsEnabled(logLevel) ? (-262151412) : (-262151415));
|
||||
StringBuilder stringBuilder = default(StringBuilder);
|
||||
LogEventLevel logEventLevel = default(LogEventLevel);
|
||||
while (true)
|
||||
if (!IsEnabled(logLevel))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -262151412;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
default:
|
||||
continue;
|
||||
case 4:
|
||||
num = -262151415;
|
||||
continue;
|
||||
case 3:
|
||||
_202D_206F_206C_206C_206A_202A_200D_200F_206B_200B_206A_206D_200D_206E_200F_202D_202B_206F_202E_200F_200E_206C_206F_206A_206D_206C_206C_200C_206A_202A_206F_206F_206E_206C_202E_200B_206A_202A_206B_200F_202E(stringBuilder, formatter(state, null));
|
||||
_202B_202B_202B_200F_202D_200E_202B_206B_200C_206E_200B_206E_206E_202A_202D_206C_200B_200F_202E_206B_200B_202D_206F_200D_200E_202D_206A_202E_200E_202C_202E_202E_206C_202A_202B_206F_206A_206C_206B_206A_202E(_pluginLog, logEventLevel, exception, _202E_202E_206E_200E_200D_200E_206F_202D_202D_202D_200D_200C_202D_200B_202A_200F_202E_202B_200F_206E_202B_200E_200B_206E_202A_206B_202B_200D_202C_206F_202A_202E_202E_206C_202E_202E_200C_200F_200B_206C_202E((object)stringBuilder), Array.Empty<object>());
|
||||
return;
|
||||
case 0:
|
||||
{
|
||||
_206B_206F_202E_206A_200C_200F_200F_200B_206E_202C_206C_206F_200B_206A_202D_202B_202E_200D_202B_206B_206F_206A_202A_206A_206B_206E_206D_200D_206E_206C_200D_202C_206F_206E_200D_206A_200D_200B_200E_202D_202E((object)formatter, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(134909540));
|
||||
logEventLevel = ToSerilogLevel(logLevel);
|
||||
stringBuilder = _206B_206B_202C_206B_206D_200B_206F_202A_206D_200D_200F_200C_202A_200D_202E_206E_202A_206E_202A_202B_206F_202C_202B_206D_202E_206E_202D_200F_202B_206C_202C_200F_200D_206F_200E_206A_200C_200F_206D_202E();
|
||||
IExternalScopeProvider? scopeProvider = ScopeProvider;
|
||||
if (scopeProvider == null)
|
||||
{
|
||||
break;
|
||||
}
|
||||
scopeProvider.ForEachScope([MethodImpl(MethodImplOptions.NoInlining)] (object? scope, StringBuilder builder) =>
|
||||
{
|
||||
int num5;
|
||||
if (scope is IEnumerable<KeyValuePair<string, object>> enumerable)
|
||||
{
|
||||
IEnumerator<KeyValuePair<string, object>> enumerator = enumerable.GetEnumerator();
|
||||
try
|
||||
{
|
||||
num5 = 1757387982;
|
||||
while (true)
|
||||
{
|
||||
int num6 = num5;
|
||||
int num7 = 1757387982;
|
||||
int num8 = num6;
|
||||
int num9 = num8 + num7;
|
||||
int num10 = num8 & num7;
|
||||
switch (num9 - (num10 + num10))
|
||||
{
|
||||
case 0:
|
||||
num5 = (_003C_003Ec__8<TState>._202E_200F_206A_200B_200E_206F_200D_206F_200E_202A_206D_200F_206F_202C_200F_206C_200F_202E_200E_200C_202C_200F_206F_200E_200B_200C_200B_202A_200F_206D_200E_206C_200B_206B_200C_202B_206C_200E_202D_206D_202E((IEnumerator)enumerator) ? 1757387983 : 1757387980);
|
||||
break;
|
||||
case 1:
|
||||
{
|
||||
KeyValuePair<string, object> current = enumerator.Current;
|
||||
_003C_003Ec__8<TState>._206C_206C_200B_206D_202D_206E_202E_202D_200E_206A_200E_200C_206E_206B_206A_200D_200C_200D_200E_206E_200B_202E_202E_206A_206A_206A_206E_200B_200E_200E_200D_200F_206F_200F_206F_202B_200C_206A_202E_202B_202E(_003C_003Ec__8<TState>._202B_202D_202A_202C_202B_200C_200F_202C_206A_206D_200E_202C_200C_200F_200E_200B_202B_206F_202E_200E_200C_200C_206F_206E_200E_206D_200D_202C_200C_206B_200E_202D_202C_202A_202E_200F_200E_200B_200D_200F_202E(_003C_003Ec__8<TState>._202E_202A_206C_206E_206F_202C_206D_206E_202C_200C_200C_202B_200E_202B_202B_200D_200E_200B_202B_206B_202B_206E_200C_206B_206E_206B_200E_202C_202C_202C_206E_206B_202A_206B_206A_200D_200B_200B_206F_202E_202E(_003C_003Ec__8<TState>._206C_206C_200B_206D_202D_206E_202E_202D_200E_206A_200E_200C_206E_206B_206A_200D_200C_200D_200E_206E_200B_202E_202E_206A_206A_206A_206E_200B_200E_200E_200D_200F_206F_200F_206F_202B_200C_206A_202E_202B_202E(_003C_003Ec__8<TState>._202E_202A_206C_206E_206F_202C_206D_206E_202C_200C_200C_202B_200E_202B_202B_200D_200E_200B_202B_206B_202B_206E_200C_206B_206E_206B_200E_202C_202C_202C_206E_206B_202A_206B_206A_200D_200B_200B_206F_202E_202E(builder, '<'), current.Key), '='), current.Value), global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(783152655));
|
||||
num5 = 1757387982;
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
num5 = 1757387982;
|
||||
break;
|
||||
case 2:
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
num5 = ((enumerator == null) ? 1601489106 : 1601489107);
|
||||
while (true)
|
||||
{
|
||||
int num11 = num5;
|
||||
int num7 = 1601489106;
|
||||
int num8 = num11;
|
||||
switch ((num8 | num7) - (num8 & num7))
|
||||
{
|
||||
case 2:
|
||||
num5 = 1601489107;
|
||||
break;
|
||||
case 1:
|
||||
_003C_003Ec__8<TState>._200E_202B_206E_200C_200B_200E_206F_200F_200B_206F_200B_202A_200D_206D_206C_202C_200D_200C_206F_200F_206C_206A_202B_206B_200C_206A_202E_206F_206B_200B_206F_202C_200E_202C_202D_202E_206A_202D_206F_206B_202E((IDisposable)enumerator);
|
||||
num5 = 1601489106;
|
||||
break;
|
||||
case 0:
|
||||
goto end_IL_00e6;
|
||||
}
|
||||
continue;
|
||||
end_IL_00e6:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
num5 = ((scope == null) ? (-1655192650) : (-1655192651));
|
||||
while (true)
|
||||
{
|
||||
int num12 = num5;
|
||||
int num7 = -1655192649;
|
||||
int num8 = num12;
|
||||
switch ((num8 | num7) - (num8 & num7))
|
||||
{
|
||||
case 0:
|
||||
num5 = -1655192651;
|
||||
break;
|
||||
case 2:
|
||||
_003C_003Ec__8<TState>._206C_206C_200B_206D_202D_206E_202E_202D_200E_206A_200E_200C_206E_206B_206A_200D_200C_200D_200E_206E_200B_202E_202E_206A_206A_206A_206E_200B_200E_200E_200D_200F_206F_200F_206F_202B_200C_206A_202E_202B_202E(_003C_003Ec__8<TState>._202B_202D_202A_202C_202B_200C_200F_202C_206A_206D_200E_202C_200C_200F_200E_200B_202B_206F_202E_200E_200C_200C_206F_206E_200E_206D_200D_202C_200C_206B_200E_202D_202C_202A_202E_200F_200E_200B_200D_200F_202E(_003C_003Ec__8<TState>._202E_202A_206C_206E_206F_202C_206D_206E_202C_200C_200C_202B_200E_202B_202B_200D_200E_200B_202B_206B_202B_206E_200C_206B_206E_206B_200E_202C_202C_202C_206E_206B_202A_206B_206A_200D_200B_200B_206F_202E_202E(builder, '<'), scope), global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(783152655));
|
||||
num5 = -1655192650;
|
||||
break;
|
||||
case 1:
|
||||
return;
|
||||
}
|
||||
}
|
||||
}, stringBuilder);
|
||||
num = -262151411;
|
||||
continue;
|
||||
}
|
||||
case 5:
|
||||
return;
|
||||
case 2:
|
||||
_202D_206F_206C_206C_206A_202A_200D_200F_206B_200B_206A_206D_200D_206E_200F_202D_202B_206F_202E_200F_200E_206C_206F_206A_206D_206C_206C_200C_206A_202A_206F_206F_206E_206C_202E_200B_206A_202A_206B_200F_202E(_202D_206F_206C_206C_206A_202A_200D_200F_206B_200B_206A_206D_200D_206E_200F_202D_202B_206F_202E_200F_200E_206C_206F_206A_206D_206C_206C_200C_206A_202A_206F_206F_206E_206C_202E_200B_206A_202A_206B_200F_202E(stringBuilder, _name), global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(-1104179104));
|
||||
num = -262151409;
|
||||
continue;
|
||||
case 1:
|
||||
break;
|
||||
}
|
||||
num = (_202C_202D_200B_206A_200B_200F_206C_200D_200D_202E_200B_206F_202B_200F_200E_206E_202B_200F_200D_206D_206E_206D_206B_206A_200E_200C_200B_202C_206A_206D_206F_202A_200C_200B_202C_202D_202C_200D_206F_206C_202E(_name) ? (-262151409) : (-262151410));
|
||||
return;
|
||||
}
|
||||
ArgumentNullException.ThrowIfNull(formatter, "formatter");
|
||||
LogEventLevel level = ToSerilogLevel(logLevel);
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
ScopeProvider?.ForEachScope(delegate(object? scope, StringBuilder builder)
|
||||
{
|
||||
if (scope is IEnumerable<KeyValuePair<string, object>> enumerable)
|
||||
{
|
||||
{
|
||||
foreach (KeyValuePair<string, object> item in enumerable)
|
||||
{
|
||||
builder.Append('<').Append(item.Key).Append('=')
|
||||
.Append(item.Value)
|
||||
.Append("> ");
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (scope != null)
|
||||
{
|
||||
builder.Append('<').Append(scope).Append("> ");
|
||||
}
|
||||
}, stringBuilder);
|
||||
if (!string.IsNullOrEmpty(_name))
|
||||
{
|
||||
stringBuilder.Append(_name).Append(": ");
|
||||
}
|
||||
stringBuilder.Append(formatter(state, null));
|
||||
_pluginLog.Write(level, exception, stringBuilder.ToString());
|
||||
}
|
||||
|
||||
void ILogger.Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in Log
|
||||
this.Log<TState>(logLevel, eventId, state, exception, formatter);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
private static LogEventLevel ToSerilogLevel(LogLevel logLevel)
|
||||
{
|
||||
int num;
|
||||
LogEventLevel result = default(LogEventLevel);
|
||||
switch (logLevel)
|
||||
return logLevel switch
|
||||
{
|
||||
default:
|
||||
num = -1396162966;
|
||||
goto IL_0029;
|
||||
case LogLevel.Critical:
|
||||
result = LogEventLevel.Fatal;
|
||||
num = -1396162971;
|
||||
goto IL_0029;
|
||||
case LogLevel.Error:
|
||||
goto IL_007b;
|
||||
case LogLevel.Information:
|
||||
goto IL_0093;
|
||||
case LogLevel.Debug:
|
||||
goto IL_00ab;
|
||||
case LogLevel.Warning:
|
||||
goto IL_00b8;
|
||||
case LogLevel.Trace:
|
||||
goto IL_00dc;
|
||||
IL_0029:
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1396162973;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 4:
|
||||
goto end_IL_0029;
|
||||
case 6:
|
||||
return result;
|
||||
case 1:
|
||||
goto IL_007b;
|
||||
case 9:
|
||||
num = -1396162975;
|
||||
break;
|
||||
case 7:
|
||||
goto IL_0093;
|
||||
case 8:
|
||||
num = -1396162966;
|
||||
break;
|
||||
case 0:
|
||||
goto IL_00ab;
|
||||
case 5:
|
||||
goto IL_00b8;
|
||||
case 2:
|
||||
throw _200C_206F_206D_200F_202B_206C_200D_202B_202A_200F_200C_202A_206C_202E_200C_202C_206C_206C_206A_206A_206B_202D_206B_206F_206D_206F_206C_206B_206D_206C_202E_206C_206D_206C_200C_202A_200D_202E_206A_206B_202E(global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(1228083926), (object)logLevel, (string)null);
|
||||
case 3:
|
||||
goto IL_00dc;
|
||||
}
|
||||
continue;
|
||||
end_IL_0029:
|
||||
break;
|
||||
}
|
||||
goto case LogLevel.Critical;
|
||||
IL_00dc:
|
||||
result = LogEventLevel.Verbose;
|
||||
num = -1396162971;
|
||||
goto IL_0029;
|
||||
IL_00b8:
|
||||
result = LogEventLevel.Warning;
|
||||
num = -1396162971;
|
||||
goto IL_0029;
|
||||
IL_00ab:
|
||||
result = LogEventLevel.Debug;
|
||||
num = -1396162971;
|
||||
goto IL_0029;
|
||||
IL_0093:
|
||||
result = LogEventLevel.Information;
|
||||
num = -1396162971;
|
||||
goto IL_0029;
|
||||
IL_007b:
|
||||
result = LogEventLevel.Error;
|
||||
num = -1396162971;
|
||||
goto IL_0029;
|
||||
}
|
||||
}
|
||||
|
||||
static IDisposable _200D_200D_200D_200D_202E_202C_202B_202A_200D_206C_202C_202B_206E_200C_202A_200F_202E_200C_202C_202D_206B_206A_206D_206C_206B_200D_200B_202E_206B_200B_202A_202E_200B_200F_206D_206C_202A_200F_200F_202E(IExternalScopeProvider P_0, object P_1)
|
||||
{
|
||||
return P_0.Push(P_1);
|
||||
}
|
||||
|
||||
static LogEventLevel _200C_202A_200F_206D_200B_200B_206C_206B_202D_202A_206F_206A_202E_200E_200E_202B_202A_202B_200F_202E_206E_200C_206D_202C_200B_202E_206B_206B_202B_202C_202D_206B_202B_200C_202E_206A_202E_202B_202C_206B_202E(IPluginLog P_0)
|
||||
{
|
||||
return P_0.MinimumLogLevel;
|
||||
}
|
||||
|
||||
static void _206B_206F_202E_206A_200C_200F_200F_200B_206E_202C_206C_206F_200B_206A_202D_202B_202E_200D_202B_206B_206F_206A_202A_206A_206B_206E_206D_200D_206E_206C_200D_202C_206F_206E_200D_206A_200D_200B_200E_202D_202E(object P_0, string P_1)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(P_0, P_1);
|
||||
}
|
||||
|
||||
static StringBuilder _206B_206B_202C_206B_206D_200B_206F_202A_206D_200D_200F_200C_202A_200D_202E_206E_202A_206E_202A_202B_206F_202C_202B_206D_202E_206E_202D_200F_202B_206C_202C_200F_200D_206F_200E_206A_200C_200F_206D_202E()
|
||||
{
|
||||
return new StringBuilder();
|
||||
}
|
||||
|
||||
static bool _202C_202D_200B_206A_200B_200F_206C_200D_200D_202E_200B_206F_202B_200F_200E_206E_202B_200F_200D_206D_206E_206D_206B_206A_200E_200C_200B_202C_206A_206D_206F_202A_200C_200B_202C_202D_202C_200D_206F_206C_202E(string P_0)
|
||||
{
|
||||
return string.IsNullOrEmpty(P_0);
|
||||
}
|
||||
|
||||
static StringBuilder _202D_206F_206C_206C_206A_202A_200D_200F_206B_200B_206A_206D_200D_206E_200F_202D_202B_206F_202E_200F_200E_206C_206F_206A_206D_206C_206C_200C_206A_202A_206F_206F_206E_206C_202E_200B_206A_202A_206B_200F_202E(StringBuilder P_0, string P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static string _202E_202E_206E_200E_200D_200E_206F_202D_202D_202D_200D_200C_202D_200B_202A_200F_202E_202B_200F_206E_202B_200E_200B_206E_202A_206B_202B_200D_202C_206F_202A_202E_202E_206C_202E_202E_200C_200F_200B_206C_202E(object P_0)
|
||||
{
|
||||
return P_0.ToString();
|
||||
}
|
||||
|
||||
static void _202B_202B_202B_200F_202D_200E_202B_206B_200C_206E_200B_206E_206E_202A_202D_206C_200B_200F_202E_206B_200B_202D_206F_200D_200E_202D_206A_202E_200E_202C_202E_202E_206C_202A_202B_206F_206A_206C_206B_206A_202E(IPluginLog P_0, LogEventLevel P_1, Exception P_2, string P_3, object[] P_4)
|
||||
{
|
||||
P_0.Write(P_1, P_2, P_3, P_4);
|
||||
}
|
||||
|
||||
static ArgumentOutOfRangeException _200C_206F_206D_200F_202B_206C_200D_202B_202A_200F_200C_202A_206C_202E_200C_202C_206C_206C_206A_206A_206B_202D_206B_206F_206D_206F_206C_206B_206D_206C_202E_206C_206D_206C_200C_202A_200D_202E_206A_206B_202E(string P_0, object P_1, string P_2)
|
||||
{
|
||||
return new ArgumentOutOfRangeException(P_0, P_1, P_2);
|
||||
LogLevel.Trace => LogEventLevel.Verbose,
|
||||
LogLevel.Debug => LogEventLevel.Debug,
|
||||
LogLevel.Information => LogEventLevel.Information,
|
||||
LogLevel.Warning => LogEventLevel.Warning,
|
||||
LogLevel.Error => LogEventLevel.Error,
|
||||
LogLevel.Critical => LogEventLevel.Fatal,
|
||||
_ => throw new ArgumentOutOfRangeException("logLevel", logLevel, null),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -480,10 +111,9 @@ public sealed class DalamudLoggerProvider : ILoggerProvider, IDisposable, ISuppo
|
|||
|
||||
private IExternalScopeProvider? _scopeProvider;
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public DalamudLoggerProvider(IPluginLog pluginLog, Func<string, string?>? categoryNameFormatter = null)
|
||||
{
|
||||
_200B_206D_206B_206A_202A_206D_200B_206F_202B_206A_200C_206F_206E_206E_206B_206E_200C_206E_200E_206F_206B_202E_200E_200B_200E_202E_202A_206B_202D_206D_200F_200F_200F_200E_206E_206C_206B_200D_206B_200C_202E((object)pluginLog, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(1117547694));
|
||||
ArgumentNullException.ThrowIfNull(pluginLog, "pluginLog");
|
||||
_pluginLog = pluginLog;
|
||||
_categoryNameFormatter = categoryNameFormatter ?? ((Func<string, string>)((string t) => t));
|
||||
}
|
||||
|
|
@ -491,100 +121,32 @@ public sealed class DalamudLoggerProvider : ILoggerProvider, IDisposable, ISuppo
|
|||
public ILogger CreateLogger(string categoryName)
|
||||
{
|
||||
string name = _categoryNameFormatter(categoryName);
|
||||
int num = ((!LooksObfuscated(name)) ? (-1377550317) : (-1377550318));
|
||||
while (true)
|
||||
if (LooksObfuscated(name))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1377550317;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
return new DalamudLogger(name, this, _pluginLog);
|
||||
case 1:
|
||||
name = null;
|
||||
num = -1377550317;
|
||||
break;
|
||||
case 2:
|
||||
num = -1377550318;
|
||||
break;
|
||||
}
|
||||
name = null;
|
||||
}
|
||||
}
|
||||
|
||||
ILogger ILoggerProvider.CreateLogger(string categoryName)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in CreateLogger
|
||||
return this.CreateLogger(categoryName);
|
||||
return new DalamudLogger(name, this, _pluginLog);
|
||||
}
|
||||
|
||||
private static bool LooksObfuscated(string? name)
|
||||
{
|
||||
int num = ((!_200B_202E_206E_206B_206D_202D_206E_200F_206A_202A_200C_200B_200C_206D_202E_206E_206A_202A_202A_202E_206A_206A_202A_200F_200E_206A_202D_202A_206A_206E_206F_202A_206F_200B_202D_206A_202E_202D_202E_200F_202E(name)) ? (-1967590757) : (-1967590764));
|
||||
char c = default(char);
|
||||
string text = default(string);
|
||||
int num5 = default(int);
|
||||
UnicodeCategory unicodeCategory = default(UnicodeCategory);
|
||||
bool flag = default(bool);
|
||||
while (true)
|
||||
if (string.IsNullOrEmpty(name))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1967590755;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
return false;
|
||||
}
|
||||
foreach (char c in name)
|
||||
{
|
||||
if (char.IsControl(c))
|
||||
{
|
||||
case 4:
|
||||
c = _202A_206E_202A_206B_206B_200B_206B_206A_200E_206E_202B_206B_200D_200B_200F_202B_206F_206C_200E_200B_202D_200E_206D_200C_202A_202B_206D_200E_206A_206E_200D_200E_202A_206C_206D_206A_200D_206E_200E_202A_202E(text, num5);
|
||||
num = ((!char.IsControl(c)) ? (-1967590758) : (-1967590756));
|
||||
break;
|
||||
case 11:
|
||||
return false;
|
||||
case 2:
|
||||
return true;
|
||||
case 7:
|
||||
unicodeCategory = _200D_200D_206D_200C_200F_206D_200D_200F_206F_202C_200C_200B_202B_206B_206C_206C_206F_206B_206B_206A_206E_206A_202D_206B_202B_202E_202D_206D_206C_202D_206C_202E_200B_200F_202E_206D_200D_200E_202A_202D_202E(c);
|
||||
num = (((uint)(unicodeCategory - 15) <= 2u) ? (-1967590768) : (-1967590767));
|
||||
break;
|
||||
case 3:
|
||||
num = ((!flag) ? (-1967590755) : (-1967590753));
|
||||
break;
|
||||
case 5:
|
||||
num = ((num5 < _206C_206E_200B_206A_200F_202D_202B_206F_206B_206B_206A_206A_202B_202A_202B_206A_202D_206A_206F_202A_206B_206A_206B_206B_202D_206D_206E_200F_202E_206E_202E_200F_202D_206A_206D_206F_200F_200D_202E_202E(text)) ? (-1967590759) : (-1967590762));
|
||||
break;
|
||||
case 8:
|
||||
flag = false;
|
||||
num = -1967590754;
|
||||
break;
|
||||
case 0:
|
||||
{
|
||||
int num6 = num5;
|
||||
num3 = 1;
|
||||
num4 = num6;
|
||||
num5 = (num4 | num3) + (num4 & num3);
|
||||
num = -1967590760;
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
UnicodeCategory unicodeCategory = CharUnicodeInfo.GetUnicodeCategory(c);
|
||||
if (((uint)(unicodeCategory - 15) <= 2u || unicodeCategory == UnicodeCategory.OtherNotAssigned) ? true : false)
|
||||
{
|
||||
return true;
|
||||
case 9:
|
||||
return false;
|
||||
case 10:
|
||||
num = -1967590764;
|
||||
break;
|
||||
case 12:
|
||||
num = ((unicodeCategory != UnicodeCategory.OtherNotAssigned) ? (-1967590763) : (-1967590768));
|
||||
break;
|
||||
case 6:
|
||||
text = name;
|
||||
num5 = 0;
|
||||
num = -1967590760;
|
||||
break;
|
||||
case 13:
|
||||
flag = true;
|
||||
num = -1967590754;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void SetScopeProvider(IExternalScopeProvider scopeProvider)
|
||||
|
|
@ -592,44 +154,7 @@ public sealed class DalamudLoggerProvider : ILoggerProvider, IDisposable, ISuppo
|
|||
_scopeProvider = scopeProvider;
|
||||
}
|
||||
|
||||
void ISupportExternalScope.SetScopeProvider(IExternalScopeProvider scopeProvider)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in SetScopeProvider
|
||||
this.SetScopeProvider(scopeProvider);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
|
||||
void IDisposable.Dispose()
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in Dispose
|
||||
this.Dispose();
|
||||
}
|
||||
|
||||
static void _200B_206D_206B_206A_202A_206D_200B_206F_202B_206A_200C_206F_206E_206E_206B_206E_200C_206E_200E_206F_206B_202E_200E_200B_200E_202E_202A_206B_202D_206D_200F_200F_200F_200E_206E_206C_206B_200D_206B_200C_202E(object P_0, string P_1)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(P_0, P_1);
|
||||
}
|
||||
|
||||
static bool _200B_202E_206E_206B_206D_202D_206E_200F_206A_202A_200C_200B_200C_206D_202E_206E_206A_202A_202A_202E_206A_206A_202A_200F_200E_206A_202D_202A_206A_206E_206F_202A_206F_200B_202D_206A_202E_202D_202E_200F_202E(string P_0)
|
||||
{
|
||||
return string.IsNullOrEmpty(P_0);
|
||||
}
|
||||
|
||||
static char _202A_206E_202A_206B_206B_200B_206B_206A_200E_206E_202B_206B_200D_200B_200F_202B_206F_206C_200E_200B_202D_200E_206D_200C_202A_202B_206D_200E_206A_206E_200D_200E_202A_206C_206D_206A_200D_206E_200E_202A_202E(string P_0, int P_1)
|
||||
{
|
||||
return P_0[P_1];
|
||||
}
|
||||
|
||||
static UnicodeCategory _200D_200D_206D_200C_200F_206D_200D_200F_206F_202C_200C_200B_202B_206B_206C_206C_206F_206B_206B_206A_206E_206A_202D_206B_202B_202E_202D_206D_206C_202D_206C_202E_200B_200F_202E_206D_200D_200E_202A_202D_202E(char P_0)
|
||||
{
|
||||
return CharUnicodeInfo.GetUnicodeCategory(P_0);
|
||||
}
|
||||
|
||||
static int _206C_206E_200B_206A_200F_202D_202B_206F_206B_206B_206A_206A_202B_202A_202B_206A_202D_206A_206F_202A_206B_206A_206B_206B_202D_206D_206E_200F_202E_206E_202E_200F_202D_206A_206D_206F_200F_200D_202E_202E(string P_0)
|
||||
{
|
||||
return P_0.Length;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,109 +1,3 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
|
||||
namespace LLib.Movement.Unstuck;
|
||||
|
||||
public readonly record struct RecoveryDecision(RecoveryDecisionKind Kind, IRecoveryRung? Rung, RecoveryExhaustion? Exhaustion)
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder stringBuilder = _200C_206E_200E_206B_206B_202E_200D_206B_200B_200F_206F_206D_206F_200C_206A_206C_202A_206E_206D_200B_200F_202B_200B_206A_206D_206E_202E_206F_200D_206F_206F_202E_206E_202A_206B_200D_202A_202D_206C_200F_202E();
|
||||
_200C_202E_202C_206A_200C_206A_202A_206D_206E_206D_206A_206F_206F_206C_202C_206B_206A_202E_206F_202B_200D_200B_206F_202B_206F_206B_206E_200E_200F_206A_200E_202A_202C_202D_200C_202B_206C_206B_206D_202D_202E(stringBuilder, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(74641930));
|
||||
_200C_202E_202C_206A_200C_206A_202A_206D_206E_206D_206A_206F_206F_206C_202C_206B_206A_202E_206F_202B_200D_200B_206F_202B_206F_206B_206E_200E_200F_206A_200E_202A_202C_202D_200C_202B_206C_206B_206D_202D_202E(stringBuilder, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(1581517409));
|
||||
int num = ((!PrintMembers(stringBuilder)) ? 836946002 : 836946003);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 836946002;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 2:
|
||||
num = 836946003;
|
||||
break;
|
||||
case 0:
|
||||
_200F_202E_206E_202E_202C_206A_206D_200E_200B_206C_206C_206B_206F_206F_206F_206D_200C_202C_200D_200D_200D_202D_200B_202A_206C_202B_200B_200C_200C_206D_200D_206A_202A_200D_200D_202E_206D_206F_202E_202C_202E(stringBuilder, '}');
|
||||
return _200B_206A_206D_200D_206C_200B_206A_200E_206E_206D_200F_202C_200D_206A_202B_202C_202D_200B_206D_200B_200B_202A_202D_206B_202D_206B_206A_202B_206D_202A_206D_202C_202A_200B_206C_200D_200F_200C_200D_200C_202E((object?)stringBuilder);
|
||||
case 1:
|
||||
_200F_202E_206E_202E_202C_206A_206D_200E_200B_206C_206C_206B_206F_206F_206F_206D_200C_202C_200D_200D_200D_202D_200B_202A_206C_202B_200B_200C_200C_206D_200D_206A_202A_200D_200D_202E_206D_206F_202E_202C_202E(stringBuilder, ' ');
|
||||
num = 836946002;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
private bool PrintMembers(StringBuilder builder)
|
||||
{
|
||||
_200C_202E_202C_206A_200C_206A_202A_206D_206E_206D_206A_206F_206F_206C_202C_206B_206A_202E_206F_202B_200D_200B_206F_202B_206F_206B_206E_200E_200F_206A_200E_202A_202C_202D_200C_202B_206C_206B_206D_202D_202E(builder, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(-409624799));
|
||||
_200C_202E_202C_206A_200C_206A_202A_206D_206E_206D_206A_206F_206F_206C_202C_206B_206A_202E_206F_202B_200D_200B_206F_202B_206F_206B_206E_200E_200F_206A_200E_202A_202C_202D_200C_202B_206C_206B_206D_202D_202E(builder, Kind.ToString());
|
||||
_200C_202E_202C_206A_200C_206A_202A_206D_206E_206D_206A_206F_206F_206C_202C_206B_206A_202E_206F_202B_200D_200B_206F_202B_206F_206B_206E_200E_200F_206A_200E_202A_202C_202D_200C_202B_206C_206B_206D_202D_202E(builder, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(1157142729));
|
||||
_202D_206A_206D_200C_200E_202A_202E_202D_202B_200F_200E_202E_200B_206C_206E_202E_200B_202B_206F_200B_200F_206A_206C_206C_200F_206B_206A_206C_202C_206B_206B_206C_206F_206C_202C_200C_202E_200E_200F_202A_202E(builder, (object?)Rung);
|
||||
_200C_202E_202C_206A_200C_206A_202A_206D_206E_206D_206A_206F_206F_206C_202C_206B_206A_202E_206F_202B_200D_200B_206F_202B_206F_206B_206E_200E_200F_206A_200E_202A_202C_202D_200C_202B_206C_206B_206D_202D_202E(builder, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(-113611179));
|
||||
_202D_206A_206D_200C_200E_202A_202E_202D_202B_200F_200E_202E_200B_206C_206E_202E_200B_202B_206F_200B_200F_206A_206C_206C_200F_206B_206A_206C_202C_206B_206B_206C_206F_206C_202C_200C_202E_200E_200F_202A_202E(builder, (object?)Exhaustion);
|
||||
return true;
|
||||
}
|
||||
|
||||
[CompilerGenerated]
|
||||
public bool Equals(RecoveryDecision other)
|
||||
{
|
||||
int num = ((!EqualityComparer<RecoveryDecisionKind>.Default.Equals(Kind, other.Kind)) ? 379657536 : 379657539);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 379657538;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 3:
|
||||
num = 379657539;
|
||||
break;
|
||||
case 0:
|
||||
return EqualityComparer<RecoveryExhaustion>.Default.Equals(Exhaustion, other.Exhaustion);
|
||||
case 2:
|
||||
return false;
|
||||
case 1:
|
||||
num = ((!EqualityComparer<IRecoveryRung>.Default.Equals(Rung, other.Rung)) ? 379657536 : 379657538);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool IEquatable<RecoveryDecision>.Equals(RecoveryDecision other)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in Equals
|
||||
return this.Equals(other);
|
||||
}
|
||||
|
||||
static StringBuilder? _200C_206E_200E_206B_206B_202E_200D_206B_200B_200F_206F_206D_206F_200C_206A_206C_202A_206E_206D_200B_200F_202B_200B_206A_206D_206E_202E_206F_200D_206F_206F_202E_206E_202A_206B_200D_202A_202D_206C_200F_202E()
|
||||
{
|
||||
return new StringBuilder();
|
||||
}
|
||||
|
||||
static StringBuilder? _200C_202E_202C_206A_200C_206A_202A_206D_206E_206D_206A_206F_206F_206C_202C_206B_206A_202E_206F_202B_200D_200B_206F_202B_206F_206B_206E_200E_200F_206A_200E_202A_202C_202D_200C_202B_206C_206B_206D_202D_202E(StringBuilder? P_0, string? P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static StringBuilder? _200F_202E_206E_202E_202C_206A_206D_200E_200B_206C_206C_206B_206F_206F_206F_206D_200C_202C_200D_200D_200D_202D_200B_202A_206C_202B_200B_200C_200C_206D_200D_206A_202A_200D_200D_202E_206D_206F_202E_202C_202E(StringBuilder? P_0, char P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static string? _200B_206A_206D_200D_206C_200B_206A_200E_206E_206D_200F_202C_200D_206A_202B_202C_202D_200B_206D_200B_200B_202A_202D_206B_202D_206B_206A_202B_206D_202A_206D_202C_202A_200B_206C_200D_200F_200C_200D_200C_202E(object? P_0)
|
||||
{
|
||||
return P_0.ToString();
|
||||
}
|
||||
|
||||
static StringBuilder? _202D_206A_206D_200C_200E_202A_202E_202D_202B_200F_200E_202E_200B_206C_206E_202E_200B_202B_206F_200B_200F_206A_206C_206C_200F_206B_206A_206C_202C_206B_206B_206C_206F_206C_202C_200C_202E_200E_200F_202A_202E(StringBuilder? P_0, object? P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
}
|
||||
public readonly record struct RecoveryDecision(RecoveryDecisionKind Kind, IRecoveryRung? Rung, RecoveryExhaustion? Exhaustion);
|
||||
|
|
|
|||
|
|
@ -1,153 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
|
||||
namespace LLib.Movement.Unstuck;
|
||||
|
||||
public sealed record RecoveryExhaustion(int Attempts, IReadOnlyList<string> RungsFired, long FirstStallMs, long LastStallMs)
|
||||
{
|
||||
[CompilerGenerated]
|
||||
private Type EqualityContract
|
||||
{
|
||||
[CompilerGenerated]
|
||||
get
|
||||
{
|
||||
return _200F_206F_206F_202A_202B_206F_200B_202A_200E_202C_206A_200E_200E_200F_200C_200E_206B_206A_206B_200F_206C_200E_206E_206E_200B_206F_202C_202C_202B_202B_200E_202A_206E_202C_202A_202D_206F_202A_200E_200D_202E(typeof(RecoveryExhaustion).TypeHandle);
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder stringBuilder = _202E_206B_206F_206E_200B_206D_206E_200E_200E_200B_202B_206A_206B_206E_206A_206B_202C_206C_202C_206C_202C_206D_206C_206B_202B_200B_200C_206F_202A_200D_206C_202B_206C_206B_200C_200B_206D_200E_202E_206D_202E();
|
||||
_206C_206D_200C_202C_206F_206A_202E_202D_202B_200D_200F_200F_200F_200F_202E_202E_200F_200F_202E_200E_206A_202D_200B_200E_200B_202D_202E_200F_200E_202A_206E_200E_206A_202D_206A_206D_206B_202A_200E_206E_202E(stringBuilder, global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-390353260));
|
||||
_206C_206D_200C_202C_206F_206A_202E_202D_202B_200D_200F_200F_200F_200F_202E_202E_200F_200F_202E_200E_206A_202D_200B_200E_200B_202D_202E_200F_200E_202A_206E_200E_206A_202D_206A_206D_206B_202A_200E_206E_202E(stringBuilder, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(1148273145));
|
||||
int num = ((!PrintMembers(stringBuilder)) ? (-834076820) : (-834076819));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -834076820;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 2:
|
||||
num = -834076819;
|
||||
break;
|
||||
case 0:
|
||||
_206D_202C_200C_206A_200B_206C_202B_202B_202B_200E_202C_206C_206A_200D_200E_200D_206E_200B_200E_206D_206C_200B_200E_202B_206C_200D_200D_206C_206C_200E_202B_200C_200E_200F_206A_206E_206C_202E_202C_206A_202E(stringBuilder, '}');
|
||||
return _200B_202D_202D_200B_206A_202A_202A_206B_206C_206C_200D_206E_206C_206E_206C_206F_206C_202E_200D_200E_202D_202C_206D_200B_200B_206C_202E_206D_200C_206D_206B_202A_206C_200F_202A_206D_200D_206B_200D_206E_202E((object)stringBuilder);
|
||||
case 1:
|
||||
_206D_202C_200C_206A_200B_206C_202B_202B_202B_200E_202C_206C_206A_200D_200E_200D_206E_200B_200E_206D_206C_200B_200E_202B_206C_200D_200D_206C_206C_200E_202B_200C_200E_200F_206A_206E_206C_202E_202C_206A_202E(stringBuilder, ' ');
|
||||
num = -834076820;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
private bool PrintMembers(StringBuilder builder)
|
||||
{
|
||||
_206C_200B_200F_206F_206E_206F_202D_206D_206C_202D_206E_202A_200E_206D_202C_206D_202C_200C_206E_202C_200F_206F_206B_200E_200F_206B_206A_200B_202A_206A_206B_206A_206F_206C_200B_202D_206D_200D_202E_202E();
|
||||
_206C_206D_200C_202C_206F_206A_202E_202D_202B_200D_200F_200F_200F_200F_202E_202E_200F_200F_202E_200E_206A_202D_200B_200E_200B_202D_202E_200F_200E_202A_206E_200E_206A_202D_206A_206D_206B_202A_200E_206E_202E(builder, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(-53828862));
|
||||
_206C_206D_200C_202C_206F_206A_202E_202D_202B_200D_200F_200F_200F_200F_202E_202E_200F_200F_202E_200E_206A_202D_200B_200E_200B_202D_202E_200F_200E_202A_206E_200E_206A_202D_206A_206D_206B_202A_200E_206E_202E(builder, Attempts.ToString());
|
||||
_206C_206D_200C_202C_206F_206A_202E_202D_202B_200D_200F_200F_200F_200F_202E_202E_200F_200F_202E_200E_206A_202D_200B_200E_200B_202D_202E_200F_200E_202A_206E_200E_206A_202D_206A_206D_206B_202A_200E_206E_202E(builder, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(-596316751));
|
||||
_200D_202A_200F_200E_206A_202C_202A_200F_206C_200F_200B_206C_202E_200E_200B_206D_206F_200B_206B_202C_200C_202D_200C_202B_206E_200C_206D_200F_202B_202D_206E_206B_200E_206A_200B_206E_200C_206F_206D_202E_202E(builder, (object)RungsFired);
|
||||
_206C_206D_200C_202C_206F_206A_202E_202D_202B_200D_200F_200F_200F_200F_202E_202E_200F_200F_202E_200E_206A_202D_200B_200E_200B_202D_202E_200F_200E_202A_206E_200E_206A_202D_206A_206D_206B_202A_200E_206E_202E(builder, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(118713089));
|
||||
_206C_206D_200C_202C_206F_206A_202E_202D_202B_200D_200F_200F_200F_200F_202E_202E_200F_200F_202E_200E_206A_202D_200B_200E_200B_202D_202E_200F_200E_202A_206E_200E_206A_202D_206A_206D_206B_202A_200E_206E_202E(builder, FirstStallMs.ToString());
|
||||
_206C_206D_200C_202C_206F_206A_202E_202D_202B_200D_200F_200F_200F_200F_202E_202E_200F_200F_202E_200E_206A_202D_200B_200E_200B_202D_202E_200F_200E_202A_206E_200E_206A_202D_206A_206D_206B_202A_200E_206E_202E(builder, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(616880075));
|
||||
_206C_206D_200C_202C_206F_206A_202E_202D_202B_200D_200F_200F_200F_200F_202E_202E_200F_200F_202E_200E_206A_202D_200B_200E_200B_202D_202E_200F_200E_202A_206E_200E_206A_202D_206A_206D_206B_202A_200E_206E_202E(builder, LastStallMs.ToString());
|
||||
return true;
|
||||
}
|
||||
|
||||
[CompilerGenerated]
|
||||
public bool Equals(RecoveryExhaustion? other)
|
||||
{
|
||||
int num = (((object)this == other) ? (-542937588) : (-542937600));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -542937596;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 3:
|
||||
return EqualityComparer<long>.Default.Equals(LastStallMs, other.LastStallMs);
|
||||
case 1:
|
||||
return false;
|
||||
case 2:
|
||||
num = ((!_202B_200F_202A_206D_206D_200B_206D_200D_202E_200F_200D_206E_200F_202C_206C_206E_206E_200B_206F_200B_206F_202B_200E_202E_206C_202C_206A_200E_200E_206C_202C_200F_206E_206E_206F_200C_200C_206E_206B_200E_202E(EqualityContract, other.EqualityContract)) ? (-542937595) : (-542937596));
|
||||
break;
|
||||
case 0:
|
||||
num = ((!EqualityComparer<int>.Default.Equals(Attempts, other.Attempts)) ? (-542937595) : (-542937597));
|
||||
break;
|
||||
case 8:
|
||||
return true;
|
||||
case 6:
|
||||
num = ((!EqualityComparer<long>.Default.Equals(FirstStallMs, other.FirstStallMs)) ? (-542937595) : (-542937593));
|
||||
break;
|
||||
case 7:
|
||||
num = ((!EqualityComparer<IReadOnlyList<string>>.Default.Equals(RungsFired, other.RungsFired)) ? (-542937595) : (-542937598));
|
||||
break;
|
||||
case 4:
|
||||
num = (((object)other == null) ? (-542937595) : (-542937594));
|
||||
break;
|
||||
case 5:
|
||||
num = -542937600;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool IEquatable<RecoveryExhaustion>.Equals(RecoveryExhaustion? other)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in Equals
|
||||
return this.Equals(other);
|
||||
}
|
||||
|
||||
static Type _200F_206F_206F_202A_202B_206F_200B_202A_200E_202C_206A_200E_200E_200F_200C_200E_206B_206A_206B_200F_206C_200E_206E_206E_200B_206F_202C_202C_202B_202B_200E_202A_206E_202C_202A_202D_206F_202A_200E_200D_202E(RuntimeTypeHandle P_0)
|
||||
{
|
||||
return Type.GetTypeFromHandle(P_0);
|
||||
}
|
||||
|
||||
static StringBuilder _202E_206B_206F_206E_200B_206D_206E_200E_200E_200B_202B_206A_206B_206E_206A_206B_202C_206C_202C_206C_202C_206D_206C_206B_202B_200B_200C_206F_202A_200D_206C_202B_206C_206B_200C_200B_206D_200E_202E_206D_202E()
|
||||
{
|
||||
return new StringBuilder();
|
||||
}
|
||||
|
||||
static StringBuilder _206C_206D_200C_202C_206F_206A_202E_202D_202B_200D_200F_200F_200F_200F_202E_202E_200F_200F_202E_200E_206A_202D_200B_200E_200B_202D_202E_200F_200E_202A_206E_200E_206A_202D_206A_206D_206B_202A_200E_206E_202E(StringBuilder P_0, string P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static StringBuilder _206D_202C_200C_206A_200B_206C_202B_202B_202B_200E_202C_206C_206A_200D_200E_200D_206E_200B_200E_206D_206C_200B_200E_202B_206C_200D_200D_206C_206C_200E_202B_200C_200E_200F_206A_206E_206C_202E_202C_206A_202E(StringBuilder P_0, char P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static string _200B_202D_202D_200B_206A_202A_202A_206B_206C_206C_200D_206E_206C_206E_206C_206F_206C_202E_200D_200E_202D_202C_206D_200B_200B_206C_202E_206D_200C_206D_206B_202A_206C_200F_202A_206D_200D_206B_200D_206E_202E(object P_0)
|
||||
{
|
||||
return P_0.ToString();
|
||||
}
|
||||
|
||||
static void _206C_200B_200F_206F_206E_206F_202D_206D_206C_202D_206E_202A_200E_206D_202C_206D_202C_200C_206E_202C_200F_206F_206B_200E_200F_206B_206A_200B_202A_206A_206B_206A_206F_206C_200B_202D_206D_200D_202E_202E()
|
||||
{
|
||||
RuntimeHelpers.EnsureSufficientExecutionStack();
|
||||
}
|
||||
|
||||
static StringBuilder _200D_202A_200F_200E_206A_202C_202A_200F_206C_200F_200B_206C_202E_200E_200B_206D_206F_200B_206B_202C_200C_202D_200C_202B_206E_200C_206D_200F_202B_202D_206E_206B_200E_206A_200B_206E_200C_206F_206D_202E_202E(StringBuilder P_0, object P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static bool _202B_200F_202A_206D_206D_200B_206D_200D_202E_200F_200D_206E_200F_202C_206C_206E_206E_200B_206F_200B_206F_202B_200E_202E_206C_202C_206A_200E_200E_206C_202C_200F_206E_206E_206F_200C_200C_206E_206B_200E_202E(Type P_0, Type P_1)
|
||||
{
|
||||
return P_0 == P_1;
|
||||
}
|
||||
}
|
||||
public sealed record RecoveryExhaustion(int Attempts, IReadOnlyList<string> RungsFired, long FirstStallMs, long LastStallMs);
|
||||
|
|
|
|||
|
|
@ -25,47 +25,12 @@ public sealed class RecoveryLadder
|
|||
|
||||
public bool IsExhausted { get; private set; }
|
||||
|
||||
private int Cap
|
||||
private int Cap => _003Coptions_003EP.Mode switch
|
||||
{
|
||||
get
|
||||
{
|
||||
RecoveryMode mode = _003Coptions_003EP.Mode;
|
||||
int num = ((mode == RecoveryMode.Aggressive) ? (-304547260) : (-304547257));
|
||||
int result = default(int);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -304547258;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 4:
|
||||
result = _003Coptions_003EP.PassiveCap;
|
||||
num = -304547258;
|
||||
break;
|
||||
case 1:
|
||||
num = ((mode == RecoveryMode.Passive) ? (-304547262) : (-304547264));
|
||||
break;
|
||||
case 6:
|
||||
num = -304547261;
|
||||
break;
|
||||
case 2:
|
||||
result = _003Coptions_003EP.AggressiveCap;
|
||||
num = -304547258;
|
||||
break;
|
||||
case 5:
|
||||
result = _003Coptions_003EP.ConservativeCap;
|
||||
num = -304547258;
|
||||
break;
|
||||
case 3:
|
||||
num = -304547257;
|
||||
break;
|
||||
case 0:
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
RecoveryMode.Aggressive => _003Coptions_003EP.AggressiveCap,
|
||||
RecoveryMode.Passive => _003Coptions_003EP.PassiveCap,
|
||||
_ => _003Coptions_003EP.ConservativeCap,
|
||||
};
|
||||
|
||||
public RecoveryLadder(RecoveryLadderOptions options, IReadOnlyList<IRecoveryRung> rungs)
|
||||
{
|
||||
|
|
@ -79,91 +44,39 @@ public sealed class RecoveryLadder
|
|||
|
||||
public RecoveryDecision OnStall(long nowMs)
|
||||
{
|
||||
int num = ((!IsExhausted) ? 1754338781 : 1754338772);
|
||||
IRecoveryRung recoveryRung = default(IRecoveryRung);
|
||||
int num7 = default(int);
|
||||
while (true)
|
||||
if (IsExhausted)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1754338771;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
return new RecoveryDecision(RecoveryDecisionKind.None, null, null);
|
||||
}
|
||||
if (Attempts >= Cap)
|
||||
{
|
||||
IsExhausted = true;
|
||||
return new RecoveryDecision(RecoveryDecisionKind.Exhausted, null, new RecoveryExhaustion(Attempts, _rungsFired.ToArray(), _firstStallMs, _lastStallMs));
|
||||
}
|
||||
if (_hasRunAny && nowMs - _lastRunAnyMs < _003Coptions_003EP.GlobalCooldownMs)
|
||||
{
|
||||
return new RecoveryDecision(RecoveryDecisionKind.None, null, null);
|
||||
}
|
||||
if (_003Coptions_003EP.Mode == RecoveryMode.Passive)
|
||||
{
|
||||
Consume(nowMs);
|
||||
return new RecoveryDecision(RecoveryDecisionKind.Observe, null, null);
|
||||
}
|
||||
for (int i = 0; i < _rungs.Length; i++)
|
||||
{
|
||||
IRecoveryRung recoveryRung = _rungs[i];
|
||||
if ((!_hasRun[i] || nowMs - _lastRunMs[i] >= recoveryRung.CooldownMs) && recoveryRung.CanRun(Attempts + 1, nowMs))
|
||||
{
|
||||
case 9:
|
||||
{
|
||||
long num8 = _lastRunAnyMs;
|
||||
long num9 = nowMs;
|
||||
num = ((~(~num9 + num8) >= _003Coptions_003EP.GlobalCooldownMs) ? 1754338774 : 1754338768);
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
num = ((!_hasRunAny) ? 1754338774 : 1754338778);
|
||||
break;
|
||||
case 14:
|
||||
num = ((Attempts < Cap) ? 1754338771 : 1754338783);
|
||||
break;
|
||||
case 16:
|
||||
num = ((!recoveryRung.CanRun(Attempts + 1, nowMs)) ? 1754338773 : 1754338782);
|
||||
break;
|
||||
case 10:
|
||||
recoveryRung = _rungs[num7];
|
||||
num = ((!_hasRun[num7]) ? 1754338755 : 1754338776);
|
||||
break;
|
||||
case 4:
|
||||
num = 1754338772;
|
||||
break;
|
||||
case 13:
|
||||
Consume(nowMs);
|
||||
_rungsFired.Add(recoveryRung.Name);
|
||||
_hasRun[num7] = true;
|
||||
_lastRunMs[num7] = nowMs;
|
||||
_hasRun[i] = true;
|
||||
_lastRunMs[i] = nowMs;
|
||||
_hasRunAny = true;
|
||||
_lastRunAnyMs = nowMs;
|
||||
return new RecoveryDecision(RecoveryDecisionKind.Run, recoveryRung, null);
|
||||
case 6:
|
||||
{
|
||||
int num10 = num7;
|
||||
num3 = 1;
|
||||
num4 = num10;
|
||||
int num11 = num4 ^ num3;
|
||||
int num12 = num4 & num3;
|
||||
num7 = num11 + (num12 + num12);
|
||||
num = 1754338769;
|
||||
break;
|
||||
}
|
||||
case 12:
|
||||
IsExhausted = true;
|
||||
return new RecoveryDecision(RecoveryDecisionKind.Exhausted, null, new RecoveryExhaustion(Attempts, _rungsFired.ToArray(), _firstStallMs, _lastStallMs));
|
||||
case 1:
|
||||
Consume(nowMs);
|
||||
return new RecoveryDecision(RecoveryDecisionKind.Observe, null, null);
|
||||
case 5:
|
||||
num = ((_003Coptions_003EP.Mode != RecoveryMode.Passive) ? 1754338779 : 1754338770);
|
||||
break;
|
||||
case 11:
|
||||
{
|
||||
long num8 = _lastRunMs[num7];
|
||||
long num9 = nowMs;
|
||||
num = ((~(~num9 + num8) < recoveryRung.CooldownMs) ? 1754338773 : 1754338755);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
return new RecoveryDecision(RecoveryDecisionKind.None, null, null);
|
||||
case 2:
|
||||
num = ((num7 < _rungs.Length) ? 1754338777 : 1754338780);
|
||||
break;
|
||||
case 15:
|
||||
return new RecoveryDecision(RecoveryDecisionKind.None, null, null);
|
||||
case 7:
|
||||
return new RecoveryDecision(RecoveryDecisionKind.None, null, null);
|
||||
case 8:
|
||||
num7 = 0;
|
||||
num = 1754338769;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return new RecoveryDecision(RecoveryDecisionKind.None, null, null);
|
||||
}
|
||||
|
||||
public void Reset()
|
||||
|
|
@ -172,70 +85,19 @@ public sealed class RecoveryLadder
|
|||
IsExhausted = false;
|
||||
_rungsFired.Clear();
|
||||
_hasRunAny = false;
|
||||
int num = 0;
|
||||
int num2 = -478483629;
|
||||
while (true)
|
||||
for (int i = 0; i < _hasRun.Length; i++)
|
||||
{
|
||||
int num3 = num2;
|
||||
int num4 = -478483631;
|
||||
int num5 = num3;
|
||||
int num6 = num5 + num4;
|
||||
int num7 = num5 & num4;
|
||||
switch (num6 - (num7 + num7))
|
||||
{
|
||||
case 0:
|
||||
return;
|
||||
case 2:
|
||||
num2 = ((num < _hasRun.Length) ? (-478483632) : (-478483631));
|
||||
break;
|
||||
case 1:
|
||||
{
|
||||
_hasRun[num] = false;
|
||||
int num8 = num;
|
||||
num4 = 1;
|
||||
num5 = num8;
|
||||
int num9 = num5 ^ num4;
|
||||
int num10 = num5 & num4;
|
||||
num = num9 + (num10 + num10);
|
||||
num2 = -478483629;
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
num2 = -478483629;
|
||||
break;
|
||||
}
|
||||
_hasRun[i] = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void Consume(long nowMs)
|
||||
{
|
||||
int num = ((Attempts != 0) ? 1659706856 : 1659706857);
|
||||
while (true)
|
||||
if (Attempts == 0)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1659706856;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 2:
|
||||
num = 1659706857;
|
||||
break;
|
||||
case 1:
|
||||
_firstStallMs = nowMs;
|
||||
num = 1659706856;
|
||||
break;
|
||||
case 0:
|
||||
{
|
||||
int attempts = Attempts;
|
||||
num3 = 1;
|
||||
num4 = attempts;
|
||||
Attempts = (num4 | num3) + (num4 & num3);
|
||||
_lastStallMs = nowMs;
|
||||
return;
|
||||
}
|
||||
}
|
||||
_firstStallMs = nowMs;
|
||||
}
|
||||
Attempts++;
|
||||
_lastStallMs = nowMs;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,22 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
|
||||
namespace LLib.Movement.Unstuck;
|
||||
|
||||
public sealed record RecoveryLadderOptions
|
||||
{
|
||||
[CompilerGenerated]
|
||||
private Type EqualityContract
|
||||
{
|
||||
[CompilerGenerated]
|
||||
get
|
||||
{
|
||||
return _200E_200F_202D_206F_200E_202B_206A_206E_206C_202A_200D_202B_206E_202C_202E_200D_202E_202D_200C_202D_202E_200B_206A_206B_206F_200E_202B_200C_206F_206E_200F_200E_200F_202C_200B_202A_202D_202C_200C_206A_202E(typeof(RecoveryLadderOptions).TypeHandle);
|
||||
}
|
||||
}
|
||||
|
||||
public RecoveryMode Mode { get; init; } = RecoveryMode.Conservative;
|
||||
|
||||
public int AggressiveCap { get; init; } = 10;
|
||||
|
|
@ -26,138 +11,4 @@ public sealed record RecoveryLadderOptions
|
|||
public int PassiveCap { get; init; } = 2;
|
||||
|
||||
public long GlobalCooldownMs { get; init; } = 3000L;
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder stringBuilder = _206E_206D_202C_202E_200B_202D_200E_202D_206F_206A_206E_206A_202B_202A_206C_206B_206D_200F_206D_200F_200B_206D_200C_200F_202B_202A_206D_200C_200B_206D_200D_202C_202E_206A_202D_206A_202D_202E_206B_202D_202E();
|
||||
_202C_206D_202E_200E_202D_206D_206F_200E_200E_200E_206F_200B_206E_202A_206C_200C_206E_200E_202C_200C_206F_202B_206B_206A_200C_200C_200F_202B_206B_206D_206B_206B_202B_200F_206F_202E_200E_202E_200F_202C_202E(stringBuilder, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(-1014979507));
|
||||
_202C_206D_202E_200E_202D_206D_206F_200E_200E_200E_206F_200B_206E_202A_206C_200C_206E_200E_202C_200C_206F_202B_206B_206A_200C_200C_200F_202B_206B_206D_206B_206B_202B_200F_206F_202E_200E_202E_200F_202C_202E(stringBuilder, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(1808631505));
|
||||
int num = ((!PrintMembers(stringBuilder)) ? 128748061 : 128748062);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 128748063;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
num = 128748062;
|
||||
break;
|
||||
case 2:
|
||||
_200D_202B_206E_206C_206E_206F_200F_200D_200F_200E_200B_206C_202E_206D_202D_206C_206A_200C_202D_200D_200E_206F_206E_200F_202A_202B_202D_202A_202B_202D_202E_200E_206C_200E_202D_206E_200B_206B_202E_202E(stringBuilder, '}');
|
||||
return _200B_202B_200E_202E_200F_202D_206E_202B_200B_202B_200D_200C_200C_202D_200F_202B_200E_202E_206E_202B_206B_200B_200E_202E_202A_200E_200D_202B_200F_202A_200E_206D_206E_202D_202B_202C_202E_200D_202D_206B_202E((object)stringBuilder);
|
||||
case 1:
|
||||
_200D_202B_206E_206C_206E_206F_200F_200D_200F_200E_200B_206C_202E_206D_202D_206C_206A_200C_202D_200D_200E_206F_206E_200F_202A_202B_202D_202A_202B_202D_202E_200E_206C_200E_202D_206E_200B_206B_202E_202E(stringBuilder, ' ');
|
||||
num = 128748061;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
private bool PrintMembers(StringBuilder builder)
|
||||
{
|
||||
_206C_206D_206F_206A_202D_206A_206F_206C_206D_202E_200E_200D_202D_206B_200B_200D_206E_200F_202B_206A_200E_202A_206D_206F_206B_206B_202A_202E_206B_206E_206A_206F_200F_200F_200D_206B_200E_206C_200D_206F_202E();
|
||||
_202C_206D_202E_200E_202D_206D_206F_200E_200E_200E_206F_200B_206E_202A_206C_200C_206E_200E_202C_200C_206F_202B_206B_206A_200C_200C_200F_202B_206B_206D_206B_206B_202B_200F_206F_202E_200E_202E_200F_202C_202E(builder, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(-537195815));
|
||||
_202C_206D_202E_200E_202D_206D_206F_200E_200E_200E_206F_200B_206E_202A_206C_200C_206E_200E_202C_200C_206F_202B_206B_206A_200C_200C_200F_202B_206B_206D_206B_206B_202B_200F_206F_202E_200E_202E_200F_202C_202E(builder, Mode.ToString());
|
||||
_202C_206D_202E_200E_202D_206D_206F_200E_200E_200E_206F_200B_206E_202A_206C_200C_206E_200E_202C_200C_206F_202B_206B_206A_200C_200C_200F_202B_206B_206D_206B_206B_202B_200F_206F_202E_200E_202E_200F_202C_202E(builder, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(-1738569869));
|
||||
_202C_206D_202E_200E_202D_206D_206F_200E_200E_200E_206F_200B_206E_202A_206C_200C_206E_200E_202C_200C_206F_202B_206B_206A_200C_200C_200F_202B_206B_206D_206B_206B_202B_200F_206F_202E_200E_202E_200F_202C_202E(builder, AggressiveCap.ToString());
|
||||
_202C_206D_202E_200E_202D_206D_206F_200E_200E_200E_206F_200B_206E_202A_206C_200C_206E_200E_202C_200C_206F_202B_206B_206A_200C_200C_200F_202B_206B_206D_206B_206B_202B_200F_206F_202E_200E_202E_200F_202C_202E(builder, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(1436744253));
|
||||
_202C_206D_202E_200E_202D_206D_206F_200E_200E_200E_206F_200B_206E_202A_206C_200C_206E_200E_202C_200C_206F_202B_206B_206A_200C_200C_200F_202B_206B_206D_206B_206B_202B_200F_206F_202E_200E_202E_200F_202C_202E(builder, ConservativeCap.ToString());
|
||||
_202C_206D_202E_200E_202D_206D_206F_200E_200E_200E_206F_200B_206E_202A_206C_200C_206E_200E_202C_200C_206F_202B_206B_206A_200C_200C_200F_202B_206B_206D_206B_206B_202B_200F_206F_202E_200E_202E_200F_202C_202E(builder, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(56536959));
|
||||
_202C_206D_202E_200E_202D_206D_206F_200E_200E_200E_206F_200B_206E_202A_206C_200C_206E_200E_202C_200C_206F_202B_206B_206A_200C_200C_200F_202B_206B_206D_206B_206B_202B_200F_206F_202E_200E_202E_200F_202C_202E(builder, PassiveCap.ToString());
|
||||
_202C_206D_202E_200E_202D_206D_206F_200E_200E_200E_206F_200B_206E_202A_206C_200C_206E_200E_202C_200C_206F_202B_206B_206A_200C_200C_200F_202B_206B_206D_206B_206B_202B_200F_206F_202E_200E_202E_200F_202C_202E(builder, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(1236985358));
|
||||
_202C_206D_202E_200E_202D_206D_206F_200E_200E_200E_206F_200B_206E_202A_206C_200C_206E_200E_202C_200C_206F_202B_206B_206A_200C_200C_200F_202B_206B_206D_206B_206B_202B_200F_206F_202E_200E_202E_200F_202C_202E(builder, GlobalCooldownMs.ToString());
|
||||
return true;
|
||||
}
|
||||
|
||||
[CompilerGenerated]
|
||||
public bool Equals(RecoveryLadderOptions? other)
|
||||
{
|
||||
int num = (((object)this == other) ? (-1889404605) : (-1889404604));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1889404603;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
num = ((!EqualityComparer<int>.Default.Equals(PassiveCap, other.PassiveCap)) ? (-1889404595) : (-1889404601));
|
||||
break;
|
||||
case 9:
|
||||
num = ((!_206D_202D_206B_200C_200C_200F_200E_202D_202D_206F_202A_200F_206D_200E_202B_200E_202A_206C_206B_206E_202C_200C_200B_206C_202A_202D_202A_202D_202D_206F_200F_206C_202B_200B_200F_202B_206A_202D_206D_206B_202E(EqualityContract, other.EqualityContract)) ? (-1889404595) : (-1889404607));
|
||||
break;
|
||||
case 3:
|
||||
num = ((!EqualityComparer<int>.Default.Equals(ConservativeCap, other.ConservativeCap)) ? (-1889404595) : (-1889404603));
|
||||
break;
|
||||
case 7:
|
||||
num = ((!EqualityComparer<int>.Default.Equals(AggressiveCap, other.AggressiveCap)) ? (-1889404595) : (-1889404602));
|
||||
break;
|
||||
case 8:
|
||||
return false;
|
||||
case 1:
|
||||
num = (((object)other == null) ? (-1889404595) : (-1889404596));
|
||||
break;
|
||||
case 6:
|
||||
return true;
|
||||
case 2:
|
||||
return EqualityComparer<long>.Default.Equals(GlobalCooldownMs, other.GlobalCooldownMs);
|
||||
case 5:
|
||||
num = -1889404604;
|
||||
break;
|
||||
case 4:
|
||||
num = ((!EqualityComparer<RecoveryMode>.Default.Equals(Mode, other.Mode)) ? (-1889404595) : (-1889404606));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool IEquatable<RecoveryLadderOptions>.Equals(RecoveryLadderOptions? other)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in Equals
|
||||
return this.Equals(other);
|
||||
}
|
||||
|
||||
static Type _200E_200F_202D_206F_200E_202B_206A_206E_206C_202A_200D_202B_206E_202C_202E_200D_202E_202D_200C_202D_202E_200B_206A_206B_206F_200E_202B_200C_206F_206E_200F_200E_200F_202C_200B_202A_202D_202C_200C_206A_202E(RuntimeTypeHandle P_0)
|
||||
{
|
||||
return Type.GetTypeFromHandle(P_0);
|
||||
}
|
||||
|
||||
static StringBuilder _206E_206D_202C_202E_200B_202D_200E_202D_206F_206A_206E_206A_202B_202A_206C_206B_206D_200F_206D_200F_200B_206D_200C_200F_202B_202A_206D_200C_200B_206D_200D_202C_202E_206A_202D_206A_202D_202E_206B_202D_202E()
|
||||
{
|
||||
return new StringBuilder();
|
||||
}
|
||||
|
||||
static StringBuilder _202C_206D_202E_200E_202D_206D_206F_200E_200E_200E_206F_200B_206E_202A_206C_200C_206E_200E_202C_200C_206F_202B_206B_206A_200C_200C_200F_202B_206B_206D_206B_206B_202B_200F_206F_202E_200E_202E_200F_202C_202E(StringBuilder P_0, string P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static StringBuilder _200D_202B_206E_206C_206E_206F_200F_200D_200F_200E_200B_206C_202E_206D_202D_206C_206A_200C_202D_200D_200E_206F_206E_200F_202A_202B_202D_202A_202B_202D_202E_200E_206C_200E_202D_206E_200B_206B_202E_202E(StringBuilder P_0, char P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static string _200B_202B_200E_202E_200F_202D_206E_202B_200B_202B_200D_200C_200C_202D_200F_202B_200E_202E_206E_202B_206B_200B_200E_202E_202A_200E_200D_202B_200F_202A_200E_206D_206E_202D_202B_202C_202E_200D_202D_206B_202E(object P_0)
|
||||
{
|
||||
return P_0.ToString();
|
||||
}
|
||||
|
||||
static void _206C_206D_206F_206A_202D_206A_206F_206C_206D_202E_200E_200D_202D_206B_200B_200D_206E_200F_202B_206A_200E_202A_206D_206F_206B_206B_202A_202E_206B_206E_206A_206F_200F_200F_200D_206B_200E_206C_200D_206F_202E()
|
||||
{
|
||||
RuntimeHelpers.EnsureSufficientExecutionStack();
|
||||
}
|
||||
|
||||
static bool _206D_202D_206B_200C_200C_200F_200E_202D_202D_206F_202A_200F_206D_200E_202B_200E_202A_206C_206B_206E_202C_200C_200B_206C_202A_202D_202A_202D_202D_206F_200F_206C_202B_200B_200F_202B_206A_202D_206D_206B_202E(Type P_0, Type P_1)
|
||||
{
|
||||
return P_0 == P_1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,58 +25,22 @@ public sealed class StallDetector(StallDetectorOptions options)
|
|||
|
||||
public StallVerdict? Observe(in StallSample sample)
|
||||
{
|
||||
int num = (sample.Driving ? 860999294 : 860999280);
|
||||
bool flag = default(bool);
|
||||
while (true)
|
||||
if (!sample.Driving)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 860999289;
|
||||
int num4 = num2;
|
||||
int num5;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 8:
|
||||
num5 = (sample.DistanceToTarget.HasValue ? 1 : 0);
|
||||
goto IL_0163;
|
||||
case 4:
|
||||
num = ((sample.TimestampMs - _lastDrivenMs > options.ContinuityGapMs) ? 860999295 : 860999282);
|
||||
break;
|
||||
case 1:
|
||||
return ObserveProgress(in sample);
|
||||
case 11:
|
||||
num = ((sample.Mode != _anchorMode) ? 860999295 : 860999289);
|
||||
break;
|
||||
case 10:
|
||||
return ObserveDisplacement(in sample);
|
||||
case 7:
|
||||
num = ((sample.Mode == DriveMode.Ground) ? 860999292 : 860999281);
|
||||
break;
|
||||
case 2:
|
||||
num = 860999280;
|
||||
break;
|
||||
case 6:
|
||||
Anchor(in sample, flag);
|
||||
return null;
|
||||
case 9:
|
||||
return null;
|
||||
case 0:
|
||||
num = ((flag == _anchorUsesProgress) ? 860999290 : 860999295);
|
||||
break;
|
||||
case 5:
|
||||
num5 = 0;
|
||||
goto IL_0163;
|
||||
case 3:
|
||||
{
|
||||
_lastDrivenMs = sample.TimestampMs;
|
||||
num = (flag ? 860999288 : 860999283);
|
||||
break;
|
||||
}
|
||||
IL_0163:
|
||||
flag = (byte)num5 != 0;
|
||||
num = ((!_hasAnchor) ? 860999295 : 860999293);
|
||||
break;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
bool flag = sample.Mode != DriveMode.Ground && sample.DistanceToTarget.HasValue;
|
||||
if (!_hasAnchor || sample.TimestampMs - _lastDrivenMs > options.ContinuityGapMs || sample.Mode != _anchorMode || flag != _anchorUsesProgress)
|
||||
{
|
||||
Anchor(in sample, flag);
|
||||
return null;
|
||||
}
|
||||
_lastDrivenMs = sample.TimestampMs;
|
||||
if (!flag)
|
||||
{
|
||||
return ObserveDisplacement(in sample);
|
||||
}
|
||||
return ObserveProgress(in sample);
|
||||
}
|
||||
|
||||
public void Reset()
|
||||
|
|
@ -88,118 +52,53 @@ public sealed class StallDetector(StallDetectorOptions options)
|
|||
private StallVerdict? ObserveProgress(in StallSample sample)
|
||||
{
|
||||
float value = sample.DistanceToTarget.Value;
|
||||
int num = ((!(value < _bestDistance)) ? 755996687 : 755996681);
|
||||
long num7 = default(long);
|
||||
float num8 = default(float);
|
||||
while (true)
|
||||
if (value < _bestDistance)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 755996685;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
num = 755996681;
|
||||
break;
|
||||
case 3:
|
||||
return null;
|
||||
case 6:
|
||||
return Trip(in sample, num7, num8);
|
||||
case 2:
|
||||
num8 = _referenceBestDistance - _bestDistance;
|
||||
num = ((!(num8 >= options.ProgressImprovementThreshold)) ? 755996684 : 755996680);
|
||||
break;
|
||||
case 5:
|
||||
_referenceBestDistance = _bestDistance;
|
||||
_anchorMs = sample.TimestampMs;
|
||||
_anchorPosition = sample.Position;
|
||||
return null;
|
||||
case 1:
|
||||
num7 = sample.TimestampMs - _anchorMs;
|
||||
num = ((num7 < options.ProgressWindowMs) ? 755996686 : 755996683);
|
||||
break;
|
||||
case 4:
|
||||
_bestDistance = value;
|
||||
num = 755996687;
|
||||
break;
|
||||
}
|
||||
_bestDistance = value;
|
||||
}
|
||||
float num = _referenceBestDistance - _bestDistance;
|
||||
if (num >= options.ProgressImprovementThreshold)
|
||||
{
|
||||
_referenceBestDistance = _bestDistance;
|
||||
_anchorMs = sample.TimestampMs;
|
||||
_anchorPosition = sample.Position;
|
||||
return null;
|
||||
}
|
||||
long num2 = sample.TimestampMs - _anchorMs;
|
||||
if (num2 >= options.ProgressWindowMs)
|
||||
{
|
||||
return Trip(in sample, num2, num);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private StallVerdict? ObserveDisplacement(in StallSample sample)
|
||||
{
|
||||
int num = ((sample.Mode == DriveMode.Ground) ? 508532326 : 508532323);
|
||||
long num9 = default(long);
|
||||
float num8 = default(float);
|
||||
while (true)
|
||||
float num = ((sample.Mode == DriveMode.Ground) ? DistanceXZ(_anchorPosition, sample.Position) : Vector3.Distance(_anchorPosition, sample.Position));
|
||||
if (num >= options.GroundDistanceThreshold)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 508532327;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
float num7;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 2:
|
||||
num9 = sample.TimestampMs - _anchorMs;
|
||||
num = ((num9 < options.GroundWindowMs) ? 508532324 : 508532322);
|
||||
break;
|
||||
case 5:
|
||||
return Trip(in sample, num9, num8);
|
||||
case 1:
|
||||
num7 = DistanceXZ(_anchorPosition, sample.Position);
|
||||
goto IL_00ae;
|
||||
case 3:
|
||||
return null;
|
||||
case 0:
|
||||
num = 508532323;
|
||||
break;
|
||||
case 4:
|
||||
num7 = Vector3.Distance(_anchorPosition, sample.Position);
|
||||
goto IL_00ae;
|
||||
case 6:
|
||||
{
|
||||
_anchorMs = sample.TimestampMs;
|
||||
_anchorPosition = sample.Position;
|
||||
return null;
|
||||
}
|
||||
IL_00ae:
|
||||
num8 = num7;
|
||||
num = ((!(num8 >= options.GroundDistanceThreshold)) ? 508532325 : 508532321);
|
||||
break;
|
||||
}
|
||||
_anchorMs = sample.TimestampMs;
|
||||
_anchorPosition = sample.Position;
|
||||
return null;
|
||||
}
|
||||
long num2 = sample.TimestampMs - _anchorMs;
|
||||
if (num2 >= options.GroundWindowMs)
|
||||
{
|
||||
return Trip(in sample, num2, num);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private StallVerdict? Trip(in StallSample sample, long elapsedMs, float measured)
|
||||
{
|
||||
bool num = sample.TimestampMs < _cooldownUntilMs;
|
||||
Anchor(in sample, _anchorUsesProgress);
|
||||
int num2 = ((!num) ? (-1156731677) : (-1156731680));
|
||||
while (true)
|
||||
if (num)
|
||||
{
|
||||
int num3 = num2;
|
||||
int num4 = -1156731679;
|
||||
int num5 = num3;
|
||||
int num6 = num5 + num4;
|
||||
int num7 = num5 & num4;
|
||||
switch (num6 - (num7 + num7))
|
||||
{
|
||||
case 2:
|
||||
_cooldownUntilMs = sample.TimestampMs + options.CooldownMs;
|
||||
return new StallVerdict(elapsedMs, measured, sample.Mode);
|
||||
case 1:
|
||||
return null;
|
||||
case 0:
|
||||
goto IL_0092;
|
||||
}
|
||||
continue;
|
||||
IL_0092:
|
||||
num2 = -1156731680;
|
||||
return null;
|
||||
}
|
||||
_cooldownUntilMs = sample.TimestampMs + options.CooldownMs;
|
||||
return new StallVerdict(elapsedMs, measured, sample.Mode);
|
||||
}
|
||||
|
||||
private void Anchor(in StallSample sample, bool usesProgress)
|
||||
|
|
@ -217,11 +116,6 @@ public sealed class StallDetector(StallDetectorOptions options)
|
|||
{
|
||||
float num = a.X - b.X;
|
||||
float num2 = a.Z - b.Z;
|
||||
return _206A_202D_200C_206C_206C_206B_202D_202E_206B_200B_200B_206F_206F_202B_200D_200F_206A_202C_200C_202A_202D_202C_200B_206F_206F_200F_206F_206B_206E_200D_202C_200C_200D_206F_202A_202D_202D_200B_200D_202C_202E(num * num + num2 * num2);
|
||||
}
|
||||
|
||||
static float _206A_202D_200C_206C_206C_206B_202D_202E_206B_200B_200B_206F_206F_202B_200D_200F_206A_202C_200C_202A_202D_202C_200B_206F_206F_200F_206F_206B_206E_200D_202C_200C_200D_206F_202A_202D_202D_200B_200D_202C_202E(float P_0)
|
||||
{
|
||||
return MathF.Sqrt(P_0);
|
||||
return MathF.Sqrt(num * num + num2 * num2);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,22 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
|
||||
namespace LLib.Movement.Unstuck;
|
||||
|
||||
public sealed record StallDetectorOptions
|
||||
{
|
||||
[CompilerGenerated]
|
||||
private Type EqualityContract
|
||||
{
|
||||
[CompilerGenerated]
|
||||
get
|
||||
{
|
||||
return _200F_202A_206D_206E_202B_200C_200C_200C_200B_200E_200C_206F_202C_206B_200C_200D_206D_202A_202E_200F_200D_206A_206E_206C_206F_206F_200C_202C_202E_200C_202B_200C_206C_202E_200E_206C_206C_206E_200F_202E_202E(typeof(StallDetectorOptions).TypeHandle);
|
||||
}
|
||||
}
|
||||
|
||||
public float GroundDistanceThreshold { get; init; } = 0.3f;
|
||||
|
||||
public long GroundWindowMs { get; init; } = 500L;
|
||||
|
|
@ -28,141 +13,4 @@ public sealed record StallDetectorOptions
|
|||
public long ContinuityGapMs { get; init; } = 250L;
|
||||
|
||||
public long CooldownMs { get; init; } = 500L;
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder stringBuilder = _202D_202B_206E_200E_206A_202D_206E_206C_200B_206E_202C_200B_206D_206B_206C_200E_200E_206C_200B_200C_202C_202C_206F_206F_202C_206B_202D_200B_202C_206F_206B_202A_200B_200B_200D_206E_200B_202D_206C_206A_202E();
|
||||
_200F_202D_206D_202B_206F_206D_202A_206B_206C_200F_200D_206E_206F_202C_200E_202E_206C_206A_206E_202C_206A_200D_200F_202A_200C_200B_202E_202C_200D_206E_202D_200F_202A_202D_206F_206E_206D_200D_202B_202E(stringBuilder, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(701563104));
|
||||
_200F_202D_206D_202B_206F_206D_202A_206B_206C_200F_200D_206E_206F_202C_200E_202E_206C_206A_206E_202C_206A_200D_200F_202A_200C_200B_202E_202C_200D_206E_202D_200F_202A_202D_206F_206E_206D_200D_202B_202E(stringBuilder, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(1148273145));
|
||||
int num = ((!PrintMembers(stringBuilder)) ? (-1370681067) : (-1370681068));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1370681067;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 2:
|
||||
num = -1370681068;
|
||||
break;
|
||||
case 0:
|
||||
_202D_202E_200E_202E_200D_206E_200B_206F_202E_202B_206E_202A_202A_200B_202A_202B_200C_202C_202D_200C_202D_202B_206B_200B_206D_206F_200D_200B_202E_202A_202C_202A_206B_206C_200B_200D_202B_206D_202B_206F_202E(stringBuilder, '}');
|
||||
return _206D_202D_200B_200D_206B_206D_200F_200B_200F_200D_202C_202D_206B_200F_206E_202C_202A_202C_200F_202B_206F_206E_206B_200B_206C_200B_202B_206E_206F_206F_206B_202B_202C_202C_202D_202E_200F_206A_202D_202C_202E((object)stringBuilder);
|
||||
case 1:
|
||||
_202D_202E_200E_202E_200D_206E_200B_206F_202E_202B_206E_202A_202A_200B_202A_202B_200C_202C_202D_200C_202D_202B_206B_200B_206D_206F_200D_200B_202E_202A_202C_202A_206B_206C_200B_200D_202B_206D_202B_206F_202E(stringBuilder, ' ');
|
||||
num = -1370681067;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
private bool PrintMembers(StringBuilder builder)
|
||||
{
|
||||
_206E_206F_200D_206F_200E_202B_200B_202B_206A_202A_206C_200C_200D_206A_200D_202D_200C_202A_206E_202C_206B_200E_206A_202E_206A_206F_200E_200D_200D_202A_200B_206A_206B_206F_202B_200B_200D_200F_202E_206B_202E();
|
||||
_200F_202D_206D_202B_206F_206D_202A_206B_206C_200F_200D_206E_206F_202C_200E_202E_206C_206A_206E_202C_206A_200D_200F_202A_200C_200B_202E_202C_200D_206E_202D_200F_202A_202D_206F_206E_206D_200D_202B_202E(builder, global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(486831587));
|
||||
_200F_202D_206D_202B_206F_206D_202A_206B_206C_200F_200D_206E_206F_202C_200E_202E_206C_206A_206E_202C_206A_200D_200F_202A_200C_200B_202E_202C_200D_206E_202D_200F_202A_202D_206F_206E_206D_200D_202B_202E(builder, GroundDistanceThreshold.ToString());
|
||||
_200F_202D_206D_202B_206F_206D_202A_206B_206C_200F_200D_206E_206F_202C_200E_202E_206C_206A_206E_202C_206A_200D_200F_202A_200C_200B_202E_202C_200D_206E_202D_200F_202A_202D_206F_206E_206D_200D_202B_202E(builder, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(456054749));
|
||||
_200F_202D_206D_202B_206F_206D_202A_206B_206C_200F_200D_206E_206F_202C_200E_202E_206C_206A_206E_202C_206A_200D_200F_202A_200C_200B_202E_202C_200D_206E_202D_200F_202A_202D_206F_206E_206D_200D_202B_202E(builder, GroundWindowMs.ToString());
|
||||
_200F_202D_206D_202B_206F_206D_202A_206B_206C_200F_200D_206E_206F_202C_200E_202E_206C_206A_206E_202C_206A_200D_200F_202A_200C_200B_202E_202C_200D_206E_202D_200F_202A_202D_206F_206E_206D_200D_202B_202E(builder, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(1152636967));
|
||||
_200F_202D_206D_202B_206F_206D_202A_206B_206C_200F_200D_206E_206F_202C_200E_202E_206C_206A_206E_202C_206A_200D_200F_202A_200C_200B_202E_202C_200D_206E_202D_200F_202A_202D_206F_206E_206D_200D_202B_202E(builder, ProgressImprovementThreshold.ToString());
|
||||
_200F_202D_206D_202B_206F_206D_202A_206B_206C_200F_200D_206E_206F_202C_200E_202E_206C_206A_206E_202C_206A_200D_200F_202A_200C_200B_202E_202C_200D_206E_202D_200F_202A_202D_206F_206E_206D_200D_202B_202E(builder, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(942915890));
|
||||
_200F_202D_206D_202B_206F_206D_202A_206B_206C_200F_200D_206E_206F_202C_200E_202E_206C_206A_206E_202C_206A_200D_200F_202A_200C_200B_202E_202C_200D_206E_202D_200F_202A_202D_206F_206E_206D_200D_202B_202E(builder, ProgressWindowMs.ToString());
|
||||
_200F_202D_206D_202B_206F_206D_202A_206B_206C_200F_200D_206E_206F_202C_200E_202E_206C_206A_206E_202C_206A_200D_200F_202A_200C_200B_202E_202C_200D_206E_202D_200F_202A_202D_206F_206E_206D_200D_202B_202E(builder, global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-1835438226));
|
||||
_200F_202D_206D_202B_206F_206D_202A_206B_206C_200F_200D_206E_206F_202C_200E_202E_206C_206A_206E_202C_206A_200D_200F_202A_200C_200B_202E_202C_200D_206E_202D_200F_202A_202D_206F_206E_206D_200D_202B_202E(builder, ContinuityGapMs.ToString());
|
||||
_200F_202D_206D_202B_206F_206D_202A_206B_206C_200F_200D_206E_206F_202C_200E_202E_206C_206A_206E_202C_206A_200D_200F_202A_200C_200B_202E_202C_200D_206E_202D_200F_202A_202D_206F_206E_206D_200D_202B_202E(builder, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(-1517208652));
|
||||
_200F_202D_206D_202B_206F_206D_202A_206B_206C_200F_200D_206E_206F_202C_200E_202E_206C_206A_206E_202C_206A_200D_200F_202A_200C_200B_202E_202C_200D_206E_202D_200F_202A_202D_206F_206E_206D_200D_202B_202E(builder, CooldownMs.ToString());
|
||||
return true;
|
||||
}
|
||||
|
||||
[CompilerGenerated]
|
||||
public bool Equals(StallDetectorOptions? other)
|
||||
{
|
||||
int num = (((object)this == other) ? 1683992717 : 1683992704);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1683992711;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 1:
|
||||
return false;
|
||||
case 3:
|
||||
num = ((!EqualityComparer<long>.Default.Equals(ProgressWindowMs, other.ProgressWindowMs)) ? 1683992710 : 1683992707);
|
||||
break;
|
||||
case 6:
|
||||
num = 1683992704;
|
||||
break;
|
||||
case 0:
|
||||
num = ((!EqualityComparer<float>.Default.Equals(GroundDistanceThreshold, other.GroundDistanceThreshold)) ? 1683992710 : 1683992706);
|
||||
break;
|
||||
case 2:
|
||||
num = ((!EqualityComparer<float>.Default.Equals(ProgressImprovementThreshold, other.ProgressImprovementThreshold)) ? 1683992710 : 1683992708);
|
||||
break;
|
||||
case 4:
|
||||
num = ((!EqualityComparer<long>.Default.Equals(ContinuityGapMs, other.ContinuityGapMs)) ? 1683992710 : 1683992719);
|
||||
break;
|
||||
case 10:
|
||||
return true;
|
||||
case 9:
|
||||
num = ((!_200D_206F_206A_200F_206A_200F_206A_200C_200B_206F_200C_202B_202E_200C_206F_206E_206C_200E_200C_206D_202D_202B_206B_202A_202A_206D_202C_206E_200D_202E_206B_202D_206D_206D_206F_202D_206C_206C_206D_206F_202E(EqualityContract, other.EqualityContract)) ? 1683992710 : 1683992711);
|
||||
break;
|
||||
case 7:
|
||||
num = (((object)other == null) ? 1683992710 : 1683992718);
|
||||
break;
|
||||
case 5:
|
||||
num = ((!EqualityComparer<long>.Default.Equals(GroundWindowMs, other.GroundWindowMs)) ? 1683992710 : 1683992709);
|
||||
break;
|
||||
case 8:
|
||||
return EqualityComparer<long>.Default.Equals(CooldownMs, other.CooldownMs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool IEquatable<StallDetectorOptions>.Equals(StallDetectorOptions? other)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in Equals
|
||||
return this.Equals(other);
|
||||
}
|
||||
|
||||
static Type _200F_202A_206D_206E_202B_200C_200C_200C_200B_200E_200C_206F_202C_206B_200C_200D_206D_202A_202E_200F_200D_206A_206E_206C_206F_206F_200C_202C_202E_200C_202B_200C_206C_202E_200E_206C_206C_206E_200F_202E_202E(RuntimeTypeHandle P_0)
|
||||
{
|
||||
return Type.GetTypeFromHandle(P_0);
|
||||
}
|
||||
|
||||
static StringBuilder _202D_202B_206E_200E_206A_202D_206E_206C_200B_206E_202C_200B_206D_206B_206C_200E_200E_206C_200B_200C_202C_202C_206F_206F_202C_206B_202D_200B_202C_206F_206B_202A_200B_200B_200D_206E_200B_202D_206C_206A_202E()
|
||||
{
|
||||
return new StringBuilder();
|
||||
}
|
||||
|
||||
static StringBuilder _200F_202D_206D_202B_206F_206D_202A_206B_206C_200F_200D_206E_206F_202C_200E_202E_206C_206A_206E_202C_206A_200D_200F_202A_200C_200B_202E_202C_200D_206E_202D_200F_202A_202D_206F_206E_206D_200D_202B_202E(StringBuilder P_0, string P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static StringBuilder _202D_202E_200E_202E_200D_206E_200B_206F_202E_202B_206E_202A_202A_200B_202A_202B_200C_202C_202D_200C_202D_202B_206B_200B_206D_206F_200D_200B_202E_202A_202C_202A_206B_206C_200B_200D_202B_206D_202B_206F_202E(StringBuilder P_0, char P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static string _206D_202D_200B_200D_206B_206D_200F_200B_200F_200D_202C_202D_206B_200F_206E_202C_202A_202C_200F_202B_206F_206E_206B_200B_206C_200B_202B_206E_206F_206F_206B_202B_202C_202C_202D_202E_200F_206A_202D_202C_202E(object P_0)
|
||||
{
|
||||
return P_0.ToString();
|
||||
}
|
||||
|
||||
static void _206E_206F_200D_206F_200E_202B_200B_202B_206A_202A_206C_200C_200D_206A_200D_202D_200C_202A_206E_202C_206B_200E_206A_202E_206A_206F_200E_200D_200D_202A_200B_206A_206B_206F_202B_200B_200D_200F_202E_206B_202E()
|
||||
{
|
||||
RuntimeHelpers.EnsureSufficientExecutionStack();
|
||||
}
|
||||
|
||||
static bool _200D_206F_206A_200F_206A_200F_206A_200C_200B_206F_200C_202B_202E_200C_206F_206E_206C_200E_200C_206D_202D_202B_206B_202A_202A_206D_202C_206E_200D_202E_206B_202D_206D_206D_206F_202D_206C_206C_206D_206F_202E(Type P_0, Type P_1)
|
||||
{
|
||||
return P_0 == P_1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,115 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Numerics;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
|
||||
namespace LLib.Movement.Unstuck;
|
||||
|
||||
public readonly record struct StallSample(long TimestampMs, Vector3 Position, DriveMode Mode, bool Driving, float? DistanceToTarget)
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder stringBuilder = _206C_206D_202E_200F_202B_206A_206E_200E_200F_206F_202C_206D_206E_200E_200D_200D_200D_202B_200E_206C_200F_206F_206A_202D_206E_206B_202C_202D_206D_200D_202D_202A_206F_206C_206A_206E_206A_202B_206C_206C_202E();
|
||||
_202A_202C_206C_206C_200D_206F_206B_206F_202E_200D_202E_200C_200C_202A_200D_202C_206E_206C_206C_200C_200B_206D_202B_200C_206E_200C_200C_200B_206A_202E_202D_206A_206D_206B_206C_202E_200D_206C_202E(stringBuilder, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(-843870221));
|
||||
_202A_202C_206C_206C_200D_206F_206B_206F_202E_200D_202E_200C_200C_202A_200D_202C_206E_206C_206C_200C_200B_206D_202B_200C_206E_200C_200C_200B_206A_202E_202D_206A_206D_206B_206C_202E_200D_206C_202E(stringBuilder, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(1581517409));
|
||||
int num = ((!PrintMembers(stringBuilder)) ? (-435415033) : (-435415036));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -435415035;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 2:
|
||||
_206E_200B_206D_200C_206C_202A_202C_202B_206F_200D_200D_200D_206C_206A_206B_200B_200C_202B_202A_206D_206B_200B_202A_202C_206E_202B_202B_202A_200C_202E_206B_206D_206A_206A_202E_202E_206E_200C_200C_206F_202E(stringBuilder, '}');
|
||||
return _206B_206E_206D_206A_206D_202D_202D_200C_202B_202E_206F_202D_206F_206B_202C_202D_206A_202B_200C_202D_206C_206C_202B_206A_202C_202A_200F_206D_202B_206C_200D_202B_202B_206C_206C_206D_206B_200D_200C_206A_202E((object)stringBuilder);
|
||||
case 1:
|
||||
_206E_200B_206D_200C_206C_202A_202C_202B_206F_200D_200D_200D_206C_206A_206B_200B_200C_202B_202A_206D_206B_200B_202A_202C_206E_202B_202B_202A_200C_202E_206B_206D_206A_206A_202E_202E_206E_200C_200C_206F_202E(stringBuilder, ' ');
|
||||
num = -435415033;
|
||||
break;
|
||||
case 0:
|
||||
num = -435415036;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
private bool PrintMembers(StringBuilder builder)
|
||||
{
|
||||
_202A_202C_206C_206C_200D_206F_206B_206F_202E_200D_202E_200C_200C_202A_200D_202C_206E_206C_206C_200C_200B_206D_202B_200C_206E_200C_200C_200B_206A_202E_202D_206A_206D_206B_206C_202E_200D_206C_202E(builder, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(1273497407));
|
||||
_202A_202C_206C_206C_200D_206F_206B_206F_202E_200D_202E_200C_200C_202A_200D_202C_206E_206C_206C_200C_200B_206D_202B_200C_206E_200C_200C_200B_206A_202E_202D_206A_206D_206B_206C_202E_200D_206C_202E(builder, TimestampMs.ToString());
|
||||
_202A_202C_206C_206C_200D_206F_206B_206F_202E_200D_202E_200C_200C_202A_200D_202C_206E_206C_206C_200C_200B_206D_202B_200C_206E_200C_200C_200B_206A_202E_202D_206A_206D_206B_206C_202E_200D_206C_202E(builder, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(-73966411));
|
||||
_202A_202C_206C_206C_200D_206F_206B_206F_202E_200D_202E_200C_200C_202A_200D_202C_206E_206C_206C_200C_200B_206D_202B_200C_206E_200C_200C_200B_206A_202E_202D_206A_206D_206B_206C_202E_200D_206C_202E(builder, Position.ToString());
|
||||
_202A_202C_206C_206C_200D_206F_206B_206F_202E_200D_202E_200C_200C_202A_200D_202C_206E_206C_206C_200C_200B_206D_202B_200C_206E_200C_200C_200B_206A_202E_202D_206A_206D_206B_206C_202E_200D_206C_202E(builder, global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-1530027189));
|
||||
_202A_202C_206C_206C_200D_206F_206B_206F_202E_200D_202E_200C_200C_202A_200D_202C_206E_206C_206C_200C_200B_206D_202B_200C_206E_200C_200C_200B_206A_202E_202D_206A_206D_206B_206C_202E_200D_206C_202E(builder, Mode.ToString());
|
||||
_202A_202C_206C_206C_200D_206F_206B_206F_202E_200D_202E_200C_200C_202A_200D_202C_206E_206C_206C_200C_200B_206D_202B_200C_206E_200C_200C_200B_206A_202E_202D_206A_206D_206B_206C_202E_200D_206C_202E(builder, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(-1807392495));
|
||||
_202A_202C_206C_206C_200D_206F_206B_206F_202E_200D_202E_200C_200C_202A_200D_202C_206E_206C_206C_200C_200B_206D_202B_200C_206E_200C_200C_200B_206A_202E_202D_206A_206D_206B_206C_202E_200D_206C_202E(builder, Driving.ToString());
|
||||
_202A_202C_206C_206C_200D_206F_206B_206F_202E_200D_202E_200C_200C_202A_200D_202C_206E_206C_206C_200C_200B_206D_202B_200C_206E_200C_200C_200B_206A_202E_202D_206A_206D_206B_206C_202E_200D_206C_202E(builder, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(371582453));
|
||||
_202A_202C_206C_206C_200D_206F_206B_206F_202E_200D_202E_200C_200C_202A_200D_202C_206E_206C_206C_200C_200B_206D_202B_200C_206E_200C_200C_200B_206A_202E_202D_206A_206D_206B_206C_202E_200D_206C_202E(builder, DistanceToTarget.ToString());
|
||||
return true;
|
||||
}
|
||||
|
||||
[CompilerGenerated]
|
||||
public bool Equals(StallSample other)
|
||||
{
|
||||
int num = ((!EqualityComparer<long>.Default.Equals(TimestampMs, other.TimestampMs)) ? 364630668 : 364630670);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 364630671;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 5:
|
||||
num = 364630670;
|
||||
break;
|
||||
case 0:
|
||||
return EqualityComparer<float?>.Default.Equals(DistanceToTarget, other.DistanceToTarget);
|
||||
case 3:
|
||||
return false;
|
||||
case 1:
|
||||
num = ((!EqualityComparer<Vector3>.Default.Equals(Position, other.Position)) ? 364630668 : 364630669);
|
||||
break;
|
||||
case 2:
|
||||
num = ((!EqualityComparer<DriveMode>.Default.Equals(Mode, other.Mode)) ? 364630668 : 364630667);
|
||||
break;
|
||||
case 4:
|
||||
num = ((!EqualityComparer<bool>.Default.Equals(Driving, other.Driving)) ? 364630668 : 364630671);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool IEquatable<StallSample>.Equals(StallSample other)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in Equals
|
||||
return this.Equals(other);
|
||||
}
|
||||
|
||||
static StringBuilder _206C_206D_202E_200F_202B_206A_206E_200E_200F_206F_202C_206D_206E_200E_200D_200D_200D_202B_200E_206C_200F_206F_206A_202D_206E_206B_202C_202D_206D_200D_202D_202A_206F_206C_206A_206E_206A_202B_206C_206C_202E()
|
||||
{
|
||||
return new StringBuilder();
|
||||
}
|
||||
|
||||
static StringBuilder _202A_202C_206C_206C_200D_206F_206B_206F_202E_200D_202E_200C_200C_202A_200D_202C_206E_206C_206C_200C_200B_206D_202B_200C_206E_200C_200C_200B_206A_202E_202D_206A_206D_206B_206C_202E_200D_206C_202E(StringBuilder P_0, string P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static StringBuilder _206E_200B_206D_200C_206C_202A_202C_202B_206F_200D_200D_200D_206C_206A_206B_200B_200C_202B_202A_206D_206B_200B_202A_202C_206E_202B_202B_202A_200C_202E_206B_206D_206A_206A_202E_202E_206E_200C_200C_206F_202E(StringBuilder P_0, char P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static string _206B_206E_206D_206A_206D_202D_202D_200C_202B_202E_206F_202D_206F_206B_202C_202D_206A_202B_200C_202D_206C_206C_202B_206A_202C_202A_200F_206D_202B_206C_200D_202B_202B_206C_206C_206D_206B_200D_200C_206A_202E(object P_0)
|
||||
{
|
||||
return P_0.ToString();
|
||||
}
|
||||
}
|
||||
public readonly record struct StallSample(long TimestampMs, Vector3 Position, DriveMode Mode, bool Driving, float? DistanceToTarget);
|
||||
|
|
|
|||
|
|
@ -1,106 +1,3 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
|
||||
namespace LLib.Movement.Unstuck;
|
||||
|
||||
public readonly record struct StallVerdict(long WindowMs, float MovedDistance, DriveMode Mode)
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder stringBuilder = _200C_206C_206B_202E_202E_206B_200E_202D_200D_202A_200F_206D_206C_206F_206B_200E_206C_206E_206E_202C_200B_206D_202C_202A_202B_202C_206E_200D_206C_200D_200C_200C_202A_206A_206F_202C_200D_206D_206D_202E();
|
||||
_206F_206B_200E_202C_200D_206B_200E_206E_206A_200D_200B_206B_202E_206F_202B_202E_202A_206A_206C_200C_202E_202B_202E_206D_200D_206E_202B_200B_206E_200D_200D_200F_206F_200B_206C_200D_206A_200C_206D_206A_202E(stringBuilder, global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-1822422138));
|
||||
_206F_206B_200E_202C_200D_206B_200E_206E_206A_200D_200B_206B_202E_206F_202B_202E_202A_206A_206C_200C_202E_202B_202E_206D_200D_206E_202B_200B_206E_200D_200D_200F_206F_200B_206C_200D_206A_200C_206D_206A_202E(stringBuilder, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(1581517409));
|
||||
int num = ((!PrintMembers(stringBuilder)) ? (-1803587058) : (-1803587059));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1803587060;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 2:
|
||||
_200E_202E_200F_202A_200D_206A_206C_206E_200D_200C_202C_206F_200C_200F_202A_206E_200D_202A_202A_206F_202A_206B_202A_206F_206C_202C_200C_202E_200B_202B_200F_202E_202A_206D_202D_200D_202B_200D_200F_206A_202E(stringBuilder, '}');
|
||||
return _202E_202D_202D_202B_200B_200C_206B_206C_200F_200E_206E_206C_200F_200D_206C_206A_202B_206A_202A_206D_202E_206C_202E_202B_200C_206C_206A_206E_206F_206E_206B_200C_206B_200E_206F_202B_206E_202D_202C_200D_202E((object)stringBuilder);
|
||||
case 1:
|
||||
_200E_202E_200F_202A_200D_206A_206C_206E_200D_200C_202C_206F_200C_200F_202A_206E_200D_202A_202A_206F_202A_206B_202A_206F_206C_202C_200C_202E_200B_202B_200F_202E_202A_206D_202D_200D_202B_200D_200F_206A_202E(stringBuilder, ' ');
|
||||
num = -1803587058;
|
||||
break;
|
||||
case 0:
|
||||
num = -1803587059;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
private bool PrintMembers(StringBuilder builder)
|
||||
{
|
||||
_206F_206B_200E_202C_200D_206B_200E_206E_206A_200D_200B_206B_202E_206F_202B_202E_202A_206A_206C_200C_202E_202B_202E_206D_200D_206E_202B_200B_206E_200D_200D_200F_206F_200B_206C_200D_206A_200C_206D_206A_202E(builder, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(1679493069));
|
||||
_206F_206B_200E_202C_200D_206B_200E_206E_206A_200D_200B_206B_202E_206F_202B_202E_202A_206A_206C_200C_202E_202B_202E_206D_200D_206E_202B_200B_206E_200D_200D_200F_206F_200B_206C_200D_206A_200C_206D_206A_202E(builder, WindowMs.ToString());
|
||||
_206F_206B_200E_202C_200D_206B_200E_206E_206A_200D_200B_206B_202E_206F_202B_202E_202A_206A_206C_200C_202E_202B_202E_206D_200D_206E_202B_200B_206E_200D_200D_200F_206F_200B_206C_200D_206A_200C_206D_206A_202E(builder, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(-980000238));
|
||||
_206F_206B_200E_202C_200D_206B_200E_206E_206A_200D_200B_206B_202E_206F_202B_202E_202A_206A_206C_200C_202E_202B_202E_206D_200D_206E_202B_200B_206E_200D_200D_200F_206F_200B_206C_200D_206A_200C_206D_206A_202E(builder, MovedDistance.ToString());
|
||||
_206F_206B_200E_202C_200D_206B_200E_206E_206A_200D_200B_206B_202E_206F_202B_202E_202A_206A_206C_200C_202E_202B_202E_206D_200D_206E_202B_200B_206E_200D_200D_200F_206F_200B_206C_200D_206A_200C_206D_206A_202E(builder, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(-830019758));
|
||||
_206F_206B_200E_202C_200D_206B_200E_206E_206A_200D_200B_206B_202E_206F_202B_202E_202A_206A_206C_200C_202E_202B_202E_206D_200D_206E_202B_200B_206E_200D_200D_200F_206F_200B_206C_200D_206A_200C_206D_206A_202E(builder, Mode.ToString());
|
||||
return true;
|
||||
}
|
||||
|
||||
[CompilerGenerated]
|
||||
public bool Equals(StallVerdict other)
|
||||
{
|
||||
int num = ((!EqualityComparer<long>.Default.Equals(WindowMs, other.WindowMs)) ? 449006355 : 449006353);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 449006355;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 3:
|
||||
num = 449006353;
|
||||
break;
|
||||
case 1:
|
||||
return EqualityComparer<DriveMode>.Default.Equals(Mode, other.Mode);
|
||||
case 0:
|
||||
return false;
|
||||
case 2:
|
||||
num = ((!EqualityComparer<float>.Default.Equals(MovedDistance, other.MovedDistance)) ? 449006355 : 449006354);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool IEquatable<StallVerdict>.Equals(StallVerdict other)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in Equals
|
||||
return this.Equals(other);
|
||||
}
|
||||
|
||||
static StringBuilder _200C_206C_206B_202E_202E_206B_200E_202D_200D_202A_200F_206D_206C_206F_206B_200E_206C_206E_206E_202C_200B_206D_202C_202A_202B_202C_206E_200D_206C_200D_200C_200C_202A_206A_206F_202C_200D_206D_206D_202E()
|
||||
{
|
||||
return new StringBuilder();
|
||||
}
|
||||
|
||||
static StringBuilder _206F_206B_200E_202C_200D_206B_200E_206E_206A_200D_200B_206B_202E_206F_202B_202E_202A_206A_206C_200C_202E_202B_202E_206D_200D_206E_202B_200B_206E_200D_200D_200F_206F_200B_206C_200D_206A_200C_206D_206A_202E(StringBuilder P_0, string P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static StringBuilder _200E_202E_200F_202A_200D_206A_206C_206E_200D_200C_202C_206F_200C_200F_202A_206E_200D_202A_202A_206F_202A_206B_202A_206F_206C_202C_200C_202E_200B_202B_200F_202E_202A_206D_202D_200D_202B_200D_200F_206A_202E(StringBuilder P_0, char P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static string _202E_202D_202D_202B_200B_200C_206B_206C_200F_200E_206E_206C_200F_200D_206C_206A_202B_206A_202A_206D_202E_206C_202E_202B_200C_206C_206A_206E_206F_206E_206B_200C_206B_200E_206F_202B_206E_202D_202C_200D_202E(object P_0)
|
||||
{
|
||||
return P_0.ToString();
|
||||
}
|
||||
}
|
||||
public readonly record struct StallVerdict(long WindowMs, float MovedDistance, DriveMode Mode);
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,6 +1,5 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using FFXIVClientStructs.FFXIV.Client.Graphics.Kernel;
|
||||
using LLib.ImGui;
|
||||
|
|
@ -134,27 +133,11 @@ public sealed class OutOfGameNotifier : IDisposable
|
|||
get
|
||||
{
|
||||
Device* ptr = Device.Instance();
|
||||
int num = ((ptr != null) ? 539179088 : 539179091);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 539179090;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
goto IL_004b;
|
||||
case 2:
|
||||
return (nint)ptr->hWnd;
|
||||
case 1:
|
||||
return 0;
|
||||
}
|
||||
continue;
|
||||
IL_004b:
|
||||
num = 539179091;
|
||||
return 0;
|
||||
}
|
||||
return (nint)ptr->hWnd;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -163,27 +146,11 @@ public sealed class OutOfGameNotifier : IDisposable
|
|||
get
|
||||
{
|
||||
nint gameWindowHandle = GameWindowHandle;
|
||||
int num = ((gameWindowHandle == 0) ? 1427669893 : 1427669894);
|
||||
while (true)
|
||||
if (gameWindowHandle != 0)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1427669892;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0049;
|
||||
case 1:
|
||||
return false;
|
||||
case 2:
|
||||
return NativeMethods.GetForegroundWindow() == gameWindowHandle;
|
||||
}
|
||||
continue;
|
||||
IL_0049:
|
||||
num = 1427669894;
|
||||
return NativeMethods.GetForegroundWindow() == gameWindowHandle;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -197,231 +164,118 @@ public sealed class OutOfGameNotifier : IDisposable
|
|||
WindowFlash.Flash(GameWindowHandle, 0u);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public void PlayAlertSound(string? wavPath)
|
||||
{
|
||||
int num = (_202E_202E_200E_206D_200E_202B_206E_206C_202D_202D_202D_200B_206D_200C_200E_206B_206B_202D_202B_206A_202B_206A_200D_206B_206E_202B_200B_202C_206D_206F_200B_206C_200D_206D_206B_206E_200B_200C_200D_200D_202E(wavPath) ? 199681171 : 199681169);
|
||||
while (true)
|
||||
if (!string.IsNullOrEmpty(wavPath) && File.Exists(wavPath))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 199681171;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
if (NativeMethods.PlaySound(wavPath, 0, 131075u))
|
||||
{
|
||||
case 5:
|
||||
num = 199681169;
|
||||
break;
|
||||
case 3:
|
||||
num = ((!NativeMethods.PlaySound(wavPath, 0, 131075u)) ? 199681170 : 199681175);
|
||||
break;
|
||||
case 1:
|
||||
_200E_200D_202A_200C_206A_206E_200D_202D_206C_202E_202D_202C_202E_200D_200E_206D_206D_200D_200E_206F_206F_200E_202B_202B_200C_200B_200B_200B_206E_200E_206B_206F_200B_206C_200B_202C_206B_200C_200B_206F_202E((ILogger)_logger, global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-928191835), new object[1] { wavPath });
|
||||
num = 199681171;
|
||||
break;
|
||||
case 2:
|
||||
num = ((!_200C_200B_202C_206C_206B_202D_206B_202C_202D_206C_202D_200C_206A_200F_206F_206B_202D_200F_206B_202E_206F_202B_206D_200C_202B_206D_202C_200D_200F_202E_202E_200E_206E_200F_200C_206D_200F_202A_200B_200E_202E(wavPath)) ? 199681171 : 199681168);
|
||||
break;
|
||||
case 0:
|
||||
num = (NativeMethods.MessageBeep(64u) ? 199681172 : 199681173);
|
||||
break;
|
||||
case 7:
|
||||
return;
|
||||
case 6:
|
||||
_200E_200D_202A_200C_206A_206E_200D_202D_206C_202E_202D_202C_202E_200D_200E_206D_206D_200D_200E_206F_206F_200E_202B_202B_200C_200B_200B_200B_206E_200E_206B_206F_200B_206C_200B_202C_206B_200C_200B_206F_202E((ILogger)_logger, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(1376931042), Array.Empty<object>());
|
||||
num = 199681172;
|
||||
break;
|
||||
case 4:
|
||||
return;
|
||||
}
|
||||
_logger.LogTrace("PlaySound failed for {Path}, falling back to beep", wavPath);
|
||||
}
|
||||
if (!NativeMethods.MessageBeep(64u))
|
||||
{
|
||||
_logger.LogTrace("MessageBeep returned false");
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public void ShowTrayNotification(string title, string message)
|
||||
{
|
||||
nint gameWindowHandle = GameWindowHandle;
|
||||
int num = ((gameWindowHandle != 0) ? (-102834731) : (-102834730));
|
||||
nint num8 = default(nint);
|
||||
while (true)
|
||||
if (gameWindowHandle == 0)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -102834732;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
_logger.LogWarning("Cannot show tray notification - game window handle not available");
|
||||
return;
|
||||
}
|
||||
try
|
||||
{
|
||||
if (!_trayIconRegistered)
|
||||
{
|
||||
case 0:
|
||||
goto IL_0050;
|
||||
case 2:
|
||||
_202C_202E_200B_206C_202C_206E_206E_202C_206B_206D_206F_206B_202C_202C_202A_206B_200B_206C_202B_202C_206F_206F_206F_202B_202C_200E_206B_200D_206B_200D_202C_202E_206D_206E_206D_206D_202D_206B_202E_206E_202E((ILogger)_logger, global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-498044301), Array.Empty<object>());
|
||||
return;
|
||||
case 1:
|
||||
try
|
||||
nint num = GetGameIcon(gameWindowHandle);
|
||||
if (num == 0)
|
||||
{
|
||||
num = (_trayIconRegistered ? (-1863308179) : (-1863308178));
|
||||
while (true)
|
||||
{
|
||||
int num5 = num;
|
||||
num3 = -1863308179;
|
||||
num4 = num5;
|
||||
int num6 = num4 + num3;
|
||||
int num7 = num4 & num3;
|
||||
switch (num6 - (num7 + num7))
|
||||
{
|
||||
case 4:
|
||||
{
|
||||
NOTIFYICONDATA lpData3 = new NOTIFYICONDATA
|
||||
{
|
||||
cbSize = (uint)Marshal.SizeOf<NOTIFYICONDATA>(),
|
||||
hWnd = gameWindowHandle,
|
||||
uID = 176u,
|
||||
uTimeoutOrVersion = 4u
|
||||
};
|
||||
NativeMethods.Shell_NotifyIcon(4u, ref lpData3);
|
||||
_trayHWnd = gameWindowHandle;
|
||||
_trayIconRegistered = true;
|
||||
num = -1863308179;
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
num8 = GetGameIcon(gameWindowHandle);
|
||||
num = ((num8 != 0) ? (-1863308184) : (-1863308180));
|
||||
break;
|
||||
case 8:
|
||||
_202C_202E_200B_206C_202C_206E_206E_202C_206B_206D_206F_206B_202C_202C_202A_206B_200B_206C_202B_202C_206F_206F_206F_202B_202C_200E_206B_200D_206B_200D_202C_202E_206D_206E_206D_206D_202D_206B_202E_206E_202E((ILogger)_logger, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(-218723301), Array.Empty<object>());
|
||||
num = -1863308177;
|
||||
break;
|
||||
case 7:
|
||||
_202C_202E_200B_206C_202C_206E_206E_202C_206B_206D_206F_206B_202C_202C_202A_206B_200B_206C_202B_202C_206F_206F_206F_202B_202C_200E_206B_200D_206B_200D_202C_202E_206D_206E_206D_206D_202D_206B_202E_206E_202E((ILogger)_logger, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(621311524), Array.Empty<object>());
|
||||
return;
|
||||
case 6:
|
||||
num = -1863308178;
|
||||
break;
|
||||
case 1:
|
||||
num8 = NativeMethods.LoadIcon(0, 32512);
|
||||
num = -1863308184;
|
||||
break;
|
||||
case 0:
|
||||
{
|
||||
NOTIFYICONDATA lpData2 = new NOTIFYICONDATA
|
||||
{
|
||||
cbSize = (uint)Marshal.SizeOf<NOTIFYICONDATA>(),
|
||||
hWnd = _trayHWnd,
|
||||
uID = 176u,
|
||||
uFlags = 16u,
|
||||
szInfoTitle = Truncate(title, 63),
|
||||
szInfo = Truncate(message, 255),
|
||||
dwInfoFlags = 1u
|
||||
};
|
||||
num = (NativeMethods.Shell_NotifyIcon(1u, ref lpData2) ? (-1863308177) : (-1863308187));
|
||||
break;
|
||||
}
|
||||
case 5:
|
||||
{
|
||||
NOTIFYICONDATA lpData = new NOTIFYICONDATA
|
||||
{
|
||||
cbSize = (uint)Marshal.SizeOf<NOTIFYICONDATA>(),
|
||||
hWnd = gameWindowHandle,
|
||||
uID = 176u,
|
||||
uFlags = 6u,
|
||||
hIcon = num8,
|
||||
szTip = Truncate(title, 127)
|
||||
};
|
||||
num = (NativeMethods.Shell_NotifyIcon(0u, ref lpData) ? (-1863308183) : (-1863308182));
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
return;
|
||||
}
|
||||
}
|
||||
num = NativeMethods.LoadIcon(0, 32512);
|
||||
}
|
||||
catch (Exception ex)
|
||||
NOTIFYICONDATA lpData = new NOTIFYICONDATA
|
||||
{
|
||||
_206E_206A_206C_200C_200F_206C_202C_206E_206D_202C_200B_202B_202D_206C_202E_206C_200C_200E_206E_200E_202C_206F_202C_200B_202D_200F_200C_200F_202E_200F_200C_200D_206E_202B_200D_202B_202A_202B_200E_202E_202E((ILogger)_logger, ex, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(1309216025), Array.Empty<object>());
|
||||
cbSize = (uint)Marshal.SizeOf<NOTIFYICONDATA>(),
|
||||
hWnd = gameWindowHandle,
|
||||
uID = 176u,
|
||||
uFlags = 6u,
|
||||
hIcon = num,
|
||||
szTip = Truncate(title, 127)
|
||||
};
|
||||
if (!NativeMethods.Shell_NotifyIcon(0u, ref lpData))
|
||||
{
|
||||
_logger.LogWarning("Shell_NotifyIcon(NIM_ADD) failed");
|
||||
return;
|
||||
}
|
||||
NOTIFYICONDATA lpData2 = new NOTIFYICONDATA
|
||||
{
|
||||
cbSize = (uint)Marshal.SizeOf<NOTIFYICONDATA>(),
|
||||
hWnd = gameWindowHandle,
|
||||
uID = 176u,
|
||||
uTimeoutOrVersion = 4u
|
||||
};
|
||||
NativeMethods.Shell_NotifyIcon(4u, ref lpData2);
|
||||
_trayHWnd = gameWindowHandle;
|
||||
_trayIconRegistered = true;
|
||||
}
|
||||
continue;
|
||||
IL_0050:
|
||||
num = -102834730;
|
||||
NOTIFYICONDATA lpData3 = new NOTIFYICONDATA
|
||||
{
|
||||
cbSize = (uint)Marshal.SizeOf<NOTIFYICONDATA>(),
|
||||
hWnd = _trayHWnd,
|
||||
uID = 176u,
|
||||
uFlags = 16u,
|
||||
szInfoTitle = Truncate(title, 63),
|
||||
szInfo = Truncate(message, 255),
|
||||
dwInfoFlags = 1u
|
||||
};
|
||||
if (!NativeMethods.Shell_NotifyIcon(1u, ref lpData3))
|
||||
{
|
||||
_logger.LogWarning("Shell_NotifyIcon(NIM_MODIFY) failed");
|
||||
}
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
_logger.LogError(exception, "Failed to show tray notification");
|
||||
}
|
||||
}
|
||||
|
||||
private static nint GetGameIcon(nint hWnd)
|
||||
{
|
||||
nint num = NativeMethods.SendMessage(hWnd, 127u, 1, 0);
|
||||
int num2 = ((num != 0) ? 1006480639 : 1006480632);
|
||||
while (true)
|
||||
if (num == 0)
|
||||
{
|
||||
int num3 = num2;
|
||||
int num4 = 1006480638;
|
||||
int num5 = num3;
|
||||
switch ((num5 | num4) - (num5 & num4))
|
||||
{
|
||||
case 4:
|
||||
num2 = 1006480632;
|
||||
break;
|
||||
case 5:
|
||||
num = NativeMethods.GetClassLongPtr(hWnd, -14);
|
||||
num2 = 1006480637;
|
||||
break;
|
||||
case 1:
|
||||
num2 = ((num != 0) ? 1006480637 : 1006480635);
|
||||
break;
|
||||
case 2:
|
||||
return num;
|
||||
case 0:
|
||||
num = NativeMethods.GetClassLongPtr(hWnd, -34);
|
||||
num2 = 1006480636;
|
||||
break;
|
||||
case 3:
|
||||
num2 = ((num != 0) ? 1006480636 : 1006480638);
|
||||
break;
|
||||
case 6:
|
||||
num = NativeMethods.SendMessage(hWnd, 127u, 0, 0);
|
||||
num2 = 1006480639;
|
||||
break;
|
||||
}
|
||||
num = NativeMethods.SendMessage(hWnd, 127u, 0, 0);
|
||||
}
|
||||
if (num == 0)
|
||||
{
|
||||
num = NativeMethods.GetClassLongPtr(hWnd, -14);
|
||||
}
|
||||
if (num == 0)
|
||||
{
|
||||
num = NativeMethods.GetClassLongPtr(hWnd, -34);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
private static string Truncate(string value, int maxChars)
|
||||
{
|
||||
int num = ((_202C_206C_206F_202B_202E_206A_202C_206B_200F_200E_200F_200C_202E_202E_206C_206D_200C_200D_206A_202D_206B_200B_206E_206F_206F_200E_206B_202C_202A_202D_206C_206B_200D_200D_200E_200B_202A_202C_200D_206D_202E(value) <= maxChars) ? (-362575814) : (-362575815));
|
||||
while (true)
|
||||
if (value.Length > maxChars)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -362575813;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0047;
|
||||
case 2:
|
||||
return _200D_200D_200D_206C_200B_206C_200B_206A_206B_202D_202B_202E_200D_206E_206D_202A_200C_206C_200C_202C_206D_200B_200C_202B_202B_200F_202B_202A_200E_202E_200C_200B_206B_206A_202A_200C_200C_206D_206B_206A_202E(value, 0, maxChars);
|
||||
case 1:
|
||||
return value;
|
||||
}
|
||||
continue;
|
||||
IL_0047:
|
||||
num = -362575815;
|
||||
return value.Substring(0, maxChars);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
int num = ((!_disposed) ? 413573275 : 413573272);
|
||||
while (true)
|
||||
if (!_disposed)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 413573273;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
return;
|
||||
case 1:
|
||||
return;
|
||||
case 4:
|
||||
_disposed = true;
|
||||
if (_trayIconRegistered)
|
||||
{
|
||||
NOTIFYICONDATA lpData = new NOTIFYICONDATA
|
||||
{
|
||||
|
|
@ -431,57 +285,7 @@ public sealed class OutOfGameNotifier : IDisposable
|
|||
};
|
||||
NativeMethods.Shell_NotifyIcon(2u, ref lpData);
|
||||
_trayIconRegistered = false;
|
||||
return;
|
||||
}
|
||||
case 2:
|
||||
_disposed = true;
|
||||
num = (_trayIconRegistered ? 413573277 : 413573273);
|
||||
break;
|
||||
case 3:
|
||||
num = 413573272;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void IDisposable.Dispose()
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in Dispose
|
||||
this.Dispose();
|
||||
}
|
||||
|
||||
static bool _202E_202E_200E_206D_200E_202B_206E_206C_202D_202D_202D_200B_206D_200C_200E_206B_206B_202D_202B_206A_202B_206A_200D_206B_206E_202B_200B_202C_206D_206F_200B_206C_200D_206D_206B_206E_200B_200C_200D_200D_202E(string P_0)
|
||||
{
|
||||
return string.IsNullOrEmpty(P_0);
|
||||
}
|
||||
|
||||
static bool _200C_200B_202C_206C_206B_202D_206B_202C_202D_206C_202D_200C_206A_200F_206F_206B_202D_200F_206B_202E_206F_202B_206D_200C_202B_206D_202C_200D_200F_202E_202E_200E_206E_200F_200C_206D_200F_202A_200B_200E_202E(string P_0)
|
||||
{
|
||||
return File.Exists(P_0);
|
||||
}
|
||||
|
||||
static void _200E_200D_202A_200C_206A_206E_200D_202D_206C_202E_202D_202C_202E_200D_200E_206D_206D_200D_200E_206F_206F_200E_202B_202B_200C_200B_200B_200B_206E_200E_206B_206F_200B_206C_200B_202C_206B_200C_200B_206F_202E(ILogger P_0, string P_1, object[] P_2)
|
||||
{
|
||||
P_0.LogTrace(P_1, P_2);
|
||||
}
|
||||
|
||||
static void _202C_202E_200B_206C_202C_206E_206E_202C_206B_206D_206F_206B_202C_202C_202A_206B_200B_206C_202B_202C_206F_206F_206F_202B_202C_200E_206B_200D_206B_200D_202C_202E_206D_206E_206D_206D_202D_206B_202E_206E_202E(ILogger P_0, string P_1, object[] P_2)
|
||||
{
|
||||
P_0.LogWarning(P_1, P_2);
|
||||
}
|
||||
|
||||
static void _206E_206A_206C_200C_200F_206C_202C_206E_206D_202C_200B_202B_202D_206C_202E_206C_200C_200E_206E_200E_202C_206F_202C_200B_202D_200F_200C_200F_202E_200F_200C_200D_206E_202B_200D_202B_202A_202B_200E_202E_202E(ILogger P_0, Exception P_1, string P_2, object[] P_3)
|
||||
{
|
||||
P_0.LogError(P_1, P_2, P_3);
|
||||
}
|
||||
|
||||
static int _202C_206C_206F_202B_202E_206A_202C_206B_200F_200E_200F_200C_202E_202E_206C_206D_200C_200D_206A_202D_206B_200B_206E_206F_206F_200E_206B_202C_202A_202D_206C_206B_200D_200D_200E_200B_202A_202C_200D_206D_202E(string P_0)
|
||||
{
|
||||
return P_0.Length;
|
||||
}
|
||||
|
||||
static string _200D_200D_200D_206C_200B_206C_200B_206A_206B_202D_202B_202E_200D_206E_206D_202A_200C_206C_200C_202C_206D_200B_200C_202B_202B_200F_202B_202A_200E_202E_200C_200B_206B_206A_202A_200C_200C_206D_206B_206A_202E(string P_0, int P_1, int P_2)
|
||||
{
|
||||
return P_0.Substring(P_1, P_2);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,48 +2,24 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace LLib.Notifications;
|
||||
|
||||
public static class WindowsSounds
|
||||
{
|
||||
public static string MediaDirectory
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
get
|
||||
{
|
||||
return _200F_200F_200E_200D_206C_200B_206F_206F_202E_200B_206D_202C_202E_200B_200C_200F_202C_200F_206B_200D_202E_200C_200E_206C_206C_200C_202D_202B_200F_206D_206F_200F_206B_202A_200E_202B_200F_206F_206C_206E_202E(_206A_202A_202B_200B_200D_200F_206C_202A_206B_202E_202A_206D_202C_202D_200D_202E_202D_206E_206A_200B_206C_200D_206A_200D_202E_206E_206F_200F_200E_200D_202C_200D_200B_200B_202D_206F_200E_206C_200E_206F_202E(Environment.SpecialFolder.Windows), global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(-1437924549));
|
||||
}
|
||||
}
|
||||
public static string MediaDirectory => Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Windows), "Media");
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public static IReadOnlyList<string> ListWavFileNames()
|
||||
{
|
||||
try
|
||||
{
|
||||
int num = (_200B_206D_200F_202A_200F_206D_200F_206C_202A_200B_200F_200D_200F_206A_206A_206C_202D_206F_200E_202D_202C_200B_200F_202B_202D_206D_206C_200D_200D_206D_206D_200B_206A_202A_200E_202A_200E_202D_206F_200E_202E(MediaDirectory) ? 1352349132 : 1352349133);
|
||||
while (true)
|
||||
if (!Directory.Exists(MediaDirectory))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1352349132;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 2:
|
||||
goto IL_004c;
|
||||
case 1:
|
||||
return Array.Empty<string>();
|
||||
case 0:
|
||||
return _200E_202C_200D_200C_206E_202E_206D_200F_200B_202D_206B_202D_206B_206B_206D_206E_202B_206E_200E_202D_206E_206E_206B_202D_200C_206E_202E_202D_202E_202B_200E_206E_202B_200B_202D_206E_206B_200F_206A_202A_202E(MediaDirectory, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(-258286566)).Select(Path.GetFileName).OfType<string>().OrderBy<string, string>((string x) => x, _206E_200D_202B_206E_200B_206F_206E_202C_206E_200F_202D_206D_202E_202C_206A_206B_202C_206B_206F_206E_200F_206A_206A_206F_200C_206F_200D_200F_202E_200C_206E_202E_200E_206A_202D_200D_202C_200D_206D_202C_202E())
|
||||
.ToArray();
|
||||
}
|
||||
continue;
|
||||
IL_004c:
|
||||
num = 1352349133;
|
||||
return Array.Empty<string>();
|
||||
}
|
||||
return Directory.EnumerateFiles(MediaDirectory, "*.wav").Select(Path.GetFileName).OfType<string>()
|
||||
.OrderBy<string, string>((string x) => x, StringComparer.OrdinalIgnoreCase)
|
||||
.ToArray();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
|
@ -53,66 +29,15 @@ public static class WindowsSounds
|
|||
|
||||
public static string? ResolvePath(string? fileName)
|
||||
{
|
||||
int num = ((!_200C_202D_206A_200D_206E_202A_202B_202C_202A_206A_202D_206E_202B_202E_202B_200F_206C_206B_200D_206D_200E_202A_200F_202A_200F_206D_200E_200E_206B_206D_200D_200D_200C_202E_206B_206D_206E_206A_202A_200D_202E(fileName)) ? 301346880 : 301346882);
|
||||
string text = default(string);
|
||||
while (true)
|
||||
if (string.IsNullOrEmpty(fileName))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 301346883;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 4:
|
||||
num = 301346882;
|
||||
break;
|
||||
case 1:
|
||||
return null;
|
||||
case 2:
|
||||
return null;
|
||||
case 0:
|
||||
return text;
|
||||
case 3:
|
||||
text = _200F_200F_200E_200D_206C_200B_206F_206F_202E_200B_206D_202C_202E_200B_200C_200F_202C_200F_206B_200D_202E_200C_200E_206C_206C_200C_202D_202B_200F_206D_206F_200F_206B_202A_200E_202B_200F_206F_206C_206E_202E(MediaDirectory, fileName);
|
||||
num = (_206C_200F_206E_206F_200D_202E_206B_206A_206C_206D_200C_202D_200E_200D_206E_202D_202C_206F_200D_200E_202E_200C_206E_206C_202A_202B_206E_206E_200E_200B_200B_206D_206A_206B_206F_200D_200B_200B_200F_206A_202E(text) ? 301346883 : 301346881);
|
||||
break;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
static string _206A_202A_202B_200B_200D_200F_206C_202A_206B_202E_202A_206D_202C_202D_200D_202E_202D_206E_206A_200B_206C_200D_206A_200D_202E_206E_206F_200F_200E_200D_202C_200D_200B_200B_202D_206F_200E_206C_200E_206F_202E(Environment.SpecialFolder P_0)
|
||||
{
|
||||
return Environment.GetFolderPath(P_0);
|
||||
}
|
||||
|
||||
static string _200F_200F_200E_200D_206C_200B_206F_206F_202E_200B_206D_202C_202E_200B_200C_200F_202C_200F_206B_200D_202E_200C_200E_206C_206C_200C_202D_202B_200F_206D_206F_200F_206B_202A_200E_202B_200F_206F_206C_206E_202E(string P_0, string P_1)
|
||||
{
|
||||
return Path.Combine(P_0, P_1);
|
||||
}
|
||||
|
||||
static bool _200B_206D_200F_202A_200F_206D_200F_206C_202A_200B_200F_200D_200F_206A_206A_206C_202D_206F_200E_202D_202C_200B_200F_202B_202D_206D_206C_200D_200D_206D_206D_200B_206A_202A_200E_202A_200E_202D_206F_200E_202E(string P_0)
|
||||
{
|
||||
return Directory.Exists(P_0);
|
||||
}
|
||||
|
||||
static IEnumerable<string> _200E_202C_200D_200C_206E_202E_206D_200F_200B_202D_206B_202D_206B_206B_206D_206E_202B_206E_200E_202D_206E_206E_206B_202D_200C_206E_202E_202D_202E_202B_200E_206E_202B_200B_202D_206E_206B_200F_206A_202A_202E(string P_0, string P_1)
|
||||
{
|
||||
return Directory.EnumerateFiles(P_0, P_1);
|
||||
}
|
||||
|
||||
static StringComparer _206E_200D_202B_206E_200B_206F_206E_202C_206E_200F_202D_206D_202E_202C_206A_206B_202C_206B_206F_206E_200F_206A_206A_206F_200C_206F_200D_200F_202E_200C_206E_202E_200E_206A_202D_200D_202C_200D_206D_202C_202E()
|
||||
{
|
||||
return StringComparer.OrdinalIgnoreCase;
|
||||
}
|
||||
|
||||
static bool _200C_202D_206A_200D_206E_202A_202B_202C_202A_206A_202D_206E_202B_202E_202B_200F_206C_206B_200D_206D_200E_202A_200F_202A_200F_206D_200E_200E_206B_206D_200D_200D_200C_202E_206B_206D_206E_206A_202A_200D_202E(string P_0)
|
||||
{
|
||||
return string.IsNullOrEmpty(P_0);
|
||||
}
|
||||
|
||||
static bool _206C_200F_206E_206F_200D_202E_206B_206A_206C_206D_200C_202D_200E_200D_206E_202D_202C_206F_200D_200E_202E_200C_206E_206C_202A_202B_206E_206E_200E_200B_200B_206D_206A_206B_206F_200D_200B_200B_200F_206A_202E(string P_0)
|
||||
{
|
||||
return File.Exists(P_0);
|
||||
string text = Path.Combine(MediaDirectory, fileName);
|
||||
if (!File.Exists(text))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return text;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,50 +18,19 @@ public sealed class ItemForSale : IEquatable<ItemForSale>
|
|||
|
||||
public bool Equals(ItemForSale? other)
|
||||
{
|
||||
int num = ((other != null) ? (-673406129) : (-673406143));
|
||||
while (true)
|
||||
if (other == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -673406136;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 8:
|
||||
num = ((Price != other.Price) ? (-673406130) : (-673406133));
|
||||
break;
|
||||
case 9:
|
||||
return false;
|
||||
case 2:
|
||||
return OwnedItems == other.OwnedItems;
|
||||
case 0:
|
||||
num = -673406143;
|
||||
break;
|
||||
case 6:
|
||||
return false;
|
||||
case 7:
|
||||
num = ((this != other) ? (-673406135) : (-673406132));
|
||||
break;
|
||||
case 3:
|
||||
num = ((CurrencyItemId != other.CurrencyItemId) ? (-673406130) : (-673406134));
|
||||
break;
|
||||
case 4:
|
||||
return true;
|
||||
case 5:
|
||||
num = ((ItemId != other.ItemId) ? (-673406130) : (-673406144));
|
||||
break;
|
||||
case 1:
|
||||
num = ((Position != other.Position) ? (-673406130) : (-673406131));
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool IEquatable<ItemForSale>.Equals(ItemForSale? other)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in Equals
|
||||
return this.Equals(other);
|
||||
if (this == other)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (Position == other.Position && ItemId == other.ItemId && Price == other.Price && CurrencyItemId == other.CurrencyItemId)
|
||||
{
|
||||
return OwnedItems == other.OwnedItems;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool Equals(object? obj)
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ public sealed class PurchaseState
|
|||
|
||||
public int InitialOwnedItems { get; }
|
||||
|
||||
public int ItemsLeftToBuy => _206E_206B_202A_202D_202E_206B_206B_206B_206A_206C_200D_200D_200B_202E_200B_200D_200B_202D_200C_206F_202E_202D_202C_206B_200E_206D_206E_202C_206D_206C_202C_200E_206C_200B_206B_202D_202E_200E_206E_200D_202E(0, DesiredItems - OwnedItems);
|
||||
public int ItemsLeftToBuy => Math.Max(0, DesiredItems - OwnedItems);
|
||||
|
||||
public bool IsComplete => ItemsLeftToBuy == 0;
|
||||
|
||||
|
|
@ -24,9 +24,4 @@ public sealed class PurchaseState
|
|||
OwnedItems = ownedItems;
|
||||
InitialOwnedItems = ownedItems;
|
||||
}
|
||||
|
||||
static int _206E_206B_202A_202D_202E_206B_206B_206B_206A_206C_200D_200D_200B_202E_200B_200D_200B_202D_200C_206F_202E_202D_202C_206B_200E_206D_206E_202C_206D_206C_202C_200E_206C_200B_206B_202D_202E_200E_206E_200D_202E(int P_0, int P_1)
|
||||
{
|
||||
return Math.Max(P_0, P_1);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,169 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Numerics;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
|
||||
namespace LLib.Shop.Model;
|
||||
|
||||
public sealed record ShopSearchResult(uint ShopId, uint NpcId, ushort TerritoryId, Vector3 NpcPosition, EShopType ShopType, uint Price, uint CurrencyItemId, int DialogOptionIndex = 0)
|
||||
{
|
||||
[CompilerGenerated]
|
||||
private Type EqualityContract
|
||||
{
|
||||
[CompilerGenerated]
|
||||
get
|
||||
{
|
||||
return _200F_202B_206E_202C_206C_206B_202A_200F_206C_206C_206C_206C_200C_202C_200E_200E_206B_200C_206E_200F_200F_206C_206F_206F_206C_206C_206C_202B_200F_200C_206D_202D_206D_200C_200B_206B_200C_206F_200E_202A_202E(typeof(ShopSearchResult).TypeHandle);
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder stringBuilder = _200D_206C_206E_206C_200F_200F_206F_200D_200F_202C_202A_202B_200C_200F_206A_206B_200E_206E_206F_200E_206F_202E_202C_202A_200F_206D_200F_200C_202A_202E_206E_202E_200D_200D_206D_202C_200F_202D_206A_202E_202E();
|
||||
_200C_206F_200F_202B_206B_202E_206B_206D_206B_206E_202E_200D_206E_202E_206E_200C_206D_202D_202A_202E_202A_202D_206A_206C_202B_202B_200D_202B_202D_206A_200B_202A_206C_206C_206F_206C_202A_206B_206A_202B_202E(stringBuilder, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(-172046224));
|
||||
_200C_206F_200F_202B_206B_202E_206B_206D_206B_206E_202E_200D_206E_202E_206E_200C_206D_202D_202A_202E_202A_202D_206A_206C_202B_202B_200D_202B_202D_206A_200B_202A_206C_206C_206F_206C_202A_206B_206A_202B_202E(stringBuilder, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(1148273145));
|
||||
int num = ((!PrintMembers(stringBuilder)) ? 861671392 : 861671393);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 861671392;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
_202C_202B_206F_206B_206B_202A_200D_202D_206A_200B_200E_202E_206A_202A_200C_200F_202D_206F_202C_206B_206A_202A_206E_206C_206D_202C_202C_202B_206B_206F_202C_202C_206A_200C_200F_206D_200B_202A_202A_200D_202E(stringBuilder, '}');
|
||||
return _202A_200C_202E_202E_206D_206B_200D_206F_200C_206E_202D_200D_202A_206D_200E_202C_202A_200F_206E_202B_200E_202C_206A_202B_206B_206B_206D_206B_206D_206F_200E_200D_202C_202E_202C_200B_206C_200D_206D_206F_202E((object)stringBuilder);
|
||||
case 1:
|
||||
_202C_202B_206F_206B_206B_202A_200D_202D_206A_200B_200E_202E_206A_202A_200C_200F_202D_206F_202C_206B_206A_202A_206E_206C_206D_202C_202C_202B_206B_206F_202C_202C_206A_200C_200F_206D_200B_202A_202A_200D_202E(stringBuilder, ' ');
|
||||
num = 861671392;
|
||||
break;
|
||||
case 2:
|
||||
num = 861671393;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
private bool PrintMembers(StringBuilder builder)
|
||||
{
|
||||
_200F_206A_206D_202B_206C_206F_200C_202E_200D_206D_202E_206B_206F_200B_200B_200D_206B_206E_200E_202A_202E_202E_200B_206A_202C_206D_202C_206A_200F_200C_202A_206A_202C_202C_206D_206B_206A_200B_202B_200C_202E();
|
||||
_200C_206F_200F_202B_206B_202E_206B_206D_206B_206E_202E_200D_206E_202E_206E_200C_206D_202D_202A_202E_202A_202D_206A_206C_202B_202B_200D_202B_202D_206A_200B_202A_206C_206C_206F_206C_202A_206B_206A_202B_202E(builder, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(1462184987));
|
||||
_200C_206F_200F_202B_206B_202E_206B_206D_206B_206E_202E_200D_206E_202E_206E_200C_206D_202D_202A_202E_202A_202D_206A_206C_202B_202B_200D_202B_202D_206A_200B_202A_206C_206C_206F_206C_202A_206B_206A_202B_202E(builder, ShopId.ToString());
|
||||
_200C_206F_200F_202B_206B_202E_206B_206D_206B_206E_202E_200D_206E_202E_206E_200C_206D_202D_202A_202E_202A_202D_206A_206C_202B_202B_200D_202B_202D_206A_200B_202A_206C_206C_206F_206C_202A_206B_206A_202B_202E(builder, global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(402538369));
|
||||
_200C_206F_200F_202B_206B_202E_206B_206D_206B_206E_202E_200D_206E_202E_206E_200C_206D_202D_202A_202E_202A_202D_206A_206C_202B_202B_200D_202B_202D_206A_200B_202A_206C_206C_206F_206C_202A_206B_206A_202B_202E(builder, NpcId.ToString());
|
||||
_200C_206F_200F_202B_206B_202E_206B_206D_206B_206E_202E_200D_206E_202E_206E_200C_206D_202D_202A_202E_202A_202D_206A_206C_202B_202B_200D_202B_202D_206A_200B_202A_206C_206C_206F_206C_202A_206B_206A_202B_202E(builder, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(1525167587));
|
||||
_200C_206F_200F_202B_206B_202E_206B_206D_206B_206E_202E_200D_206E_202E_206E_200C_206D_202D_202A_202E_202A_202D_206A_206C_202B_202B_200D_202B_202D_206A_200B_202A_206C_206C_206F_206C_202A_206B_206A_202B_202E(builder, TerritoryId.ToString());
|
||||
_200C_206F_200F_202B_206B_202E_206B_206D_206B_206E_202E_200D_206E_202E_206E_200C_206D_202D_202A_202E_202A_202D_206A_206C_202B_202B_200D_202B_202D_206A_200B_202A_206C_206C_206F_206C_202A_206B_206A_202B_202E(builder, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(77058786));
|
||||
_200C_206F_200F_202B_206B_202E_206B_206D_206B_206E_202E_200D_206E_202E_206E_200C_206D_202D_202A_202E_202A_202D_206A_206C_202B_202B_200D_202B_202D_206A_200B_202A_206C_206C_206F_206C_202A_206B_206A_202B_202E(builder, NpcPosition.ToString());
|
||||
_200C_206F_200F_202B_206B_202E_206B_206D_206B_206E_202E_200D_206E_202E_206E_200C_206D_202D_202A_202E_202A_202D_206A_206C_202B_202B_200D_202B_202D_206A_200B_202A_206C_206C_206F_206C_202A_206B_206A_202B_202E(builder, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(47056198));
|
||||
_200C_206F_200F_202B_206B_202E_206B_206D_206B_206E_202E_200D_206E_202E_206E_200C_206D_202D_202A_202E_202A_202D_206A_206C_202B_202B_200D_202B_202D_206A_200B_202A_206C_206C_206F_206C_202A_206B_206A_202B_202E(builder, ShopType.ToString());
|
||||
_200C_206F_200F_202B_206B_202E_206B_206D_206B_206E_202E_200D_206E_202E_206E_200C_206D_202D_202A_202E_202A_202D_206A_206C_202B_202B_200D_202B_202D_206A_200B_202A_206C_206C_206F_206C_202A_206B_206A_202B_202E(builder, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(180433324));
|
||||
_200C_206F_200F_202B_206B_202E_206B_206D_206B_206E_202E_200D_206E_202E_206E_200C_206D_202D_202A_202E_202A_202D_206A_206C_202B_202B_200D_202B_202D_206A_200B_202A_206C_206C_206F_206C_202A_206B_206A_202B_202E(builder, Price.ToString());
|
||||
_200C_206F_200F_202B_206B_202E_206B_206D_206B_206E_202E_200D_206E_202E_206E_200C_206D_202D_202A_202E_202A_202D_206A_206C_202B_202B_200D_202B_202D_206A_200B_202A_206C_206C_206F_206C_202A_206B_206A_202B_202E(builder, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(2138166188));
|
||||
_200C_206F_200F_202B_206B_202E_206B_206D_206B_206E_202E_200D_206E_202E_206E_200C_206D_202D_202A_202E_202A_202D_206A_206C_202B_202B_200D_202B_202D_206A_200B_202A_206C_206C_206F_206C_202A_206B_206A_202B_202E(builder, CurrencyItemId.ToString());
|
||||
_200C_206F_200F_202B_206B_202E_206B_206D_206B_206E_202E_200D_206E_202E_206E_200C_206D_202D_202A_202E_202A_202D_206A_206C_202B_202B_200D_202B_202D_206A_200B_202A_206C_206C_206F_206C_202A_206B_206A_202B_202E(builder, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(-846071550));
|
||||
_200C_206F_200F_202B_206B_202E_206B_206D_206B_206E_202E_200D_206E_202E_206E_200C_206D_202D_202A_202E_202A_202D_206A_206C_202B_202B_200D_202B_202D_206A_200B_202A_206C_206C_206F_206C_202A_206B_206A_202B_202E(builder, DialogOptionIndex.ToString());
|
||||
return true;
|
||||
}
|
||||
|
||||
[CompilerGenerated]
|
||||
public bool Equals(ShopSearchResult? other)
|
||||
{
|
||||
int num = (((object)this == other) ? (-1154151868) : (-1154151871));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1154151865;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
num = -1154151871;
|
||||
break;
|
||||
case 7:
|
||||
num = ((!EqualityComparer<ushort>.Default.Equals(TerritoryId, other.TerritoryId)) ? (-1154151867) : (-1154151866));
|
||||
break;
|
||||
case 6:
|
||||
num = (((object)other == null) ? (-1154151867) : (-1154151860));
|
||||
break;
|
||||
case 9:
|
||||
num = ((!EqualityComparer<uint>.Default.Equals(CurrencyItemId, other.CurrencyItemId)) ? (-1154151867) : (-1154151869));
|
||||
break;
|
||||
case 10:
|
||||
num = ((!EqualityComparer<uint>.Default.Equals(Price, other.Price)) ? (-1154151867) : (-1154151858));
|
||||
break;
|
||||
case 12:
|
||||
num = ((!EqualityComparer<uint>.Default.Equals(NpcId, other.NpcId)) ? (-1154151867) : (-1154151872));
|
||||
break;
|
||||
case 8:
|
||||
num = ((!EqualityComparer<EShopType>.Default.Equals(ShopType, other.ShopType)) ? (-1154151867) : (-1154151859));
|
||||
break;
|
||||
case 3:
|
||||
return true;
|
||||
case 11:
|
||||
num = ((!_200D_206D_202D_200B_200E_200B_202C_206C_200E_200F_206E_202B_202C_202D_206F_206E_206D_202D_202D_202A_202A_206A_206B_202C_206B_206B_200D_202D_202D_202D_202D_200D_200C_200D_206C_200B_206D_206B_206F_202B_202E(EqualityContract, other.EqualityContract)) ? (-1154151867) : (-1154151870));
|
||||
break;
|
||||
case 1:
|
||||
num = ((!EqualityComparer<Vector3>.Default.Equals(NpcPosition, other.NpcPosition)) ? (-1154151867) : (-1154151857));
|
||||
break;
|
||||
case 5:
|
||||
num = ((!EqualityComparer<uint>.Default.Equals(ShopId, other.ShopId)) ? (-1154151867) : (-1154151861));
|
||||
break;
|
||||
case 2:
|
||||
return false;
|
||||
case 4:
|
||||
return EqualityComparer<int>.Default.Equals(DialogOptionIndex, other.DialogOptionIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool IEquatable<ShopSearchResult>.Equals(ShopSearchResult? other)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in Equals
|
||||
return this.Equals(other);
|
||||
}
|
||||
|
||||
static Type _200F_202B_206E_202C_206C_206B_202A_200F_206C_206C_206C_206C_200C_202C_200E_200E_206B_200C_206E_200F_200F_206C_206F_206F_206C_206C_206C_202B_200F_200C_206D_202D_206D_200C_200B_206B_200C_206F_200E_202A_202E(RuntimeTypeHandle P_0)
|
||||
{
|
||||
return Type.GetTypeFromHandle(P_0);
|
||||
}
|
||||
|
||||
static StringBuilder _200D_206C_206E_206C_200F_200F_206F_200D_200F_202C_202A_202B_200C_200F_206A_206B_200E_206E_206F_200E_206F_202E_202C_202A_200F_206D_200F_200C_202A_202E_206E_202E_200D_200D_206D_202C_200F_202D_206A_202E_202E()
|
||||
{
|
||||
return new StringBuilder();
|
||||
}
|
||||
|
||||
static StringBuilder _200C_206F_200F_202B_206B_202E_206B_206D_206B_206E_202E_200D_206E_202E_206E_200C_206D_202D_202A_202E_202A_202D_206A_206C_202B_202B_200D_202B_202D_206A_200B_202A_206C_206C_206F_206C_202A_206B_206A_202B_202E(StringBuilder P_0, string P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static StringBuilder _202C_202B_206F_206B_206B_202A_200D_202D_206A_200B_200E_202E_206A_202A_200C_200F_202D_206F_202C_206B_206A_202A_206E_206C_206D_202C_202C_202B_206B_206F_202C_202C_206A_200C_200F_206D_200B_202A_202A_200D_202E(StringBuilder P_0, char P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static string _202A_200C_202E_202E_206D_206B_200D_206F_200C_206E_202D_200D_202A_206D_200E_202C_202A_200F_206E_202B_200E_202C_206A_202B_206B_206B_206D_206B_206D_206F_200E_200D_202C_202E_202C_200B_206C_200D_206D_206F_202E(object P_0)
|
||||
{
|
||||
return P_0.ToString();
|
||||
}
|
||||
|
||||
static void _200F_206A_206D_202B_206C_206F_200C_202E_200D_206D_202E_206B_206F_200B_200B_200D_206B_206E_200E_202A_202E_202E_200B_206A_202C_206D_202C_206A_200F_200C_202A_206A_202C_202C_206D_206B_206A_200B_202B_200C_202E()
|
||||
{
|
||||
RuntimeHelpers.EnsureSufficientExecutionStack();
|
||||
}
|
||||
|
||||
static bool _200D_206D_202D_200B_200E_200B_202C_206C_200E_200F_206E_202B_202C_202D_206F_206E_206D_202D_202D_202A_202A_206A_206B_202C_206B_206B_200D_202D_202D_202D_202D_200D_200C_200D_206C_200B_206D_206B_206F_202B_202E(Type P_0, Type P_1)
|
||||
{
|
||||
return P_0 == P_1;
|
||||
}
|
||||
}
|
||||
public sealed record ShopSearchResult(uint ShopId, uint NpcId, ushort TerritoryId, Vector3 NpcPosition, EShopType ShopType, uint Price, uint CurrencyItemId, int DialogOptionIndex = 0);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Numerics;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Dalamud.Plugin.Services;
|
||||
using LLib.Shop.Model;
|
||||
using Lumina.Excel;
|
||||
|
|
@ -11,9 +9,9 @@ namespace LLib.Shop.Searchers;
|
|||
|
||||
internal sealed class GCShopSearcher
|
||||
{
|
||||
private static readonly uint[] SealItemIds;
|
||||
private static readonly uint[] SealItemIds = new uint[4] { 0u, 20u, 21u, 22u };
|
||||
|
||||
private static readonly uint[] QuartermasterNpcIds;
|
||||
private static readonly uint[] QuartermasterNpcIds = new uint[4] { 0u, 1003251u, 1000394u, 1004416u };
|
||||
|
||||
private readonly IDataManager _dataManager;
|
||||
|
||||
|
|
@ -32,243 +30,71 @@ internal sealed class GCShopSearcher
|
|||
ExcelSheet<GCScripShopCategory> excelSheet = _dataManager.GetExcelSheet<GCScripShopCategory>();
|
||||
ExcelSheet<GCShop> excelSheet2 = _dataManager.GetExcelSheet<GCShop>();
|
||||
Dictionary<uint, uint> dictionary = new Dictionary<uint, uint>();
|
||||
int num;
|
||||
using (ExcelSheet<GCShop>.Enumerator enumerator = excelSheet2.GetEnumerator())
|
||||
foreach (GCShop item in excelSheet2)
|
||||
{
|
||||
num = 1051383977;
|
||||
uint rowId = default(uint);
|
||||
GCShop current = default(GCShop);
|
||||
while (true)
|
||||
uint rowId = item.GrandCompany.RowId;
|
||||
if (rowId != 0)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1051383979;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
num = 1051383977;
|
||||
break;
|
||||
case 2:
|
||||
num = (enumerator.MoveNext() ? 1051383983 : 1051383976);
|
||||
break;
|
||||
case 1:
|
||||
dictionary.TryAdd(rowId, current.RowId);
|
||||
num = 1051383977;
|
||||
break;
|
||||
case 4:
|
||||
current = enumerator.Current;
|
||||
rowId = current.GrandCompany.RowId;
|
||||
num = ((rowId == 0) ? 1051383977 : 1051383978);
|
||||
break;
|
||||
case 3:
|
||||
goto end_IL_0063;
|
||||
}
|
||||
continue;
|
||||
end_IL_0063:
|
||||
break;
|
||||
dictionary.TryAdd(rowId, item.RowId);
|
||||
}
|
||||
}
|
||||
Dictionary<uint, uint> dictionary2 = new Dictionary<uint, uint>();
|
||||
using (SubrowExcelSheet<GCScripShopItem>.Enumerator enumerator2 = subrowExcelSheet.GetEnumerator())
|
||||
foreach (SubrowCollection<GCScripShopItem> item2 in subrowExcelSheet)
|
||||
{
|
||||
num = 754964801;
|
||||
uint num8 = default(uint);
|
||||
uint value2 = default(uint);
|
||||
uint rowId3 = default(uint);
|
||||
uint value = default(uint);
|
||||
SubrowCollection<GCScripShopItem> current2 = default(SubrowCollection<GCScripShopItem>);
|
||||
uint rowId2 = default(uint);
|
||||
int num7 = default(int);
|
||||
GCScripShopCategory row = default(GCScripShopCategory);
|
||||
uint costGCSeals = default(uint);
|
||||
GCScripShopItem gCScripShopItem = default(GCScripShopItem);
|
||||
while (true)
|
||||
uint rowId2 = item2.RowId;
|
||||
for (int i = 0; i < item2.Count; i++)
|
||||
{
|
||||
int num5 = num;
|
||||
int num3 = 754964806;
|
||||
int num4 = num5;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
GCScripShopItem gCScripShopItem = item2[i];
|
||||
if (gCScripShopItem.Item.RowId != itemId)
|
||||
{
|
||||
case 17:
|
||||
num8 = 1u;
|
||||
num = 754964805;
|
||||
break;
|
||||
case 2:
|
||||
num = ((!dictionary2.TryGetValue(num8, out value2)) ? 754964815 : 754964813);
|
||||
break;
|
||||
case 6:
|
||||
num = ((!dictionary2.TryGetValue(rowId3, out value)) ? 754964803 : 754964822);
|
||||
break;
|
||||
case 13:
|
||||
current2 = enumerator2.Current;
|
||||
rowId2 = current2.RowId;
|
||||
num7 = 0;
|
||||
num = 754964808;
|
||||
break;
|
||||
case 10:
|
||||
{
|
||||
uint num9 = num8;
|
||||
num3 = 1;
|
||||
num4 = (int)num9;
|
||||
int num10 = num4 ^ num3;
|
||||
int num11 = num4 & num3;
|
||||
num8 = (uint)(num10 + (num11 + num11));
|
||||
num = 754964805;
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
case 0:
|
||||
rowId3 = row.GrandCompany.RowId;
|
||||
num = ((rowId3 != 0) ? 754964800 : 754964823);
|
||||
break;
|
||||
case 14:
|
||||
num = ((num7 < current2.Count) ? 754964809 : 754964801);
|
||||
break;
|
||||
case 1:
|
||||
costGCSeals = gCScripShopItem.CostGCSeals;
|
||||
num = ((!excelSheet.TryGetRow(rowId2, out row)) ? 754964810 : 754964806);
|
||||
break;
|
||||
case 8:
|
||||
num = 754964810;
|
||||
break;
|
||||
case 9:
|
||||
dictionary2[num8] = costGCSeals;
|
||||
num = 754964812;
|
||||
break;
|
||||
case 7:
|
||||
num = (enumerator2.MoveNext() ? 754964811 : 754964820);
|
||||
break;
|
||||
case 4:
|
||||
num = 754964801;
|
||||
break;
|
||||
case 11:
|
||||
num = ((costGCSeals >= value2) ? 754964812 : 754964815);
|
||||
break;
|
||||
case 5:
|
||||
dictionary2[rowId3] = costGCSeals;
|
||||
num = 754964810;
|
||||
break;
|
||||
case 3:
|
||||
num = ((num8 < (uint)QuartermasterNpcIds.Length) ? 754964804 : 754964814);
|
||||
break;
|
||||
case 16:
|
||||
num = ((costGCSeals >= value) ? 754964810 : 754964803);
|
||||
break;
|
||||
case 15:
|
||||
gCScripShopItem = current2[num7];
|
||||
num = ((gCScripShopItem.Item.RowId != itemId) ? 754964810 : 754964807);
|
||||
break;
|
||||
case 12:
|
||||
uint costGCSeals = gCScripShopItem.CostGCSeals;
|
||||
if (!excelSheet.TryGetRow(rowId2, out var row))
|
||||
{
|
||||
int num6 = num7;
|
||||
num3 = 1;
|
||||
num4 = num6;
|
||||
num7 = (num4 | num3) + (num4 & num3);
|
||||
num = 754964808;
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
case 18:
|
||||
goto end_IL_014c;
|
||||
}
|
||||
continue;
|
||||
end_IL_014c:
|
||||
break;
|
||||
}
|
||||
}
|
||||
num = ((dictionary2.Count != 0) ? (-231383589) : (-231383590));
|
||||
(ushort, Vector3)? position = default((ushort, Vector3)?);
|
||||
uint num14 = default(uint);
|
||||
uint num16 = default(uint);
|
||||
uint price = default(uint);
|
||||
uint currencyItemId = default(uint);
|
||||
while (true)
|
||||
{
|
||||
int num12 = num;
|
||||
int num3 = -231383589;
|
||||
int num4 = num12;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 2:
|
||||
goto IL_046f;
|
||||
case 1:
|
||||
return list;
|
||||
case 0:
|
||||
{
|
||||
using Dictionary<uint, uint>.Enumerator enumerator3 = dictionary2.GetEnumerator();
|
||||
num = 1589717565;
|
||||
while (true)
|
||||
uint rowId3 = row.GrandCompany.RowId;
|
||||
uint value2;
|
||||
if (rowId3 == 0)
|
||||
{
|
||||
int num13 = num;
|
||||
num3 = 1589717566;
|
||||
num4 = num13;
|
||||
int num15;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
for (uint num = 1u; num < (uint)QuartermasterNpcIds.Length; num++)
|
||||
{
|
||||
case 6:
|
||||
{
|
||||
(ushort, Vector3) valueOrDefault = position.GetValueOrDefault();
|
||||
dictionary.TryGetValue(num14, out var value3);
|
||||
list.Add(new ShopSearchResult(value3, num16, valueOrDefault.Item1, valueOrDefault.Item2, EShopType.GCShop, price, currencyItemId));
|
||||
num = 1589717565;
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
num15 = 0;
|
||||
goto IL_0563;
|
||||
case 7:
|
||||
num = 1589717565;
|
||||
break;
|
||||
case 3:
|
||||
num = (enumerator3.MoveNext() ? 1589717564 : 1589717563);
|
||||
break;
|
||||
case 0:
|
||||
num15 = (int)SealItemIds[num14];
|
||||
goto IL_0563;
|
||||
case 2:
|
||||
{
|
||||
enumerator3.Current.Deconstruct(out var key, out var value4);
|
||||
num14 = key;
|
||||
price = value4;
|
||||
num = ((num14 >= (uint)QuartermasterNpcIds.Length) ? 1589717565 : 1589717562);
|
||||
break;
|
||||
}
|
||||
case 4:
|
||||
num16 = QuartermasterNpcIds[num14];
|
||||
num = ((num16 == 0) ? 1589717565 : 1589717558);
|
||||
break;
|
||||
case 8:
|
||||
num = ((num14 < (uint)SealItemIds.Length) ? 1589717566 : 1589717567);
|
||||
break;
|
||||
case 5:
|
||||
if (!dictionary2.TryGetValue(num, out var value) || costGCSeals < value)
|
||||
{
|
||||
return list;
|
||||
dictionary2[num] = costGCSeals;
|
||||
}
|
||||
IL_0563:
|
||||
currencyItemId = (uint)num15;
|
||||
position = _positionCache.GetPosition(num16);
|
||||
num = ((!position.HasValue) ? 1589717565 : 1589717560);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (!dictionary2.TryGetValue(rowId3, out value2) || costGCSeals < value2)
|
||||
{
|
||||
dictionary2[rowId3] = costGCSeals;
|
||||
}
|
||||
}
|
||||
}
|
||||
continue;
|
||||
IL_046f:
|
||||
num = -231383590;
|
||||
}
|
||||
}
|
||||
|
||||
static GCShopSearcher()
|
||||
{
|
||||
uint[] array = new uint[4];
|
||||
_200F_206D_202A_206E_202D_200C_206D_200D_200B_202E_202B_206B_206B_206E_202B_206A_202B_206D_202C_200E_206F_200C_200B_202B_200C_202B_206C_202C_202E_200F_206D_200B_202B_202B_206E_206B_206A_200D_206A_200F_202E((Array)array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
|
||||
SealItemIds = array;
|
||||
uint[] array2 = new uint[4];
|
||||
_200F_206D_202A_206E_202D_200C_206D_200D_200B_202E_202B_206B_206B_206E_202B_206A_202B_206D_202C_200E_206F_200C_200B_202B_200C_202B_206C_202C_202E_200F_206D_200B_202B_202B_206E_206B_206A_200D_206A_200F_202E((Array)array2, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
|
||||
QuartermasterNpcIds = array2;
|
||||
}
|
||||
|
||||
static void _200F_206D_202A_206E_202D_200C_206D_200D_200B_202E_202B_206B_206B_206E_202B_206A_202B_206D_202C_200E_206F_200C_200B_202B_200C_202B_206C_202C_202E_200F_206D_200B_202B_202B_206E_206B_206A_200D_206A_200F_202E(Array P_0, RuntimeFieldHandle P_1)
|
||||
{
|
||||
RuntimeHelpers.InitializeArray(P_0, P_1);
|
||||
if (dictionary2.Count == 0)
|
||||
{
|
||||
return list;
|
||||
}
|
||||
foreach (var (num4, price) in dictionary2)
|
||||
{
|
||||
if (num4 >= (uint)QuartermasterNpcIds.Length)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
uint num5 = QuartermasterNpcIds[num4];
|
||||
if (num5 != 0)
|
||||
{
|
||||
uint currencyItemId = ((num4 < (uint)SealItemIds.Length) ? SealItemIds[num4] : 0u);
|
||||
(ushort, Vector3)? position = _positionCache.GetPosition(num5);
|
||||
if (position.HasValue)
|
||||
{
|
||||
(ushort, Vector3) valueOrDefault = position.GetValueOrDefault();
|
||||
dictionary.TryGetValue(num4, out var value3);
|
||||
list.Add(new ShopSearchResult(value3, num5, valueOrDefault.Item1, valueOrDefault.Item2, EShopType.GCShop, price, currencyItemId));
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,137 +24,52 @@ internal sealed class GilShopSearcher
|
|||
List<ShopSearchResult> list = new List<ShopSearchResult>();
|
||||
ExcelSheet<ENpcBase> excelSheet = _dataManager.GetExcelSheet<ENpcBase>();
|
||||
SubrowExcelSheet<GilShopItem> subrowExcelSheet = _dataManager.GetSubrowExcelSheet<GilShopItem>();
|
||||
int num = (_dataManager.GetExcelSheet<Item>().TryGetRow(itemId, out var row) ? (-465006418) : (-465006419));
|
||||
uint rowId = default(uint);
|
||||
RowRef current2 = default(RowRef);
|
||||
SubrowCollection<GilShopItem> row2 = default(SubrowCollection<GilShopItem>);
|
||||
bool flag = default(bool);
|
||||
int num15 = default(int);
|
||||
while (true)
|
||||
if (!_dataManager.GetExcelSheet<Item>().TryGetRow(itemId, out var row))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -465006420;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
goto IL_009d;
|
||||
case 1:
|
||||
return list;
|
||||
case 2:
|
||||
{
|
||||
uint priceMid = row.PriceMid;
|
||||
{
|
||||
foreach (ENpcBase item in excelSheet)
|
||||
{
|
||||
if (item.RowId == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
(ushort, Vector3)? position = _positionCache.GetPosition(item.RowId);
|
||||
if (!position.HasValue)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
(ushort, Vector3) valueOrDefault = position.GetValueOrDefault();
|
||||
int num7 = 0;
|
||||
using Collection<RowRef>.Enumerator enumerator2 = item.ENpcData.GetEnumerator();
|
||||
num = 342150999;
|
||||
while (true)
|
||||
{
|
||||
int num8 = num;
|
||||
num3 = 342150993;
|
||||
num4 = num8;
|
||||
int num9 = num4 + num3;
|
||||
int num10 = num4 & num3;
|
||||
switch (num9 - (num10 + num10))
|
||||
{
|
||||
case 5:
|
||||
rowId = current2.RowId;
|
||||
num = (subrowExcelSheet.TryGetRow(rowId, out row2) ? 342150994 : 342150992);
|
||||
break;
|
||||
case 3:
|
||||
flag = false;
|
||||
num15 = 0;
|
||||
num = 342151000;
|
||||
break;
|
||||
case 7:
|
||||
num = ((row2[num15].Item.RowId != itemId) ? 342151005 : 342150997);
|
||||
break;
|
||||
case 8:
|
||||
current2 = enumerator2.Current;
|
||||
num = ((current2.RowId >> 16 != 4) ? 342150999 : 342150996);
|
||||
break;
|
||||
case 9:
|
||||
num = ((num15 < row2.Count) ? 342150998 : 342150995);
|
||||
break;
|
||||
case 6:
|
||||
num = (enumerator2.MoveNext() ? 342151001 : 342151003);
|
||||
break;
|
||||
case 1:
|
||||
{
|
||||
int num18 = num7;
|
||||
num3 = 1;
|
||||
num4 = num18;
|
||||
int num19 = num4 ^ num3;
|
||||
int num20 = num4 & num3;
|
||||
num7 = num19 + (num20 + num20);
|
||||
num = 342150999;
|
||||
break;
|
||||
}
|
||||
case 13:
|
||||
num = 342150999;
|
||||
break;
|
||||
case 4:
|
||||
flag = true;
|
||||
num = 342150995;
|
||||
break;
|
||||
case 2:
|
||||
num = ((!flag) ? 342150993 : 342151002);
|
||||
break;
|
||||
case 11:
|
||||
list.Add(new ShopSearchResult(rowId, item.RowId, valueOrDefault.Item1, valueOrDefault.Item2, EShopType.GilShop, priceMid, 1u, num7));
|
||||
num = 342150993;
|
||||
break;
|
||||
case 12:
|
||||
{
|
||||
int num14 = num15;
|
||||
num3 = 1;
|
||||
num4 = num14;
|
||||
int num16 = num4 ^ num3;
|
||||
int num17 = num4 & num3;
|
||||
num15 = num16 + (num17 + num17);
|
||||
num = 342151000;
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
int num11 = num7;
|
||||
num3 = 1;
|
||||
num4 = num11;
|
||||
int num12 = num4 ^ num3;
|
||||
int num13 = num4 & num3;
|
||||
num7 = num12 + (num13 + num13);
|
||||
num = 342150999;
|
||||
break;
|
||||
}
|
||||
case 10:
|
||||
goto end_IL_0120;
|
||||
}
|
||||
continue;
|
||||
end_IL_0120:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
}
|
||||
continue;
|
||||
IL_009d:
|
||||
num = -465006419;
|
||||
return list;
|
||||
}
|
||||
uint priceMid = row.PriceMid;
|
||||
foreach (ENpcBase item in excelSheet)
|
||||
{
|
||||
if (item.RowId == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
(ushort, Vector3)? position = _positionCache.GetPosition(item.RowId);
|
||||
if (!position.HasValue)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
(ushort, Vector3) valueOrDefault = position.GetValueOrDefault();
|
||||
int num = 0;
|
||||
foreach (RowRef eNpcDatum in item.ENpcData)
|
||||
{
|
||||
if (eNpcDatum.RowId >> 16 != 4)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
uint rowId = eNpcDatum.RowId;
|
||||
if (!subrowExcelSheet.TryGetRow(rowId, out var row2))
|
||||
{
|
||||
num++;
|
||||
continue;
|
||||
}
|
||||
bool flag = false;
|
||||
for (int i = 0; i < row2.Count; i++)
|
||||
{
|
||||
if (row2[i].Item.RowId == itemId)
|
||||
{
|
||||
flag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (flag)
|
||||
{
|
||||
list.Add(new ShopSearchResult(rowId, item.RowId, valueOrDefault.Item1, valueOrDefault.Item2, EShopType.GilShop, priceMid, 1u, num));
|
||||
}
|
||||
num++;
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,17 +42,6 @@ internal sealed class SpecialShopSearcher
|
|||
List<ShopSearchResult> list = new List<ShopSearchResult>();
|
||||
ExcelSheet<ENpcBase> excelSheet = _dataManager.GetExcelSheet<ENpcBase>();
|
||||
ExcelSheet<SpecialShop> excelSheet2 = _dataManager.GetExcelSheet<SpecialShop>();
|
||||
uint rowId = default(uint);
|
||||
RowRef current2 = default(RowRef);
|
||||
SpecialShop shop = default(SpecialShop);
|
||||
uint price = default(uint);
|
||||
uint currencyItemId = default(uint);
|
||||
SpecialShop.ItemStruct itemStruct = default(SpecialShop.ItemStruct);
|
||||
int num13 = default(int);
|
||||
int num9 = default(int);
|
||||
bool flag = default(bool);
|
||||
int num12 = default(int);
|
||||
SpecialShop.ItemStruct.ItemCostsStruct itemCostsStruct = default(SpecialShop.ItemStruct.ItemCostsStruct);
|
||||
foreach (ENpcBase item in excelSheet)
|
||||
{
|
||||
if (item.RowId == 0)
|
||||
|
|
@ -66,137 +55,53 @@ internal sealed class SpecialShopSearcher
|
|||
}
|
||||
(ushort, Vector3) valueOrDefault = position.GetValueOrDefault();
|
||||
int num = 0;
|
||||
using Collection<RowRef>.Enumerator enumerator2 = item.ENpcData.GetEnumerator();
|
||||
int num2 = 1586357649;
|
||||
while (true)
|
||||
foreach (RowRef eNpcDatum in item.ENpcData)
|
||||
{
|
||||
int num3 = num2;
|
||||
int num4 = 1586357637;
|
||||
int num5 = num3;
|
||||
int num6 = num5 + num4;
|
||||
int num7 = num5 & num4;
|
||||
switch (num6 - (num7 + num7))
|
||||
if (eNpcDatum.RowId >> 16 != 27)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
uint rowId = eNpcDatum.RowId;
|
||||
if (!excelSheet2.TryGetRow(rowId, out var row))
|
||||
{
|
||||
num++;
|
||||
continue;
|
||||
}
|
||||
bool flag = false;
|
||||
uint currencyItemId = 0u;
|
||||
uint price = 0u;
|
||||
for (int i = 0; i < row.Item.Count; i++)
|
||||
{
|
||||
SpecialShop.ItemStruct itemStruct = row.Item[i];
|
||||
for (int j = 0; j < itemStruct.ReceiveItems.Count; j++)
|
||||
{
|
||||
if (itemStruct.ReceiveItems[j].Item.RowId != itemId)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
flag = true;
|
||||
for (int k = 0; k < itemStruct.ItemCosts.Count; k++)
|
||||
{
|
||||
SpecialShop.ItemStruct.ItemCostsStruct itemCostsStruct = itemStruct.ItemCosts[k];
|
||||
if (itemCostsStruct.ItemCost.RowId != 0)
|
||||
{
|
||||
currencyItemId = ConvertCurrencyItemId(itemCostsStruct.ItemCost.RowId, in row);
|
||||
price = itemCostsStruct.CurrencyCost;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (flag)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (flag)
|
||||
{
|
||||
case 5:
|
||||
rowId = current2.RowId;
|
||||
num2 = (excelSheet2.TryGetRow(rowId, out shop) ? 1586357643 : 1586357652);
|
||||
break;
|
||||
case 8:
|
||||
list.Add(new ShopSearchResult(rowId, item.RowId, valueOrDefault.Item1, valueOrDefault.Item2, EShopType.SpecialShop, price, currencyItemId, num));
|
||||
num2 = 1586357638;
|
||||
break;
|
||||
case 2:
|
||||
itemStruct = shop.Item[num13];
|
||||
num9 = 0;
|
||||
num2 = 1586357640;
|
||||
break;
|
||||
case 18:
|
||||
flag = true;
|
||||
num12 = 0;
|
||||
num2 = 1586357651;
|
||||
break;
|
||||
case 1:
|
||||
num2 = ((num13 < shop.Item.Count) ? 1586357639 : 1586357635);
|
||||
break;
|
||||
case 16:
|
||||
itemCostsStruct = itemStruct.ItemCosts[num12];
|
||||
num2 = ((itemCostsStruct.ItemCost.RowId == 0) ? 1586357646 : 1586357642);
|
||||
break;
|
||||
case 17:
|
||||
{
|
||||
int num19 = num;
|
||||
num4 = 1;
|
||||
num5 = num19;
|
||||
num = (num5 | num4) + (num5 & num4);
|
||||
num2 = 1586357649;
|
||||
break;
|
||||
}
|
||||
case 10:
|
||||
num2 = (flag ? 1586357635 : 1586357648);
|
||||
break;
|
||||
case 11:
|
||||
{
|
||||
int num18 = num12;
|
||||
num4 = 1;
|
||||
num5 = num18;
|
||||
num12 = (num5 | num4) + (num5 & num4);
|
||||
num2 = 1586357651;
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
int num15 = num;
|
||||
num4 = 1;
|
||||
num5 = num15;
|
||||
int num16 = num5 ^ num4;
|
||||
int num17 = num5 & num4;
|
||||
num = num16 + (num17 + num17);
|
||||
num2 = 1586357649;
|
||||
break;
|
||||
}
|
||||
case 12:
|
||||
num2 = 1586357649;
|
||||
break;
|
||||
case 6:
|
||||
num2 = ((!flag) ? 1586357638 : 1586357645);
|
||||
break;
|
||||
case 13:
|
||||
num2 = ((num9 < itemStruct.ReceiveItems.Count) ? 1586357634 : 1586357647);
|
||||
break;
|
||||
case 7:
|
||||
num2 = ((itemStruct.ReceiveItems[num9].Item.RowId != itemId) ? 1586357633 : 1586357655);
|
||||
break;
|
||||
case 14:
|
||||
flag = false;
|
||||
currencyItemId = 0u;
|
||||
price = 0u;
|
||||
num13 = 0;
|
||||
num2 = 1586357636;
|
||||
break;
|
||||
case 20:
|
||||
num2 = (enumerator2.MoveNext() ? 1586357644 : 1586357654);
|
||||
break;
|
||||
case 9:
|
||||
current2 = enumerator2.Current;
|
||||
num2 = ((current2.RowId >> 16 != 27) ? 1586357649 : 1586357632);
|
||||
break;
|
||||
case 21:
|
||||
{
|
||||
int num14 = num13;
|
||||
num4 = 1;
|
||||
num5 = num14;
|
||||
num13 = (num5 | num4) + (num5 & num4);
|
||||
num2 = 1586357636;
|
||||
break;
|
||||
}
|
||||
case 22:
|
||||
num2 = ((num12 < itemStruct.ItemCosts.Count) ? 1586357653 : 1586357637);
|
||||
break;
|
||||
case 15:
|
||||
currencyItemId = ConvertCurrencyItemId(itemCostsStruct.ItemCost.RowId, in shop);
|
||||
price = itemCostsStruct.CurrencyCost;
|
||||
num2 = 1586357647;
|
||||
break;
|
||||
case 0:
|
||||
num2 = 1586357647;
|
||||
break;
|
||||
case 4:
|
||||
{
|
||||
int num8 = num9;
|
||||
num4 = 1;
|
||||
num5 = num8;
|
||||
int num10 = num5 ^ num4;
|
||||
int num11 = num5 & num4;
|
||||
num9 = num10 + (num11 + num11);
|
||||
num2 = 1586357640;
|
||||
break;
|
||||
}
|
||||
case 19:
|
||||
goto end_IL_009b;
|
||||
}
|
||||
continue;
|
||||
end_IL_009b:
|
||||
break;
|
||||
num++;
|
||||
}
|
||||
}
|
||||
return list;
|
||||
|
|
@ -204,95 +109,22 @@ internal sealed class SpecialShopSearcher
|
|||
|
||||
private uint ConvertCurrencyItemId(uint costItemId, in SpecialShop shop)
|
||||
{
|
||||
int num = ((costItemId == 0) ? 1435581379 : 1435581385);
|
||||
uint num8 = default(uint);
|
||||
ushort num7 = default(ushort);
|
||||
bool flag = default(bool);
|
||||
while (true)
|
||||
if (costItemId == 0 || costItemId >= 8)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1435581387;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
uint num10;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 3:
|
||||
num8 = SpecialCurrencies.GetValueOrDefault(costItemId, costItemId);
|
||||
num = 1435581387;
|
||||
break;
|
||||
case 7:
|
||||
num = ((num7 == 8) ? 1435581389 : 1435581390);
|
||||
break;
|
||||
case 4:
|
||||
num8 = costItemId;
|
||||
num = 1435581387;
|
||||
break;
|
||||
case 15:
|
||||
num10 = costItemId;
|
||||
goto IL_014f;
|
||||
case 12:
|
||||
flag = false;
|
||||
num = 1435581386;
|
||||
break;
|
||||
case 14:
|
||||
num7 = 16;
|
||||
num = 1435581403;
|
||||
break;
|
||||
case 5:
|
||||
num = ((num7 != 16) ? 1435581391 : 1435581384);
|
||||
break;
|
||||
case 16:
|
||||
num = ((num7 == 4) ? 1435581382 : 1435581388);
|
||||
break;
|
||||
case 11:
|
||||
num = 1435581385;
|
||||
break;
|
||||
case 8:
|
||||
return costItemId;
|
||||
case 17:
|
||||
{
|
||||
uint[] tomestoneItemIds = _tomestoneItemIds;
|
||||
num3 = 1;
|
||||
num4 = (int)costItemId;
|
||||
num10 = tomestoneItemIds[~(~num4 + num3)];
|
||||
goto IL_014f;
|
||||
}
|
||||
case 10:
|
||||
flag = true;
|
||||
num = 1435581386;
|
||||
break;
|
||||
case 2:
|
||||
num = ((costItemId < 8) ? 1435581378 : 1435581379);
|
||||
break;
|
||||
case 13:
|
||||
num = ((costItemId <= _tomestoneItemIds.Length) ? 1435581402 : 1435581380);
|
||||
break;
|
||||
case 0:
|
||||
return num8;
|
||||
case 6:
|
||||
num8 = 1u;
|
||||
num = 1435581387;
|
||||
break;
|
||||
case 1:
|
||||
num = ((!flag) ? 1435581403 : 1435581381);
|
||||
break;
|
||||
case 9:
|
||||
{
|
||||
num7 = shop.UseCurrencyType;
|
||||
num8 = shop.RowId;
|
||||
uint num9 = num8;
|
||||
num3 = 1770637;
|
||||
num4 = (int)num9;
|
||||
num = (((uint)(~(~num4 + num3)) > 1u) ? 1435581383 : 1435581377);
|
||||
break;
|
||||
}
|
||||
IL_014f:
|
||||
num8 = num10;
|
||||
num = 1435581387;
|
||||
break;
|
||||
}
|
||||
return costItemId;
|
||||
}
|
||||
ushort num = shop.UseCurrencyType;
|
||||
uint rowId = shop.RowId;
|
||||
if (rowId - 1770637 <= 1)
|
||||
{
|
||||
num = 16;
|
||||
}
|
||||
return num switch
|
||||
{
|
||||
16 => SpecialCurrencies.GetValueOrDefault(costItemId, costItemId),
|
||||
8 => 1u,
|
||||
4 => (costItemId <= _tomestoneItemIds.Length) ? _tomestoneItemIds[costItemId - 1] : costItemId,
|
||||
_ => costItemId,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using Dalamud.Plugin.Services;
|
||||
using FFXIVClientStructs.FFXIV.Component.GUI;
|
||||
using LLib.GameData;
|
||||
|
|
@ -23,665 +22,281 @@ public static class GcSupplyActions
|
|||
|
||||
public const int MaxListRows = 40;
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool IsSelectStringReady(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(1633169237), out addonPtr) ? 1661521836 : 1661521839);
|
||||
while (true)
|
||||
if (!gameGui.TryGetAddonByName<AtkUnitBase>("SelectString", out var addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1661521838;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0054;
|
||||
case 1:
|
||||
return false;
|
||||
case 2:
|
||||
return LAddon.IsAddonReady(addonPtr);
|
||||
}
|
||||
continue;
|
||||
IL_0054:
|
||||
num = 1661521839;
|
||||
return false;
|
||||
}
|
||||
return LAddon.IsAddonReady(addonPtr);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TrySelectStringOption(IGameGui gameGui, int index)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(-223032717), out addonPtr) ? (-1381192086) : (-1381192087));
|
||||
while (true)
|
||||
if (!gameGui.TryGetAddonByName<AtkUnitBase>("SelectString", out var addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1381192088;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 2:
|
||||
num = (LAddon.IsAddonReady(addonPtr) ? (-1381192088) : (-1381192085));
|
||||
break;
|
||||
case 1:
|
||||
return false;
|
||||
case 0:
|
||||
AddonCallback.Fire(addonPtr, index);
|
||||
return true;
|
||||
case 3:
|
||||
return false;
|
||||
case 4:
|
||||
num = -1381192087;
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (!LAddon.IsAddonReady(addonPtr))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
AddonCallback.Fire(addonPtr, index);
|
||||
return true;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TryCloseSelectString(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(-223032717), out addonPtr) ? (-378189346) : (-378189345));
|
||||
while (true)
|
||||
if (!gameGui.TryGetAddonByName<AtkUnitBase>("SelectString", out var addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -378189346;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
AddonCallback.Fire(addonPtr, -1);
|
||||
return true;
|
||||
case 1:
|
||||
return false;
|
||||
case 2:
|
||||
goto IL_0068;
|
||||
}
|
||||
continue;
|
||||
IL_0068:
|
||||
num = -378189345;
|
||||
return false;
|
||||
}
|
||||
AddonCallback.Fire(addonPtr, -1);
|
||||
return true;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool IsSupplyListReady(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-1021783127), out addonPtr) ? 1360876237 : 1360876238);
|
||||
while (true)
|
||||
if (!gameGui.TryGetAddonByName<AtkUnitBase>("GrandCompanySupplyList", out var addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1360876236;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 1:
|
||||
return LAddon.IsAddonReady(addonPtr);
|
||||
case 2:
|
||||
return false;
|
||||
case 0:
|
||||
goto IL_005b;
|
||||
}
|
||||
continue;
|
||||
IL_005b:
|
||||
num = 1360876238;
|
||||
return false;
|
||||
}
|
||||
return LAddon.IsAddonReady(addonPtr);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TrySwitchToExpertTab(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-1021783127), out addonPtr) ? (-1935915101) : (-1935915100));
|
||||
while (true)
|
||||
if (!gameGui.TryGetAddonByName<AtkUnitBase>("GrandCompanySupplyList", out var addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1935915097;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
AddonCallback.Fire(addonPtr, 0, 2, 0);
|
||||
return true;
|
||||
case 4:
|
||||
num = (LAddon.IsAddonReady(addonPtr) ? (-1935915097) : (-1935915098));
|
||||
break;
|
||||
case 3:
|
||||
return false;
|
||||
case 2:
|
||||
num = -1935915100;
|
||||
break;
|
||||
case 1:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (!LAddon.IsAddonReady(addonPtr))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
AddonCallback.Fire(addonPtr, 0, 2, 0);
|
||||
return true;
|
||||
}
|
||||
|
||||
private unsafe static bool IsListLoaded(AtkUnitBase* addon)
|
||||
{
|
||||
AtkValue atkValues = *addon->AtkValues;
|
||||
AtkValueType type = atkValues.Type;
|
||||
int num = ((type == AtkValueType.Int) ? 440834222 : 440834223);
|
||||
bool result = default(bool);
|
||||
while (true)
|
||||
return atkValues.Type switch
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 440834218;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
num = 440834223;
|
||||
break;
|
||||
case 4:
|
||||
result = atkValues.Int == 2;
|
||||
num = 440834217;
|
||||
break;
|
||||
case 1:
|
||||
result = atkValues.UInt == 2;
|
||||
num = 440834217;
|
||||
break;
|
||||
case 2:
|
||||
result = false;
|
||||
num = 440834217;
|
||||
break;
|
||||
case 3:
|
||||
return result;
|
||||
case 5:
|
||||
num = ((type != AtkValueType.UInt) ? 440834216 : 440834219);
|
||||
break;
|
||||
}
|
||||
}
|
||||
AtkValueType.UInt => atkValues.UInt == 2,
|
||||
AtkValueType.Int => atkValues.Int == 2,
|
||||
_ => false,
|
||||
};
|
||||
}
|
||||
|
||||
private unsafe static bool IsExpertTab(AtkUnitBase* addon)
|
||||
{
|
||||
AtkValue atkValue = addon->AtkValues[5];
|
||||
AtkValueType type = atkValue.Type;
|
||||
int num = ((type == AtkValueType.Int) ? (-1706563251) : (-1706563253));
|
||||
bool result = default(bool);
|
||||
while (true)
|
||||
return atkValue.Type switch
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1706563256;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 4:
|
||||
result = atkValue.UInt == 2;
|
||||
num = -1706563255;
|
||||
break;
|
||||
case 1:
|
||||
return result;
|
||||
case 0:
|
||||
result = false;
|
||||
num = -1706563255;
|
||||
break;
|
||||
case 2:
|
||||
num = -1706563253;
|
||||
break;
|
||||
case 5:
|
||||
result = atkValue.Int == 2;
|
||||
num = -1706563255;
|
||||
break;
|
||||
case 3:
|
||||
num = ((type != AtkValueType.UInt) ? (-1706563256) : (-1706563252));
|
||||
break;
|
||||
}
|
||||
}
|
||||
AtkValueType.UInt => atkValue.UInt == 2,
|
||||
AtkValueType.Int => atkValue.Int == 2,
|
||||
_ => false,
|
||||
};
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool IsExpertTabActive(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(-56578548), out addonPtr) ? (-429976172) : (-429976171));
|
||||
while (true)
|
||||
if (!gameGui.TryGetAddonByName<AtkUnitBase>("GrandCompanySupplyList", out var addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -429976175;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 6:
|
||||
num = ((addonPtr->AtkValuesCount >= 7) ? (-429976174) : (-429976173));
|
||||
break;
|
||||
case 4:
|
||||
return false;
|
||||
case 5:
|
||||
num = (LAddon.IsAddonReady(addonPtr) ? (-429976176) : (-429976170));
|
||||
break;
|
||||
case 7:
|
||||
return false;
|
||||
case 3:
|
||||
return IsExpertTab(addonPtr);
|
||||
case 2:
|
||||
return false;
|
||||
case 0:
|
||||
num = -429976171;
|
||||
break;
|
||||
case 1:
|
||||
num = ((addonPtr->AtkValues == null) ? (-429976173) : (-429976169));
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (!LAddon.IsAddonReady(addonPtr))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (addonPtr->AtkValues == null || addonPtr->AtkValuesCount < 7)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return IsExpertTab(addonPtr);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static int GetListItemCount(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(-791024633), out addonPtr) ? (-2072162579) : (-2072162586));
|
||||
AtkValue atkValue = default(AtkValue);
|
||||
while (true)
|
||||
if (!gameGui.TryGetAddonByName<AtkUnitBase>("GrandCompanySupplyList", out var addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -2072162587;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 8:
|
||||
num = (LAddon.IsAddonReady(addonPtr) ? (-2072162581) : (-2072162590));
|
||||
break;
|
||||
case 9:
|
||||
num = ((addonPtr->AtkValuesCount >= 7) ? (-2072162589) : (-2072162577));
|
||||
break;
|
||||
case 0:
|
||||
num = -2072162586;
|
||||
break;
|
||||
case 7:
|
||||
return -1;
|
||||
case 5:
|
||||
return atkValue.Int;
|
||||
case 10:
|
||||
return -1;
|
||||
case 11:
|
||||
num = ((atkValue.Type != AtkValueType.UInt) ? (-2072162583) : (-2072162591));
|
||||
break;
|
||||
case 12:
|
||||
return -1;
|
||||
case 4:
|
||||
return (int)atkValue.UInt;
|
||||
case 14:
|
||||
num = ((addonPtr->AtkValues == null) ? (-2072162577) : (-2072162580));
|
||||
break;
|
||||
case 3:
|
||||
return -1;
|
||||
case 13:
|
||||
num = (IsExpertTab(addonPtr) ? (-2072162588) : (-2072162585));
|
||||
break;
|
||||
case 2:
|
||||
return -1;
|
||||
case 6:
|
||||
num = ((!IsListLoaded(addonPtr)) ? (-2072162585) : (-2072162584));
|
||||
break;
|
||||
case 1:
|
||||
atkValue = addonPtr->AtkValues[6];
|
||||
num = ((atkValue.Type != AtkValueType.Int) ? (-2072162578) : (-2072162592));
|
||||
break;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
if (!LAddon.IsAddonReady(addonPtr))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
if (addonPtr->AtkValues == null || addonPtr->AtkValuesCount < 7)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
if (!IsListLoaded(addonPtr) || !IsExpertTab(addonPtr))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
AtkValue atkValue = addonPtr->AtkValues[6];
|
||||
if (atkValue.Type == AtkValueType.Int)
|
||||
{
|
||||
return atkValue.Int;
|
||||
}
|
||||
if (atkValue.Type == AtkValueType.UInt)
|
||||
{
|
||||
return (int)atkValue.UInt;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static uint GetListItemId(IGameGui gameGui, int itemIndex)
|
||||
{
|
||||
int num = ((itemIndex < 0) ? 157882237 : 157882223);
|
||||
AtkValue atkValue = default(AtkValue);
|
||||
AtkUnitBase* addonPtr = default(AtkUnitBase*);
|
||||
while (true)
|
||||
if (itemIndex < 0 || itemIndex >= 40)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 157882237;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 12:
|
||||
num = ((atkValue.Int <= 0) ? 157882235 : 157882226);
|
||||
break;
|
||||
case 3:
|
||||
return atkValue.UInt;
|
||||
case 5:
|
||||
num = ((atkValue.Type != AtkValueType.Int) ? 157882235 : 157882225);
|
||||
break;
|
||||
case 14:
|
||||
{
|
||||
ushort atkValuesCount = addonPtr->AtkValuesCount;
|
||||
num3 = itemIndex;
|
||||
num4 = 425;
|
||||
int num5 = num4 ^ num3;
|
||||
int num6 = num4 & num3;
|
||||
num = ((atkValuesCount > num5 + (num6 + num6)) ? 157882233 : 157882228);
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
return 0u;
|
||||
case 15:
|
||||
return (uint)atkValue.Int;
|
||||
case 17:
|
||||
return 0u;
|
||||
case 18:
|
||||
num = ((itemIndex < 40) ? 157882221 : 157882237);
|
||||
break;
|
||||
case 8:
|
||||
num = 157882223;
|
||||
break;
|
||||
case 1:
|
||||
num = ((addonPtr->AtkValues == null) ? 157882228 : 157882227);
|
||||
break;
|
||||
case 9:
|
||||
return 0u;
|
||||
case 13:
|
||||
return 0u;
|
||||
case 16:
|
||||
num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(2078745431), out addonPtr) ? 157882239 : 157882231);
|
||||
break;
|
||||
case 2:
|
||||
num = (LAddon.IsAddonReady(addonPtr) ? 157882236 : 157882224);
|
||||
break;
|
||||
case 6:
|
||||
return 0u;
|
||||
case 7:
|
||||
num = (IsExpertTab(addonPtr) ? 157882230 : 157882220);
|
||||
break;
|
||||
case 11:
|
||||
{
|
||||
AtkValue* atkValues = addonPtr->AtkValues;
|
||||
num3 = itemIndex;
|
||||
num4 = 425;
|
||||
int num7 = num4 ^ num3;
|
||||
int num8 = num4 & num3;
|
||||
atkValue = atkValues[num7 + (num8 + num8)];
|
||||
num = ((atkValue.Type != AtkValueType.UInt) ? 157882232 : 157882238);
|
||||
break;
|
||||
}
|
||||
case 10:
|
||||
return 0u;
|
||||
case 4:
|
||||
num = ((!IsListLoaded(addonPtr)) ? 157882220 : 157882234);
|
||||
break;
|
||||
}
|
||||
return 0u;
|
||||
}
|
||||
if (!gameGui.TryGetAddonByName<AtkUnitBase>("GrandCompanySupplyList", out var addonPtr))
|
||||
{
|
||||
return 0u;
|
||||
}
|
||||
if (!LAddon.IsAddonReady(addonPtr))
|
||||
{
|
||||
return 0u;
|
||||
}
|
||||
if (addonPtr->AtkValues == null || addonPtr->AtkValuesCount <= 425 + itemIndex)
|
||||
{
|
||||
return 0u;
|
||||
}
|
||||
if (!IsListLoaded(addonPtr) || !IsExpertTab(addonPtr))
|
||||
{
|
||||
return 0u;
|
||||
}
|
||||
AtkValue atkValue = addonPtr->AtkValues[425 + itemIndex];
|
||||
if (atkValue.Type == AtkValueType.UInt)
|
||||
{
|
||||
return atkValue.UInt;
|
||||
}
|
||||
if (atkValue.Type == AtkValueType.Int && atkValue.Int > 0)
|
||||
{
|
||||
return (uint)atkValue.Int;
|
||||
}
|
||||
return 0u;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static int GetListItemSealReward(IGameGui gameGui, int itemIndex)
|
||||
{
|
||||
int num = ((itemIndex < 0) ? 942417142 : 942417140);
|
||||
AtkUnitBase* addonPtr = default(AtkUnitBase*);
|
||||
AtkValue atkValue = default(AtkValue);
|
||||
while (true)
|
||||
if (itemIndex < 0 || itemIndex >= 40)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 942417143;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 11:
|
||||
return -1;
|
||||
case 17:
|
||||
num = ((!IsListLoaded(addonPtr)) ? 942417138 : 942417143);
|
||||
break;
|
||||
case 9:
|
||||
{
|
||||
ushort atkValuesCount = addonPtr->AtkValuesCount;
|
||||
num3 = itemIndex;
|
||||
num4 = 265;
|
||||
num = ((atkValuesCount > (num4 | num3) + (num4 & num3)) ? 942417126 : 942417144);
|
||||
break;
|
||||
}
|
||||
case 14:
|
||||
return -1;
|
||||
case 12:
|
||||
num = 942417140;
|
||||
break;
|
||||
case 4:
|
||||
num = ((addonPtr->AtkValues == null) ? 942417144 : 942417150);
|
||||
break;
|
||||
case 2:
|
||||
return (int)atkValue.UInt;
|
||||
case 3:
|
||||
num = ((itemIndex < 40) ? 942417137 : 942417142);
|
||||
break;
|
||||
case 0:
|
||||
num = (IsExpertTab(addonPtr) ? 942417151 : 942417138);
|
||||
break;
|
||||
case 16:
|
||||
num = ((atkValue.Type != AtkValueType.UInt) ? 942417149 : 942417141);
|
||||
break;
|
||||
case 1:
|
||||
return -1;
|
||||
case 13:
|
||||
return atkValue.Int;
|
||||
case 7:
|
||||
num = (LAddon.IsAddonReady(addonPtr) ? 942417139 : 942417145);
|
||||
break;
|
||||
case 5:
|
||||
return -1;
|
||||
case 15:
|
||||
return -1;
|
||||
case 6:
|
||||
num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(2078745431), out addonPtr) ? 942417136 : 942417148);
|
||||
break;
|
||||
case 10:
|
||||
return -1;
|
||||
case 8:
|
||||
{
|
||||
AtkValue* atkValues = addonPtr->AtkValues;
|
||||
num3 = itemIndex;
|
||||
num4 = 265;
|
||||
atkValue = atkValues[(num4 | num3) + (num4 & num3)];
|
||||
num = ((atkValue.Type != AtkValueType.Int) ? 942417127 : 942417146);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
if (!gameGui.TryGetAddonByName<AtkUnitBase>("GrandCompanySupplyList", out var addonPtr))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
if (!LAddon.IsAddonReady(addonPtr))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
if (addonPtr->AtkValues == null || addonPtr->AtkValuesCount <= 265 + itemIndex)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
if (!IsListLoaded(addonPtr) || !IsExpertTab(addonPtr))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
AtkValue atkValue = addonPtr->AtkValues[265 + itemIndex];
|
||||
if (atkValue.Type == AtkValueType.Int)
|
||||
{
|
||||
return atkValue.Int;
|
||||
}
|
||||
if (atkValue.Type == AtkValueType.UInt)
|
||||
{
|
||||
return (int)atkValue.UInt;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TrySelectItem(IGameGui gameGui, int itemIndex)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(2047037119), out addonPtr) ? 83215981 : 83215979);
|
||||
while (true)
|
||||
if (!gameGui.TryGetAddonByName<AtkUnitBase>("GrandCompanySupplyList", out var addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 83215977;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
num = 83215979;
|
||||
break;
|
||||
case 4:
|
||||
num = (LAddon.IsAddonReady(addonPtr) ? 83215976 : 83215978);
|
||||
break;
|
||||
case 3:
|
||||
return false;
|
||||
case 1:
|
||||
AddonCallback.Fire(addonPtr, 1, itemIndex, 0);
|
||||
return true;
|
||||
case 2:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (!LAddon.IsAddonReady(addonPtr))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
AddonCallback.Fire(addonPtr, 1, itemIndex, 0);
|
||||
return true;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TryForceRefresh(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(2078745431), out addonPtr) ? 1468289263 : 1468289256);
|
||||
while (true)
|
||||
if (!gameGui.TryGetAddonByName<AtkUnitBase>("GrandCompanySupplyList", out var addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1468289259;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
num = 1468289256;
|
||||
break;
|
||||
case 3:
|
||||
return false;
|
||||
case 4:
|
||||
num = (LAddon.IsAddonReady(addonPtr) ? 1468289258 : 1468289257);
|
||||
break;
|
||||
case 1:
|
||||
AddonCallback.Fire(addonPtr, 2);
|
||||
return true;
|
||||
case 2:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (!LAddon.IsAddonReady(addonPtr))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
AddonCallback.Fire(addonPtr, 2);
|
||||
return true;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TryCloseSupplyList(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(-56578548), out addonPtr) ? (-131329648) : (-131329645));
|
||||
while (true)
|
||||
if (!gameGui.TryGetAddonByName<AtkUnitBase>("GrandCompanySupplyList", out var addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -131329647;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0052;
|
||||
case 2:
|
||||
return false;
|
||||
case 1:
|
||||
AddonCallback.Fire(addonPtr, -1);
|
||||
return true;
|
||||
}
|
||||
continue;
|
||||
IL_0052:
|
||||
num = -131329645;
|
||||
return false;
|
||||
}
|
||||
AddonCallback.Fire(addonPtr, -1);
|
||||
return true;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool IsRewardDialogReady(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(-1608495528), out addonPtr) ? 578433628 : 578433629);
|
||||
while (true)
|
||||
if (!gameGui.TryGetAddonByName<AtkUnitBase>("GrandCompanySupplyReward", out var addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 578433628;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 2:
|
||||
goto IL_0052;
|
||||
case 0:
|
||||
return LAddon.IsAddonReady(addonPtr);
|
||||
case 1:
|
||||
return false;
|
||||
}
|
||||
continue;
|
||||
IL_0052:
|
||||
num = 578433629;
|
||||
return false;
|
||||
}
|
||||
return LAddon.IsAddonReady(addonPtr);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TryConfirmTurnIn(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(275890163), out addonPtr) ? 799150129 : 799150135);
|
||||
while (true)
|
||||
if (!gameGui.TryGetAddonByName<AtkUnitBase>("GrandCompanySupplyReward", out var addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 799150131;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 3:
|
||||
num = 799150135;
|
||||
break;
|
||||
case 4:
|
||||
return false;
|
||||
case 1:
|
||||
AddonCallback.Fire(addonPtr, default(int));
|
||||
return true;
|
||||
case 2:
|
||||
num = (LAddon.IsAddonReady(addonPtr) ? 799150130 : 799150131);
|
||||
break;
|
||||
case 0:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (!LAddon.IsAddonReady(addonPtr))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
AddonCallback.Fire(addonPtr, default(int));
|
||||
return true;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool IsHqConfirmReady(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(1402346953), out addonPtr) ? 140237471 : 140237470);
|
||||
while (true)
|
||||
if (!gameGui.TryGetAddonByName<AtkUnitBase>("SelectYesno", out var addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 140237471;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 2:
|
||||
goto IL_0054;
|
||||
case 1:
|
||||
return false;
|
||||
case 0:
|
||||
return LAddon.IsAddonReady(addonPtr);
|
||||
}
|
||||
continue;
|
||||
IL_0054:
|
||||
num = 140237470;
|
||||
return false;
|
||||
}
|
||||
return LAddon.IsAddonReady(addonPtr);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TryConfirmHqTrade(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(-502173951), out addonPtr) ? 1659793375 : 1659793372);
|
||||
while (true)
|
||||
if (!gameGui.TryGetAddonByName<AtkUnitBase>("SelectYesno", out var addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1659793374;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 3:
|
||||
return false;
|
||||
case 0:
|
||||
AddonCallback.ClickYes(addonPtr);
|
||||
return true;
|
||||
case 4:
|
||||
num = 1659793372;
|
||||
break;
|
||||
case 1:
|
||||
num = (LAddon.IsAddonReady(addonPtr) ? 1659793374 : 1659793373);
|
||||
break;
|
||||
case 2:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (!LAddon.IsAddonReady(addonPtr))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
AddonCallback.ClickYes(addonPtr);
|
||||
return true;
|
||||
}
|
||||
|
||||
public static int GetCurrentSeals()
|
||||
|
|
@ -692,59 +307,27 @@ public static class GcSupplyActions
|
|||
public static int GetMaxSeals(IDataManager dataManager)
|
||||
{
|
||||
byte grandCompanyRank = GrandCompanyHelper.GetGrandCompanyRank();
|
||||
int num = ((grandCompanyRank != 0) ? 1262186934 : 1262186932);
|
||||
GrandCompanyRank row = default(GrandCompanyRank);
|
||||
while (true)
|
||||
if (grandCompanyRank == 0)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1262186933;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
num = 1262186932;
|
||||
break;
|
||||
case 1:
|
||||
return 0;
|
||||
case 4:
|
||||
return (int)row.MaxSeals;
|
||||
case 2:
|
||||
return 0;
|
||||
case 3:
|
||||
num = (dataManager.GetExcelSheet<GrandCompanyRank>().TryGetRow(grandCompanyRank, out row) ? 1262186929 : 1262186935);
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
if (!dataManager.GetExcelSheet<GrandCompanyRank>().TryGetRow(grandCompanyRank, out var row))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return (int)row.MaxSeals;
|
||||
}
|
||||
|
||||
public static bool IsItemExpertDeliverable(IDataManager dataManager, uint itemId)
|
||||
{
|
||||
Item row;
|
||||
int num = (dataManager.GetExcelSheet<Item>().TryGetRow(itemId, out row) ? (-1763780714) : (-1763780716));
|
||||
while (true)
|
||||
if (!dataManager.GetExcelSheet<Item>().TryGetRow(itemId, out var row))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1763780715;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 2:
|
||||
num = -1763780716;
|
||||
break;
|
||||
case 0:
|
||||
return false;
|
||||
case 3:
|
||||
num = ((row.Rarity >= 2) ? (-1763780719) : (-1763780715));
|
||||
break;
|
||||
case 1:
|
||||
return false;
|
||||
case 4:
|
||||
return row.Desynth > 0;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (row.Rarity < 2)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return row.Desynth > 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -1,152 +1,12 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
|
||||
namespace LLib.Shop;
|
||||
|
||||
public sealed record NpcPositionCacheOptions
|
||||
{
|
||||
[CompilerGenerated]
|
||||
private Type EqualityContract
|
||||
{
|
||||
[CompilerGenerated]
|
||||
get
|
||||
{
|
||||
return _200D_200B_200C_206D_206E_206F_200D_202D_206B_202E_202C_206F_206E_200C_202B_202D_206F_206C_206A_202C_202A_206C_200C_200D_206A_200D_200B_202D_202A_200E_202D_206C_200C_200F_202B_206F_202E_206E_206F_200E_202E(typeof(NpcPositionCacheOptions).TypeHandle);
|
||||
}
|
||||
}
|
||||
|
||||
public string? CacheDirectory { get; init; }
|
||||
|
||||
public string? GameVersion { get; init; }
|
||||
|
||||
public TimeSpan ScanThrottle { get; init; } = TimeSpan.Zero;
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder stringBuilder = _202B_206D_202A_206F_202C_206F_202C_200C_200F_206C_202A_202E_200E_202D_200D_200D_200D_202E_206F_200B_202B_200E_200D_206C_200F_206C_206B_206C_206E_200C_200D_206F_206F_200E_206D_200F_200E_202C_206F_200C_202E();
|
||||
_206D_206E_200B_202D_202C_206E_202C_202B_206C_206D_202B_202A_206A_200E_206A_206B_200C_202D_206B_200B_200C_206B_202E_200C_200C_202E_206A_200B_202A_206D_206E_200F_206E_202C_206C_202D_202B_202E_200D_206E_202E(stringBuilder, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(-186520668));
|
||||
_206D_206E_200B_202D_202C_206E_202C_202B_206C_206D_202B_202A_206A_200E_206A_206B_200C_202D_206B_200B_200C_206B_202E_200C_200C_202E_206A_200B_202A_206D_206E_200F_206E_202C_206C_202D_202B_202E_200D_206E_202E(stringBuilder, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(579144622));
|
||||
int num = ((!PrintMembers(stringBuilder)) ? (-658124115) : (-658124116));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -658124115;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 2:
|
||||
num = -658124116;
|
||||
break;
|
||||
case 1:
|
||||
_202E_200D_202E_200E_206C_200D_206A_206B_202B_200B_206B_206F_206F_206F_206D_206C_202D_202C_206F_202A_206B_206A_202D_202E_202A_206F_200B_206F_200E_206A_200D_202B_202B_200B_206A_202A_202E_200D_200C_202E_202E(stringBuilder, ' ');
|
||||
num = -658124115;
|
||||
break;
|
||||
case 0:
|
||||
_202E_200D_202E_200E_206C_200D_206A_206B_202B_200B_206B_206F_206F_206F_206D_206C_202D_202C_206F_202A_206B_206A_202D_202E_202A_206F_200B_206F_200E_206A_200D_202B_202B_200B_206A_202A_202E_200D_200C_202E_202E(stringBuilder, '}');
|
||||
return _200B_202C_202C_200F_200F_206F_200B_200D_202E_202B_206F_206F_200D_200D_206B_200E_200F_202A_202D_202C_200B_206C_200D_202B_206E_202C_206F_206A_206F_206B_202A_200D_206F_202D_200F_200E_206E_200C_206C_200C_202E((object?)stringBuilder);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
private bool PrintMembers(StringBuilder builder)
|
||||
{
|
||||
_206E_202A_202D_202A_202E_202A_200B_200B_202B_202B_202D_202E_206D_206D_206B_202B_202A_202D_206E_206E_200F_200B_206B_206E_200E_202C_206A_202E_206D_200D_202C_202A_202A_206F_200C_202D_202E_206E_200B_206C_202E();
|
||||
_206D_206E_200B_202D_202C_206E_202C_202B_206C_206D_202B_202A_206A_200E_206A_206B_200C_202D_206B_200B_200C_206B_202E_200C_200C_202E_206A_200B_202A_206D_206E_200F_206E_202C_206C_202D_202B_202E_200D_206E_202E(builder, global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(624739849));
|
||||
_206C_202D_206D_202A_202B_202D_206C_206F_202B_206D_206C_202C_206F_202E_200F_206C_202C_200E_200E_202C_206A_200F_202C_200B_202B_200D_202E_200C_206F_206A_206C_202C_202C_206E_200E_206D_202E_200F_206A_206F_202E(builder, (object?)CacheDirectory);
|
||||
_206D_206E_200B_202D_202C_206E_202C_202B_206C_206D_202B_202A_206A_200E_206A_206B_200C_202D_206B_200B_200C_206B_202E_200C_200C_202E_206A_200B_202A_206D_206E_200F_206E_202C_206C_202D_202B_202E_200D_206E_202E(builder, global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(1054887383));
|
||||
_206C_202D_206D_202A_202B_202D_206C_206F_202B_206D_206C_202C_206F_202E_200F_206C_202C_200E_200E_202C_206A_200F_202C_200B_202B_200D_202E_200C_206F_206A_206C_202C_202C_206E_200E_206D_202E_200F_206A_206F_202E(builder, (object?)GameVersion);
|
||||
_206D_206E_200B_202D_202C_206E_202C_202B_206C_206D_202B_202A_206A_200E_206A_206B_200C_202D_206B_200B_200C_206B_202E_200C_200C_202E_206A_200B_202A_206D_206E_200F_206E_202C_206C_202D_202B_202E_200D_206E_202E(builder, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(2000135391));
|
||||
_206D_206E_200B_202D_202C_206E_202C_202B_206C_206D_202B_202A_206A_200E_206A_206B_200C_202D_206B_200B_200C_206B_202E_200C_200C_202E_206A_200B_202A_206D_206E_200F_206E_202C_206C_202D_202B_202E_200D_206E_202E(builder, ScanThrottle.ToString());
|
||||
return true;
|
||||
}
|
||||
|
||||
[CompilerGenerated]
|
||||
public bool Equals(NpcPositionCacheOptions? other)
|
||||
{
|
||||
int num = (((object)this == other) ? (-1497695151) : (-1497695145));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1497695146;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 5:
|
||||
num = -1497695145;
|
||||
break;
|
||||
case 3:
|
||||
return false;
|
||||
case 1:
|
||||
num = (((object)other == null) ? (-1497695147) : (-1497695146));
|
||||
break;
|
||||
case 2:
|
||||
num = ((!EqualityComparer<string>.Default.Equals(GameVersion, other.GameVersion)) ? (-1497695147) : (-1497695152));
|
||||
break;
|
||||
case 6:
|
||||
return EqualityComparer<TimeSpan>.Default.Equals(ScanThrottle, other.ScanThrottle);
|
||||
case 7:
|
||||
return true;
|
||||
case 4:
|
||||
num = ((!EqualityComparer<string>.Default.Equals(CacheDirectory, other.CacheDirectory)) ? (-1497695147) : (-1497695148));
|
||||
break;
|
||||
case 0:
|
||||
num = ((!_200C_202B_206E_200C_206B_202A_202C_202D_200D_206D_200C_200F_200F_200D_206B_206F_206F_206C_202D_206D_202A_206D_200D_200C_202E_200B_200C_200B_200F_202D_206D_206E_200C_200C_202C_206F_200B_200F_202D_202C_202E(EqualityContract, other.EqualityContract)) ? (-1497695147) : (-1497695150));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool IEquatable<NpcPositionCacheOptions>.Equals(NpcPositionCacheOptions? other)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in Equals
|
||||
return this.Equals(other);
|
||||
}
|
||||
|
||||
static Type? _200D_200B_200C_206D_206E_206F_200D_202D_206B_202E_202C_206F_206E_200C_202B_202D_206F_206C_206A_202C_202A_206C_200C_200D_206A_200D_200B_202D_202A_200E_202D_206C_200C_200F_202B_206F_202E_206E_206F_200E_202E(RuntimeTypeHandle P_0)
|
||||
{
|
||||
return Type.GetTypeFromHandle(P_0);
|
||||
}
|
||||
|
||||
static StringBuilder? _202B_206D_202A_206F_202C_206F_202C_200C_200F_206C_202A_202E_200E_202D_200D_200D_200D_202E_206F_200B_202B_200E_200D_206C_200F_206C_206B_206C_206E_200C_200D_206F_206F_200E_206D_200F_200E_202C_206F_200C_202E()
|
||||
{
|
||||
return new StringBuilder();
|
||||
}
|
||||
|
||||
static StringBuilder? _206D_206E_200B_202D_202C_206E_202C_202B_206C_206D_202B_202A_206A_200E_206A_206B_200C_202D_206B_200B_200C_206B_202E_200C_200C_202E_206A_200B_202A_206D_206E_200F_206E_202C_206C_202D_202B_202E_200D_206E_202E(StringBuilder? P_0, string? P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static StringBuilder? _202E_200D_202E_200E_206C_200D_206A_206B_202B_200B_206B_206F_206F_206F_206D_206C_202D_202C_206F_202A_206B_206A_202D_202E_202A_206F_200B_206F_200E_206A_200D_202B_202B_200B_206A_202A_202E_200D_200C_202E_202E(StringBuilder? P_0, char P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static string? _200B_202C_202C_200F_200F_206F_200B_200D_202E_202B_206F_206F_200D_200D_206B_200E_200F_202A_202D_202C_200B_206C_200D_202B_206E_202C_206F_206A_206F_206B_202A_200D_206F_202D_200F_200E_206E_200C_206C_200C_202E(object? P_0)
|
||||
{
|
||||
return P_0.ToString();
|
||||
}
|
||||
|
||||
static void _206E_202A_202D_202A_202E_202A_200B_200B_202B_202B_202D_202E_206D_206D_206B_202B_202A_202D_206E_206E_200F_200B_206B_206E_200E_202C_206A_202E_206D_200D_202C_202A_202A_206F_200C_202D_202E_206E_200B_206C_202E()
|
||||
{
|
||||
RuntimeHelpers.EnsureSufficientExecutionStack();
|
||||
}
|
||||
|
||||
static StringBuilder? _206C_202D_206D_202A_202B_202D_206C_206F_202B_206D_206C_202C_206F_202E_200F_206C_202C_200E_200E_202C_206A_200F_202C_200B_202B_200D_202E_200C_206F_206A_206C_202C_202C_206E_200E_206D_202E_200F_206A_206F_202E(StringBuilder? P_0, object? P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static bool _200C_202B_206E_200C_206B_202A_202C_202D_200D_206D_200C_200F_200F_200D_206B_206F_206F_206C_202D_206D_202A_206D_200D_200C_202E_200B_200C_200B_200F_202D_206D_206E_200C_200C_202C_206F_200B_200F_202D_202C_202E(Type? P_0, Type? P_1)
|
||||
{
|
||||
return P_0 == P_1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
using System;
|
||||
using System.Numerics;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Threading;
|
||||
using Dalamud.Game.Addon.Lifecycle;
|
||||
using Dalamud.Game.Addon.Lifecycle.AddonArgTypes;
|
||||
using Dalamud.Game.NativeWrapper;
|
||||
using Dalamud.Plugin.Services;
|
||||
using FFXIVClientStructs.FFXIV.Component.GUI;
|
||||
using LLib.GameUI;
|
||||
|
|
@ -31,9 +28,6 @@ public class RegularShopBase : IDisposable
|
|||
|
||||
private long _purchaseDeadlineMs;
|
||||
|
||||
[CompilerGenerated]
|
||||
private EventHandler<PurchaseCompletedEventArgs>? m_PurchaseCompleted;
|
||||
|
||||
private const int MaxPurchaseQuantity = 99;
|
||||
|
||||
private const int MaxWaitMs = 3000;
|
||||
|
|
@ -52,267 +46,110 @@ public class RegularShopBase : IDisposable
|
|||
}
|
||||
set
|
||||
{
|
||||
int num = ((PurchaseState == null) ? (-314894367) : (-314894366));
|
||||
while (true)
|
||||
if (PurchaseState != null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -314894368;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
num = -314894366;
|
||||
break;
|
||||
case 1:
|
||||
return;
|
||||
case 2:
|
||||
PurchaseState.IsAwaitingYesNo = value;
|
||||
num = -314894367;
|
||||
break;
|
||||
}
|
||||
PurchaseState.IsAwaitingYesNo = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public event EventHandler<PurchaseCompletedEventArgs>? PurchaseCompleted
|
||||
{
|
||||
[CompilerGenerated]
|
||||
add
|
||||
{
|
||||
EventHandler<PurchaseCompletedEventArgs> eventHandler = this.m_PurchaseCompleted;
|
||||
int num = 660558086;
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 660558087;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 2:
|
||||
return;
|
||||
case 1:
|
||||
{
|
||||
EventHandler<PurchaseCompletedEventArgs> eventHandler2 = eventHandler;
|
||||
EventHandler<PurchaseCompletedEventArgs> value2 = (EventHandler<PurchaseCompletedEventArgs>)_202E_202D_202E_200D_200B_206C_202C_200F_206C_200C_206B_202A_200B_202A_200D_206B_202B_206B_200F_200C_206C_206C_206B_202B_202C_200D_206B_202A_200E_206D_206B_200E_200E_206E_202D_206D_200F_206E_202C_206E_202E((Delegate)eventHandler2, (Delegate)value);
|
||||
eventHandler = Interlocked.CompareExchange(ref this.m_PurchaseCompleted, value2, eventHandler2);
|
||||
num = (((object)eventHandler != eventHandler2) ? 660558086 : 660558085);
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
num = 660558086;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
[CompilerGenerated]
|
||||
remove
|
||||
{
|
||||
EventHandler<PurchaseCompletedEventArgs> eventHandler = this.m_PurchaseCompleted;
|
||||
int num = 1746183052;
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1746183053;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
num = 1746183052;
|
||||
break;
|
||||
case 2:
|
||||
return;
|
||||
case 1:
|
||||
{
|
||||
EventHandler<PurchaseCompletedEventArgs> eventHandler2 = eventHandler;
|
||||
EventHandler<PurchaseCompletedEventArgs> value2 = (EventHandler<PurchaseCompletedEventArgs>)_200B_206D_202C_206D_206C_200D_202B_200D_202A_202E_200E_200C_200E_206D_202B_206E_200F_206E_200E_200B_202C_206E_202C_206A_206B_206F_206B_200B_206D_202D_202C_202C_206D_202B_202D_206B_200D_200C_200C_202C_202E((Delegate)eventHandler2, (Delegate)value);
|
||||
eventHandler = Interlocked.CompareExchange(ref this.m_PurchaseCompleted, value2, eventHandler2);
|
||||
num = (((object)eventHandler != eventHandler2) ? 1746183052 : 1746183055);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public event EventHandler<PurchaseCompletedEventArgs>? PurchaseCompleted;
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public RegularShopBase(IShopWindow parentWindow, string addonName, IPluginLog pluginLog, IGameGui gameGui, IAddonLifecycle addonLifecycle, IDataManager dataManager)
|
||||
{
|
||||
_206B_206A_202C_200C_206E_200C_202C_206A_200D_202A_202D_206D_200E_200B_206E_206F_200B_206A_206F_202D_200F_202A_202C_200E_202C_202B_206A_202C_200F_202D_206D_202D_202A_206C_202C_206C_206B_200B_200D_200F_202E((object)parentWindow, global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(1152352366));
|
||||
_200F_206D_202A_206D_200C_206A_202D_200D_206E_200F_206E_206D_206F_202B_202C_202A_200E_202D_206C_202B_200E_202D_206F_206C_202B_202B_206F_206F_206D_202C_202B_202E_200D_202A_206D_206A_206C_200C_206F_200F_202E(addonName, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(876094366));
|
||||
_206B_206A_202C_200C_206E_200C_202C_206A_200D_202A_202D_206D_200E_200B_206E_206F_200B_206A_206F_202D_200F_202A_202C_200E_202C_202B_206A_202C_200F_202D_206D_202D_202A_206C_202C_206C_206B_200B_200D_200F_202E((object)pluginLog, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(-2117874046));
|
||||
_206B_206A_202C_200C_206E_200C_202C_206A_200D_202A_202D_206D_200E_200B_206E_206F_200B_206A_206F_202D_200F_202A_202C_200E_202C_202B_206A_202C_200F_202D_206D_202D_202A_206C_202C_206C_206B_200B_200D_200F_202E((object)gameGui, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(608358874));
|
||||
_206B_206A_202C_200C_206E_200C_202C_206A_200D_202A_202D_206D_200E_200B_206E_206F_200B_206A_206F_202D_200F_202A_202C_200E_202C_202B_206A_202C_200F_202D_206D_202D_202A_206C_202C_206C_206B_200B_200D_200F_202E((object)addonLifecycle, global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(1756451262));
|
||||
_206B_206A_202C_200C_206E_200C_202C_206A_200D_202A_202D_206D_200E_200B_206E_206F_200B_206A_206F_202D_200F_202A_202C_200E_202C_202B_206A_202C_200F_202D_206D_202D_202A_206C_202C_206C_206B_200B_200D_200F_202E((object)dataManager, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(990210437));
|
||||
ArgumentNullException.ThrowIfNull(parentWindow, "parentWindow");
|
||||
ArgumentException.ThrowIfNullOrEmpty(addonName, "addonName");
|
||||
ArgumentNullException.ThrowIfNull(pluginLog, "pluginLog");
|
||||
ArgumentNullException.ThrowIfNull(gameGui, "gameGui");
|
||||
ArgumentNullException.ThrowIfNull(addonLifecycle, "addonLifecycle");
|
||||
ArgumentNullException.ThrowIfNull(dataManager, "dataManager");
|
||||
_parentWindow = parentWindow;
|
||||
_addonName = addonName;
|
||||
_pluginLog = pluginLog;
|
||||
_gameGui = gameGui;
|
||||
_addonLifecycle = addonLifecycle;
|
||||
_itemSheet = dataManager.GetExcelSheet<Item>();
|
||||
_202B_200B_206D_200B_206F_200C_200C_206E_200B_206E_206D_206B_206E_202A_200B_206F_202B_206F_206F_206E_200D_200F_206D_200E_202C_200D_206E_200C_200D_202A_202C_200B_202A_202E_202D_202E_202A_206B_206F_200C_202E(_addonLifecycle, AddonEvent.PostSetup, _addonName, (IAddonLifecycle.AddonEventDelegate)ShopPostSetup);
|
||||
_202B_200B_206D_200B_206F_200C_200C_206E_200B_206E_206D_206B_206E_202A_200B_206F_202B_206F_206F_206E_200D_200F_206D_200E_202C_200D_206E_200C_200D_202A_202C_200B_202A_202E_202D_202E_202A_206B_206F_200C_202E(_addonLifecycle, AddonEvent.PreFinalize, _addonName, (IAddonLifecycle.AddonEventDelegate)ShopPreFinalize);
|
||||
_202B_200B_206D_200B_206F_200C_200C_206E_200B_206E_206D_206B_206E_202A_200B_206F_202B_206F_206F_206E_200D_200F_206D_200E_202C_200D_206E_200C_200D_202A_202C_200B_202A_202E_202D_202E_202A_206B_206F_200C_202E(_addonLifecycle, AddonEvent.PostUpdate, _addonName, (IAddonLifecycle.AddonEventDelegate)ShopPostUpdate);
|
||||
_addonLifecycle.RegisterListener(AddonEvent.PostSetup, _addonName, ShopPostSetup);
|
||||
_addonLifecycle.RegisterListener(AddonEvent.PreFinalize, _addonName, ShopPreFinalize);
|
||||
_addonLifecycle.RegisterListener(AddonEvent.PostUpdate, _addonName, ShopPostUpdate);
|
||||
}
|
||||
|
||||
private unsafe void ShopPostSetup(AddonEvent type, AddonArgs args)
|
||||
{
|
||||
int num = (_parentWindow.IsEnabled ? (-1920873629) : (-1920873630));
|
||||
while (true)
|
||||
if (!_parentWindow.IsEnabled)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1920873629;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 4:
|
||||
_parentWindow.IsOpen = true;
|
||||
num = -1920873632;
|
||||
break;
|
||||
case 0:
|
||||
_parentWindow.UpdateShopStock((AtkUnitBase*)_206F_200C_202D_200F_200F_206B_206F_200D_202B_206C_202E_206C_206F_200D_206F_206B_200C_200B_202E_200D_200B_200C_206B_200F_200B_202E_202C_202C_206A_200C_206D_200D_206D_200B_200E_202C_206D_200B_200C_202A_202E(args).Address);
|
||||
PostUpdateShopStock();
|
||||
num = ((ItemForSale == null) ? (-1920873632) : (-1920873625));
|
||||
break;
|
||||
case 3:
|
||||
return;
|
||||
case 2:
|
||||
num = -1920873630;
|
||||
break;
|
||||
case 1:
|
||||
ItemForSale = null;
|
||||
_parentWindow.IsOpen = false;
|
||||
return;
|
||||
}
|
||||
ItemForSale = null;
|
||||
_parentWindow.IsOpen = false;
|
||||
return;
|
||||
}
|
||||
_parentWindow.UpdateShopStock((AtkUnitBase*)args.Addon.Address);
|
||||
PostUpdateShopStock();
|
||||
if (ItemForSale != null)
|
||||
{
|
||||
_parentWindow.IsOpen = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void ShopPreFinalize(AddonEvent type, AddonArgs args)
|
||||
{
|
||||
int num = ((PurchaseState == null) ? (-1080756393) : (-1080756395));
|
||||
while (true)
|
||||
if (PurchaseState != null && ItemForSale != null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1080756396;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
_parentWindow.IsOpen = false;
|
||||
return;
|
||||
case 1:
|
||||
num = ((ItemForSale == null) ? (-1080756393) : (-1080756400));
|
||||
break;
|
||||
case 4:
|
||||
CompletePurchase(ItemForSale.ItemId, success: false);
|
||||
num = -1080756396;
|
||||
break;
|
||||
case 3:
|
||||
PurchaseState = null;
|
||||
_parentWindow.RestoreExternalPluginState();
|
||||
num = -1080756396;
|
||||
break;
|
||||
case 2:
|
||||
num = -1080756395;
|
||||
break;
|
||||
}
|
||||
CompletePurchase(ItemForSale.ItemId, success: false);
|
||||
}
|
||||
else
|
||||
{
|
||||
PurchaseState = null;
|
||||
_parentWindow.RestoreExternalPluginState();
|
||||
}
|
||||
_parentWindow.IsOpen = false;
|
||||
}
|
||||
|
||||
private unsafe void ShopPostUpdate(AddonEvent type, AddonArgs args)
|
||||
{
|
||||
int num = (_parentWindow.IsEnabled ? (-1011514953) : (-1011514956));
|
||||
Vector2 valueOrDefault = default(Vector2);
|
||||
Vector2? position = default(Vector2?);
|
||||
short num6 = default(short);
|
||||
short num5 = default(short);
|
||||
while (true)
|
||||
if (!_parentWindow.IsEnabled)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1011514953;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
ItemForSale = null;
|
||||
_parentWindow.IsOpen = false;
|
||||
return;
|
||||
}
|
||||
_parentWindow.UpdateShopStock((AtkUnitBase*)args.Addon.Address);
|
||||
PostUpdateShopStock();
|
||||
if (ItemForSale != null)
|
||||
{
|
||||
AtkUnitBase* address = (AtkUnitBase*)args.Addon.Address;
|
||||
short num = 0;
|
||||
short num2 = 0;
|
||||
address->GetPosition(&num, &num2);
|
||||
ushort num3 = 0;
|
||||
ushort num4 = 0;
|
||||
address->GetSize(&num3, &num4, scaled: true);
|
||||
num += (short)num3;
|
||||
Vector2? position = _parentWindow.Position;
|
||||
if (position.HasValue)
|
||||
{
|
||||
case 0:
|
||||
_parentWindow.UpdateShopStock((AtkUnitBase*)_206F_200C_202D_200F_200F_206B_206F_200D_202B_206C_202E_206C_206F_200D_206F_206B_200C_200B_202E_200D_200B_200C_206B_200F_200B_202E_202C_202C_206A_200C_206D_200D_206D_200B_200E_202C_206D_200B_200C_202A_202E(args).Address);
|
||||
PostUpdateShopStock();
|
||||
num = ((ItemForSale == null) ? (-1011514945) : (-1011514954));
|
||||
break;
|
||||
case 8:
|
||||
_parentWindow.IsOpen = false;
|
||||
return;
|
||||
case 6:
|
||||
valueOrDefault = position.GetValueOrDefault();
|
||||
num = (((short)valueOrDefault.X != num6) ? (-1011514958) : (-1011514955));
|
||||
break;
|
||||
case 7:
|
||||
num = -1011514956;
|
||||
break;
|
||||
case 4:
|
||||
_parentWindow.IsOpen = true;
|
||||
return;
|
||||
case 5:
|
||||
_parentWindow.Position = new Vector2(num6, num5);
|
||||
num = -1011514957;
|
||||
break;
|
||||
case 1:
|
||||
{
|
||||
AtkUnitBase* address = (AtkUnitBase*)_206F_200C_202D_200F_200F_206B_206F_200D_202B_206C_202E_206C_206F_200D_206F_206B_200C_200B_202E_200D_200B_200C_206B_200F_200B_202E_202C_202C_206A_200C_206D_200D_206D_200B_200E_202C_206D_200B_200C_202A_202E(args).Address;
|
||||
num6 = 0;
|
||||
num5 = 0;
|
||||
address->GetPosition(&num6, &num5);
|
||||
ushort num7 = 0;
|
||||
ushort num8 = 0;
|
||||
address->GetSize(&num7, &num8, scaled: true);
|
||||
num6 += (short)num7;
|
||||
position = _parentWindow.Position;
|
||||
num = ((!position.HasValue) ? (-1011514957) : (-1011514959));
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
num = (((short)valueOrDefault.Y == num5) ? (-1011514957) : (-1011514958));
|
||||
break;
|
||||
case 3:
|
||||
ItemForSale = null;
|
||||
_parentWindow.IsOpen = false;
|
||||
return;
|
||||
Vector2 valueOrDefault = position.GetValueOrDefault();
|
||||
if ((short)valueOrDefault.X != num || (short)valueOrDefault.Y != num2)
|
||||
{
|
||||
_parentWindow.Position = new Vector2(num, num2);
|
||||
}
|
||||
}
|
||||
_parentWindow.IsOpen = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
_parentWindow.IsOpen = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void PostUpdateShopStock()
|
||||
{
|
||||
int num = ((ItemForSale == null) ? 662202299 : 662202301);
|
||||
int ownedItems = default(int);
|
||||
while (true)
|
||||
if (ItemForSale != null && PurchaseState != null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 662202297;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
int ownedItems = (int)ItemForSale.OwnedItems;
|
||||
if (PurchaseState.OwnedItems != ownedItems)
|
||||
{
|
||||
case 3:
|
||||
ownedItems = (int)ItemForSale.OwnedItems;
|
||||
num = ((PurchaseState.OwnedItems == ownedItems) ? 662202299 : 662202296);
|
||||
break;
|
||||
case 2:
|
||||
return;
|
||||
case 0:
|
||||
num = 662202301;
|
||||
break;
|
||||
case 4:
|
||||
num = ((PurchaseState == null) ? 662202299 : 662202298);
|
||||
break;
|
||||
case 1:
|
||||
PurchaseState.OwnedItems = ownedItems;
|
||||
PurchaseState.NextStepMs = _202E_202E_202D_202D_202D_202D_206B_202B_200E_206D_206E_206C_206B_202C_200C_200D_206C_200E_200C_202E_200B_202D_206B_202C_200E_202E_202C_200C_200E_202A_206C_200C_206F_200D_200E_206D_202A_202E_206C_202E() + 250;
|
||||
num = 662202299;
|
||||
break;
|
||||
PurchaseState.NextStepMs = Environment.TickCount64 + 250;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -324,324 +161,93 @@ public class RegularShopBase : IDisposable
|
|||
|
||||
public int GetMaxItemsToPurchase()
|
||||
{
|
||||
int num = ((ItemForSale != null) ? (-1965181968) : (-1965181966));
|
||||
int maxHoldableQuantity = default(int);
|
||||
while (true)
|
||||
if (ItemForSale == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1965181965;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 3:
|
||||
maxHoldableQuantity = InventoryHelper.GetMaxHoldableQuantity(ItemForSale.ItemId, _itemSheet);
|
||||
num = ((ItemForSale.Price != 0) ? (-1965181967) : (-1965181965));
|
||||
break;
|
||||
case 2:
|
||||
return _200E_202C_200C_202A_206C_202C_206E_206F_206D_202C_202C_200C_200B_200E_206D_206E_202D_206A_202D_202D_202D_202A_202B_200C_206E_206E_206D_206A_206D_206C_200E_206A_202B_206C_200D_200C_206F_206D_200C_202D_202E((int)(GetCurrencyCount(ItemForSale.CurrencyItemId) / ItemForSale.Price), maxHoldableQuantity);
|
||||
case 4:
|
||||
num = -1965181966;
|
||||
break;
|
||||
case 1:
|
||||
return 0;
|
||||
case 0:
|
||||
return maxHoldableQuantity;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
int maxHoldableQuantity = InventoryHelper.GetMaxHoldableQuantity(ItemForSale.ItemId, _itemSheet);
|
||||
if (ItemForSale.Price == 0)
|
||||
{
|
||||
return maxHoldableQuantity;
|
||||
}
|
||||
return Math.Min((int)(GetCurrencyCount(ItemForSale.CurrencyItemId) / ItemForSale.Price), maxHoldableQuantity);
|
||||
}
|
||||
|
||||
public void CancelAutoPurchase()
|
||||
{
|
||||
int num = ((ItemForSale == null) ? (-639138042) : (-639138043));
|
||||
while (true)
|
||||
if (ItemForSale != null && PurchaseState != null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -639138041;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 1:
|
||||
return;
|
||||
case 2:
|
||||
num = ((PurchaseState == null) ? (-639138042) : (-639138044));
|
||||
break;
|
||||
case 0:
|
||||
num = -639138043;
|
||||
break;
|
||||
case 3:
|
||||
CompletePurchase(ItemForSale.ItemId, success: false);
|
||||
num = -639138042;
|
||||
break;
|
||||
}
|
||||
CompletePurchase(ItemForSale.ItemId, success: false);
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public void StartAutoPurchase(int toPurchase)
|
||||
{
|
||||
int num = ((ItemForSale != null) ? 547091109 : 547091110);
|
||||
while (true)
|
||||
if (ItemForSale == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 547091111;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0046;
|
||||
case 1:
|
||||
throw _200D_200C_202A_202D_202C_206D_206F_202E_202A_206E_202B_200E_200C_200F_200C_206B_200E_202E_206E_202E_202B_206C_200E_200D_200C_206B_200D_200F_202D_206D_202E_206A_206B_200D_200E_200E_200F_202D_202A_202A_202E(global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(-1974882015));
|
||||
case 2:
|
||||
PurchaseState = new PurchaseState((int)ItemForSale.OwnedItems + toPurchase, (int)ItemForSale.OwnedItems);
|
||||
_parentWindow.SaveExternalPluginState();
|
||||
return;
|
||||
}
|
||||
continue;
|
||||
IL_0046:
|
||||
num = 547091110;
|
||||
throw new InvalidOperationException("Cannot start auto-purchase without an item selected");
|
||||
}
|
||||
PurchaseState = new PurchaseState((int)ItemForSale.OwnedItems + toPurchase, (int)ItemForSale.OwnedItems);
|
||||
_parentWindow.SaveExternalPluginState();
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe void HandleNextPurchaseStep()
|
||||
{
|
||||
int num = ((ItemForSale == null) ? (-1459965159) : (-1459965154));
|
||||
int num7 = default(int);
|
||||
AtkUnitBase* addonPtr = default(AtkUnitBase*);
|
||||
while (true)
|
||||
if (ItemForSale == null || PurchaseState == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1459965163;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 6:
|
||||
num = -1459965154;
|
||||
break;
|
||||
case 10:
|
||||
return;
|
||||
case 0:
|
||||
_206B_200E_206A_206A_202E_202E_202E_200F_206C_202B_206E_200C_202C_200F_202E_200E_206E_202E_202C_202C_206E_206B_206E_206C_200E_206F_202C_202B_202B_206E_202C_202C_202C_200F_202C_200C_206B_206D_200F_202B_202E(_pluginLog, _200E_206A_206B_200B_206E_200D_202B_200B_202C_200C_206A_202E_206F_202C_206E_200D_200B_200F_202D_202B_206A_202E_200D_206F_200B_206E_200F_202E_206D_200C_206C_200B_206F_202C_206E_200D_200C_202E_206D_202B_202E(global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(-1851945026), ItemForSale.ItemName), Array.Empty<object>());
|
||||
CompletePurchase(ItemForSale.ItemId, success: false);
|
||||
return;
|
||||
case 2:
|
||||
num = ((PurchaseState.NextStepMs != long.MaxValue) ? (-1459965153) : (-1459965155));
|
||||
break;
|
||||
case 13:
|
||||
{
|
||||
IPluginLog pluginLog2 = _pluginLog;
|
||||
DefaultInterpolatedStringHandler defaultInterpolatedStringHandler2 = new DefaultInterpolatedStringHandler(45, 2);
|
||||
defaultInterpolatedStringHandler2.AppendLiteral(global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-1919731444));
|
||||
defaultInterpolatedStringHandler2.AppendFormatted(PurchaseState.DesiredItems);
|
||||
defaultInterpolatedStringHandler2.AppendLiteral(global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(-1891359698));
|
||||
defaultInterpolatedStringHandler2.AppendFormatted(PurchaseState.OwnedItems);
|
||||
defaultInterpolatedStringHandler2.AppendLiteral(global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(-542666901));
|
||||
_202C_202E_200D_202B_202D_200B_200B_206E_202C_200D_202B_206E_206E_206B_202D_206B_202E_200D_202C_202D_206C_206E_202C_200C_206E_202B_202E_202A_202D_206F_200B_200D_206C_206C_200F_200B_206D_202D_202D_200E_202E(pluginLog2, defaultInterpolatedStringHandler2.ToStringAndClear(), Array.Empty<object>());
|
||||
CompletePurchase(ItemForSale.ItemId, success: true);
|
||||
return;
|
||||
}
|
||||
case 1:
|
||||
num = ((!PurchaseState.IsComplete) ? (-1459965168) : (-1459965160));
|
||||
break;
|
||||
case 5:
|
||||
{
|
||||
int maxHoldableQuantity = InventoryHelper.GetMaxHoldableQuantity(ItemForSale.ItemId, _itemSheet);
|
||||
num7 = _200E_202C_200C_202A_206C_202C_206E_206F_206D_202C_202C_200C_200B_200E_206D_206E_202D_206A_202D_202D_202D_202A_202B_200C_206E_206E_206D_206A_206D_206C_200E_206A_202B_206C_200D_200C_206F_206D_200C_202D_202E(99, maxHoldableQuantity);
|
||||
num = ((num7 != 0) ? (-1459965167) : (-1459965163));
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
num = ((!_gameGui.TryGetAddonByName<AtkUnitBase>(_addonName, out addonPtr)) ? (-1459965161) : (-1459965156));
|
||||
break;
|
||||
case 4:
|
||||
num = ((_202E_202E_202D_202D_202D_202D_206B_202B_200E_206D_206E_206C_206B_202C_200C_200D_206C_200E_200C_202E_200B_202D_206B_202C_200E_202E_202C_200C_200E_202A_206C_200C_206F_200D_200E_206D_202A_202E_206C_202E() < PurchaseState.NextStepMs) ? (-1459965161) : (-1459965162));
|
||||
break;
|
||||
case 9:
|
||||
{
|
||||
int num8 = _200E_202C_200C_202A_206C_202C_206E_206F_206D_202C_202C_200C_200B_200E_206D_206E_202D_206A_202D_202D_202D_202A_202B_200C_206E_206E_206D_206A_206D_206C_200E_206A_202B_206C_200D_200C_206F_206D_200C_202D_202E(PurchaseState.ItemsLeftToBuy, num7);
|
||||
IPluginLog pluginLog3 = _pluginLog;
|
||||
DefaultInterpolatedStringHandler defaultInterpolatedStringHandler3 = new DefaultInterpolatedStringHandler(9, 2);
|
||||
defaultInterpolatedStringHandler3.AppendLiteral(global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-2017196427));
|
||||
defaultInterpolatedStringHandler3.AppendFormatted(num8);
|
||||
defaultInterpolatedStringHandler3.AppendLiteral(global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(640094798));
|
||||
defaultInterpolatedStringHandler3.AppendFormatted(ItemForSale.ItemName);
|
||||
_202C_202E_200D_202B_202D_200B_200B_206E_202C_200D_202B_206E_206E_206B_202D_206B_202E_200D_202C_202D_206C_206E_202C_200C_206E_202B_202E_202A_202D_206F_200B_200D_206C_206C_200F_200B_206D_202D_202D_200E_202E(pluginLog3, defaultInterpolatedStringHandler3.ToStringAndClear(), Array.Empty<object>());
|
||||
_parentWindow.TriggerPurchase(addonPtr, num8);
|
||||
PurchaseState.NextStepMs = long.MaxValue;
|
||||
_purchaseDeadlineMs = _202E_202E_202D_202D_202D_202D_206B_202B_200E_206D_206E_206C_206B_202C_200C_200D_206C_200E_200C_202E_200B_202D_206B_202C_200E_202E_202C_200C_200E_202A_206C_200C_206F_200D_200E_206D_202A_202E_206C_202E() + 3000;
|
||||
PurchaseState.IsAwaitingYesNo = true;
|
||||
return;
|
||||
}
|
||||
case 11:
|
||||
num = ((PurchaseState != null) ? (-1459965164) : (-1459965159));
|
||||
break;
|
||||
case 8:
|
||||
num = ((_202E_202E_202D_202D_202D_202D_206B_202B_200E_206D_206E_206C_206B_202C_200C_200D_206C_200E_200C_202E_200B_202D_206B_202C_200E_202E_202C_200C_200E_202A_206C_200C_206F_200D_200E_206D_202A_202E_206C_202E() < _purchaseDeadlineMs) ? (-1459965153) : (-1459965166));
|
||||
break;
|
||||
case 7:
|
||||
{
|
||||
IPluginLog pluginLog = _pluginLog;
|
||||
DefaultInterpolatedStringHandler defaultInterpolatedStringHandler = new DefaultInterpolatedStringHandler(51, 2);
|
||||
defaultInterpolatedStringHandler.AppendLiteral(global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(785267404));
|
||||
defaultInterpolatedStringHandler.AppendFormatted(ItemForSale.ItemName);
|
||||
defaultInterpolatedStringHandler.AppendLiteral(global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(-1250823657));
|
||||
defaultInterpolatedStringHandler.AppendFormatted(3000);
|
||||
defaultInterpolatedStringHandler.AppendLiteral(global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(1905813856));
|
||||
_206B_200E_206A_206A_202E_202E_202E_200F_206C_202B_206E_200C_202C_200F_202E_200E_206E_202E_202C_202C_206E_206B_206E_206C_200E_206F_202C_202B_202B_206E_202C_202C_202C_200F_202C_200C_206B_206D_200F_202B_202E(pluginLog, defaultInterpolatedStringHandler.ToStringAndClear(), Array.Empty<object>());
|
||||
CompletePurchase(ItemForSale.ItemId, success: false);
|
||||
num = -1459965153;
|
||||
break;
|
||||
}
|
||||
case 12:
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (PurchaseState.IsComplete)
|
||||
{
|
||||
_pluginLog.Information($"Stopping item purchase (desired = {PurchaseState.DesiredItems}, owned = {PurchaseState.OwnedItems})");
|
||||
CompletePurchase(ItemForSale.ItemId, success: true);
|
||||
return;
|
||||
}
|
||||
int maxHoldableQuantity = InventoryHelper.GetMaxHoldableQuantity(ItemForSale.ItemId, _itemSheet);
|
||||
int num = Math.Min(99, maxHoldableQuantity);
|
||||
AtkUnitBase* addonPtr;
|
||||
if (num == 0)
|
||||
{
|
||||
_pluginLog.Warning("No inventory space for " + ItemForSale.ItemName);
|
||||
CompletePurchase(ItemForSale.ItemId, success: false);
|
||||
}
|
||||
else if (Environment.TickCount64 >= PurchaseState.NextStepMs && _gameGui.TryGetAddonByName<AtkUnitBase>(_addonName, out addonPtr))
|
||||
{
|
||||
int num2 = Math.Min(PurchaseState.ItemsLeftToBuy, num);
|
||||
_pluginLog.Information($"Buying {num2}x {ItemForSale.ItemName}");
|
||||
_parentWindow.TriggerPurchase(addonPtr, num2);
|
||||
PurchaseState.NextStepMs = long.MaxValue;
|
||||
_purchaseDeadlineMs = Environment.TickCount64 + 3000;
|
||||
PurchaseState.IsAwaitingYesNo = true;
|
||||
}
|
||||
else if (PurchaseState.NextStepMs == long.MaxValue && Environment.TickCount64 >= _purchaseDeadlineMs)
|
||||
{
|
||||
_pluginLog.Warning($"Purchase of {ItemForSale.ItemName} did not progress within {3000}ms, cancelling");
|
||||
CompletePurchase(ItemForSale.ItemId, success: false);
|
||||
}
|
||||
}
|
||||
|
||||
private void CompletePurchase(uint itemId, bool success)
|
||||
{
|
||||
int num = ((!success) ? (-1114779348) : (-1114779346));
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1114779347;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
int num7;
|
||||
int quantityPurchased;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 2:
|
||||
num7 = PurchaseState.OwnedItems - PurchaseState.InitialOwnedItems;
|
||||
goto IL_005e;
|
||||
case 3:
|
||||
num = ((PurchaseState != null) ? (-1114779345) : (-1114779348));
|
||||
break;
|
||||
case 0:
|
||||
num = -1114779346;
|
||||
break;
|
||||
case 1:
|
||||
{
|
||||
num7 = 0;
|
||||
goto IL_005e;
|
||||
}
|
||||
IL_005e:
|
||||
quantityPurchased = num7;
|
||||
PurchaseState = null;
|
||||
_parentWindow.RestoreExternalPluginState();
|
||||
this.PurchaseCompleted?.Invoke(this, new PurchaseCompletedEventArgs(itemId, success, quantityPurchased));
|
||||
return;
|
||||
}
|
||||
}
|
||||
int quantityPurchased = ((success && PurchaseState != null) ? (PurchaseState.OwnedItems - PurchaseState.InitialOwnedItems) : 0);
|
||||
PurchaseState = null;
|
||||
_parentWindow.RestoreExternalPluginState();
|
||||
this.PurchaseCompleted?.Invoke(this, new PurchaseCompletedEventArgs(itemId, success, quantityPurchased));
|
||||
}
|
||||
|
||||
protected virtual void Dispose(bool disposing)
|
||||
{
|
||||
int num = ((!disposing) ? 1043096164 : 1043096167);
|
||||
while (true)
|
||||
if (disposing)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1043096165;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
num = 1043096167;
|
||||
break;
|
||||
case 2:
|
||||
_200E_202B_202D_200C_206B_200F_202E_202D_206D_206F_202C_202E_206A_202A_206D_200E_202D_200D_202B_206A_206F_202C_206D_206E_200B_200E_206B_200F_200F_202C_206A_200E_206A_200F_206B_200B_202B_202C_200F_200F_202E(_addonLifecycle, AddonEvent.PostSetup, _addonName, (IAddonLifecycle.AddonEventDelegate)ShopPostSetup);
|
||||
_200E_202B_202D_200C_206B_200F_202E_202D_206D_206F_202C_202E_206A_202A_206D_200E_202D_200D_202B_206A_206F_202C_206D_206E_200B_200E_206B_200F_200F_202C_206A_200E_206A_200F_206B_200B_202B_202C_200F_200F_202E(_addonLifecycle, AddonEvent.PreFinalize, _addonName, (IAddonLifecycle.AddonEventDelegate)ShopPreFinalize);
|
||||
_200E_202B_202D_200C_206B_200F_202E_202D_206D_206F_202C_202E_206A_202A_206D_200E_202D_200D_202B_206A_206F_202C_206D_206E_200B_200E_206B_200F_200F_202C_206A_200E_206A_200F_206B_200B_202B_202C_200F_200F_202E(_addonLifecycle, AddonEvent.PostUpdate, _addonName, (IAddonLifecycle.AddonEventDelegate)ShopPostUpdate);
|
||||
num = 1043096164;
|
||||
break;
|
||||
case 1:
|
||||
return;
|
||||
}
|
||||
_addonLifecycle.UnregisterListener(AddonEvent.PostSetup, _addonName, ShopPostSetup);
|
||||
_addonLifecycle.UnregisterListener(AddonEvent.PreFinalize, _addonName, ShopPreFinalize);
|
||||
_addonLifecycle.UnregisterListener(AddonEvent.PostUpdate, _addonName, ShopPostUpdate);
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose(disposing: true);
|
||||
_200B_202C_202A_200E_200F_202E_202C_206C_206F_206B_206F_206C_206E_200B_200C_200F_202B_206D_206B_206E_202D_202E_200E_200E_206D_202E_200C_200B_202B_202D_200D_202A_206B_202C_200F_206B_202A_206C_206E_200F_202E((object)this);
|
||||
}
|
||||
|
||||
void IDisposable.Dispose()
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in Dispose
|
||||
this.Dispose();
|
||||
}
|
||||
|
||||
static void _206B_206A_202C_200C_206E_200C_202C_206A_200D_202A_202D_206D_200E_200B_206E_206F_200B_206A_206F_202D_200F_202A_202C_200E_202C_202B_206A_202C_200F_202D_206D_202D_202A_206C_202C_206C_206B_200B_200D_200F_202E(object P_0, string P_1)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(P_0, P_1);
|
||||
}
|
||||
|
||||
static void _200F_206D_202A_206D_200C_206A_202D_200D_206E_200F_206E_206D_206F_202B_202C_202A_200E_202D_206C_202B_200E_202D_206F_206C_202B_202B_206F_206F_206D_202C_202B_202E_200D_202A_206D_206A_206C_200C_206F_200F_202E(string P_0, string P_1)
|
||||
{
|
||||
ArgumentException.ThrowIfNullOrEmpty(P_0, P_1);
|
||||
}
|
||||
|
||||
static void _202B_200B_206D_200B_206F_200C_200C_206E_200B_206E_206D_206B_206E_202A_200B_206F_202B_206F_206F_206E_200D_200F_206D_200E_202C_200D_206E_200C_200D_202A_202C_200B_202A_202E_202D_202E_202A_206B_206F_200C_202E(IAddonLifecycle P_0, AddonEvent P_1, string P_2, IAddonLifecycle.AddonEventDelegate P_3)
|
||||
{
|
||||
P_0.RegisterListener(P_1, P_2, P_3);
|
||||
}
|
||||
|
||||
static Delegate _202E_202D_202E_200D_200B_206C_202C_200F_206C_200C_206B_202A_200B_202A_200D_206B_202B_206B_200F_200C_206C_206C_206B_202B_202C_200D_206B_202A_200E_206D_206B_200E_200E_206E_202D_206D_200F_206E_202C_206E_202E(Delegate P_0, Delegate P_1)
|
||||
{
|
||||
return Delegate.Combine(P_0, P_1);
|
||||
}
|
||||
|
||||
static Delegate _200B_206D_202C_206D_206C_200D_202B_200D_202A_202E_200E_200C_200E_206D_202B_206E_200F_206E_200E_200B_202C_206E_202C_206A_206B_206F_206B_200B_206D_202D_202C_202C_206D_202B_202D_206B_200D_200C_200C_202C_202E(Delegate P_0, Delegate P_1)
|
||||
{
|
||||
return Delegate.Remove(P_0, P_1);
|
||||
}
|
||||
|
||||
static AtkUnitBasePtr _206F_200C_202D_200F_200F_206B_206F_200D_202B_206C_202E_206C_206F_200D_206F_206B_200C_200B_202E_200D_200B_200C_206B_200F_200B_202E_202C_202C_206A_200C_206D_200D_206D_200B_200E_202C_206D_200B_200C_202A_202E(AddonArgs P_0)
|
||||
{
|
||||
return P_0.Addon;
|
||||
}
|
||||
|
||||
static long _202E_202E_202D_202D_202D_202D_206B_202B_200E_206D_206E_206C_206B_202C_200C_200D_206C_200E_200C_202E_200B_202D_206B_202C_200E_202E_202C_200C_200E_202A_206C_200C_206F_200D_200E_206D_202A_202E_206C_202E()
|
||||
{
|
||||
return Environment.TickCount64;
|
||||
}
|
||||
|
||||
static int _200E_202C_200C_202A_206C_202C_206E_206F_206D_202C_202C_200C_200B_200E_206D_206E_202D_206A_202D_202D_202D_202A_202B_200C_206E_206E_206D_206A_206D_206C_200E_206A_202B_206C_200D_200C_206F_206D_200C_202D_202E(int P_0, int P_1)
|
||||
{
|
||||
return Math.Min(P_0, P_1);
|
||||
}
|
||||
|
||||
static InvalidOperationException _200D_200C_202A_202D_202C_206D_206F_202E_202A_206E_202B_200E_200C_200F_200C_206B_200E_202E_206E_202E_202B_206C_200E_200D_200C_206B_200D_200F_202D_206D_202E_206A_206B_200D_200E_200E_200F_202D_202A_202A_202E(string P_0)
|
||||
{
|
||||
return new InvalidOperationException(P_0);
|
||||
}
|
||||
|
||||
static void _202C_202E_200D_202B_202D_200B_200B_206E_202C_200D_202B_206E_206E_206B_202D_206B_202E_200D_202C_202D_206C_206E_202C_200C_206E_202B_202E_202A_202D_206F_200B_200D_206C_206C_200F_200B_206D_202D_202D_200E_202E(IPluginLog P_0, string P_1, object[] P_2)
|
||||
{
|
||||
P_0.Information(P_1, P_2);
|
||||
}
|
||||
|
||||
static string _200E_206A_206B_200B_206E_200D_202B_200B_202C_200C_206A_202E_206F_202C_206E_200D_200B_200F_202D_202B_206A_202E_200D_206F_200B_206E_200F_202E_206D_200C_206C_200B_206F_202C_206E_200D_200C_202E_206D_202B_202E(string P_0, string P_1)
|
||||
{
|
||||
return P_0 + P_1;
|
||||
}
|
||||
|
||||
static void _206B_200E_206A_206A_202E_202E_202E_200F_206C_202B_206E_200C_202C_200F_202E_200E_206E_202E_202C_202C_206E_206B_206E_206C_200E_206F_202C_202B_202B_206E_202C_202C_202C_200F_202C_200C_206B_206D_200F_202B_202E(IPluginLog P_0, string P_1, object[] P_2)
|
||||
{
|
||||
P_0.Warning(P_1, P_2);
|
||||
}
|
||||
|
||||
static void _200E_202B_202D_200C_206B_200F_202E_202D_206D_206F_202C_202E_206A_202A_206D_200E_202D_200D_202B_206A_206F_202C_206D_206E_200B_200E_206B_200F_200F_202C_206A_200E_206A_200F_206B_200B_202B_202C_200F_200F_202E(IAddonLifecycle P_0, AddonEvent P_1, string P_2, IAddonLifecycle.AddonEventDelegate P_3)
|
||||
{
|
||||
P_0.UnregisterListener(P_1, P_2, P_3);
|
||||
}
|
||||
|
||||
static void _200B_202C_202A_200E_200F_202E_202C_206C_206F_206B_206F_206C_206E_200B_200C_200F_202B_206D_206B_206E_202D_202E_200E_200E_206D_202E_200C_200B_202B_202D_200D_202A_206B_202C_200F_206B_202A_206C_206E_200F_202E(object P_0)
|
||||
{
|
||||
GC.SuppressFinalize(P_0);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
using Dalamud.Plugin.Services;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
using FFXIVClientStructs.FFXIV.Client.UI.Agent;
|
||||
|
|
@ -13,110 +10,7 @@ namespace LLib.Shop;
|
|||
|
||||
public static class SatisfactionSupplyActions
|
||||
{
|
||||
public readonly record struct NpcState(int Rank, int SatisfactionCurrent, int SatisfactionMax, int UsedDeliveries)
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder stringBuilder = _206F_200F_202A_202D_202C_206E_202E_202A_202A_202D_200F_202B_206E_206D_206C_202B_206E_206B_200D_200C_200D_200C_200C_200E_202B_202D_200D_202E_206D_206C_200D_202A_202D_200D_206B_202A_206F_200B_202E_200D_202E();
|
||||
_202E_206E_202A_200B_206C_202C_206A_206E_206D_202E_206D_202B_202A_206B_202E_206D_200D_206B_200E_202D_206E_202E_206F_206B_206C_200D_206B_200D_200C_202A_202B_206E_200E_206E_206B_200E_206A_200D_206B_200C_202E(stringBuilder, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(-1314736612));
|
||||
_202E_206E_202A_200B_206C_202C_206A_206E_206D_202E_206D_202B_202A_206B_202E_206D_200D_206B_200E_202D_206E_202E_206F_206B_206C_200D_206B_200D_200C_202A_202B_206E_200E_206E_206B_200E_206A_200D_206B_200C_202E(stringBuilder, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(1581517409));
|
||||
int num = ((!PrintMembers(stringBuilder)) ? 745418664 : 745418667);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 745418666;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 2:
|
||||
_200E_206F_202E_202A_202C_200C_200F_202D_206C_202D_200E_202A_202D_202B_200F_200C_202C_206A_200B_200B_202E_206D_206D_200E_200F_206A_202D_206A_200D_200F_200C_206D_206D_206B_200E_202E_200E_202A_202A_206F_202E(stringBuilder, '}');
|
||||
return _200C_200F_200B_200C_200C_202C_200E_200E_200C_202D_202C_200F_206F_200C_206C_206D_200F_206C_206E_200B_202E_200F_202C_206B_206D_206A_200D_202C_206B_206D_200E_200F_202B_206E_200E_202E_200C_202A_202B_206F_202E((object)stringBuilder);
|
||||
case 1:
|
||||
_200E_206F_202E_202A_202C_200C_200F_202D_206C_202D_200E_202A_202D_202B_200F_200C_202C_206A_200B_200B_202E_206D_206D_200E_200F_206A_202D_206A_200D_200F_200C_206D_206D_206B_200E_202E_200E_202A_202A_206F_202E(stringBuilder, ' ');
|
||||
num = 745418664;
|
||||
break;
|
||||
case 0:
|
||||
num = 745418667;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
[CompilerGenerated]
|
||||
private bool PrintMembers(StringBuilder builder)
|
||||
{
|
||||
_202E_206E_202A_200B_206C_202C_206A_206E_206D_202E_206D_202B_202A_206B_202E_206D_200D_206B_200E_202D_206E_202E_206F_206B_206C_200D_206B_200D_200C_202A_202B_206E_200E_206E_206B_200E_206A_200D_206B_200C_202E(builder, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(2105858442));
|
||||
_202E_206E_202A_200B_206C_202C_206A_206E_206D_202E_206D_202B_202A_206B_202E_206D_200D_206B_200E_202D_206E_202E_206F_206B_206C_200D_206B_200D_200C_202A_202B_206E_200E_206E_206B_200E_206A_200D_206B_200C_202E(builder, Rank.ToString());
|
||||
_202E_206E_202A_200B_206C_202C_206A_206E_206D_202E_206D_202B_202A_206B_202E_206D_200D_206B_200E_202D_206E_202E_206F_206B_206C_200D_206B_200D_200C_202A_202B_206E_200E_206E_206B_200E_206A_200D_206B_200C_202E(builder, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(2014742517));
|
||||
_202E_206E_202A_200B_206C_202C_206A_206E_206D_202E_206D_202B_202A_206B_202E_206D_200D_206B_200E_202D_206E_202E_206F_206B_206C_200D_206B_200D_200C_202A_202B_206E_200E_206E_206B_200E_206A_200D_206B_200C_202E(builder, SatisfactionCurrent.ToString());
|
||||
_202E_206E_202A_200B_206C_202C_206A_206E_206D_202E_206D_202B_202A_206B_202E_206D_200D_206B_200E_202D_206E_202E_206F_206B_206C_200D_206B_200D_200C_202A_202B_206E_200E_206E_206B_200E_206A_200D_206B_200C_202E(builder, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(1923626592));
|
||||
_202E_206E_202A_200B_206C_202C_206A_206E_206D_202E_206D_202B_202A_206B_202E_206D_200D_206B_200E_202D_206E_202E_206F_206B_206C_200D_206B_200D_200C_202A_202B_206E_200E_206E_206B_200E_206A_200D_206B_200C_202E(builder, SatisfactionMax.ToString());
|
||||
_202E_206E_202A_200B_206C_202C_206A_206E_206D_202E_206D_202B_202A_206B_202E_206D_200D_206B_200E_202D_206E_202E_206F_206B_206C_200D_206B_200D_200C_202A_202B_206E_200E_206E_206B_200E_206A_200D_206B_200C_202E(builder, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(564142829));
|
||||
_202E_206E_202A_200B_206C_202C_206A_206E_206D_202E_206D_202B_202A_206B_202E_206D_200D_206B_200E_202D_206E_202E_206F_206B_206C_200D_206B_200D_200C_202A_202B_206E_200E_206E_206B_200E_206A_200D_206B_200C_202E(builder, UsedDeliveries.ToString());
|
||||
return true;
|
||||
}
|
||||
|
||||
[CompilerGenerated]
|
||||
public bool Equals(NpcState other)
|
||||
{
|
||||
int num = ((!EqualityComparer<int>.Default.Equals(Rank, other.Rank)) ? 1376880194 : 1376880192);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1376880193;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
return EqualityComparer<int>.Default.Equals(UsedDeliveries, other.UsedDeliveries);
|
||||
case 3:
|
||||
return false;
|
||||
case 4:
|
||||
num = ((!EqualityComparer<int>.Default.Equals(SatisfactionMax, other.SatisfactionMax)) ? 1376880194 : 1376880193);
|
||||
break;
|
||||
case 2:
|
||||
num = 1376880192;
|
||||
break;
|
||||
case 1:
|
||||
num = ((!EqualityComparer<int>.Default.Equals(SatisfactionCurrent, other.SatisfactionCurrent)) ? 1376880194 : 1376880197);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool IEquatable<NpcState>.Equals(NpcState other)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in Equals
|
||||
return this.Equals(other);
|
||||
}
|
||||
|
||||
static StringBuilder _206F_200F_202A_202D_202C_206E_202E_202A_202A_202D_200F_202B_206E_206D_206C_202B_206E_206B_200D_200C_200D_200C_200C_200E_202B_202D_200D_202E_206D_206C_200D_202A_202D_200D_206B_202A_206F_200B_202E_200D_202E()
|
||||
{
|
||||
return new StringBuilder();
|
||||
}
|
||||
|
||||
static StringBuilder _202E_206E_202A_200B_206C_202C_206A_206E_206D_202E_206D_202B_202A_206B_202E_206D_200D_206B_200E_202D_206E_202E_206F_206B_206C_200D_206B_200D_200C_202A_202B_206E_200E_206E_206B_200E_206A_200D_206B_200C_202E(StringBuilder P_0, string P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static StringBuilder _200E_206F_202E_202A_202C_200C_200F_202D_206C_202D_200E_202A_202D_202B_200F_200C_202C_206A_200B_200B_202E_206D_206D_200E_200F_206A_202D_206A_200D_200F_200C_206D_206D_206B_200E_202E_200E_202A_202A_206F_202E(StringBuilder P_0, char P_1)
|
||||
{
|
||||
return P_0.Append(P_1);
|
||||
}
|
||||
|
||||
static string _200C_200F_200B_200C_200C_202C_200E_200E_200C_202D_202C_200F_206F_200C_206C_206D_200F_206C_206E_200B_202E_200F_202C_206B_206D_206A_200D_202C_206B_206D_200E_200F_202B_206E_200E_202E_200C_202A_202B_206F_202E(object P_0)
|
||||
{
|
||||
return P_0.ToString();
|
||||
}
|
||||
}
|
||||
public readonly record struct NpcState(int Rank, int SatisfactionCurrent, int SatisfactionMax, int UsedDeliveries);
|
||||
|
||||
private const string SatisfactionSupplyAddon = "SatisfactionSupply";
|
||||
|
||||
|
|
@ -124,457 +18,199 @@ public static class SatisfactionSupplyActions
|
|||
|
||||
private const string TalkAddon = "Talk";
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool IsSatisfactionSupplyReady(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(-799124681), out addonPtr) ? 288080028 : 288080031);
|
||||
while (true)
|
||||
if (!gameGui.TryGetAddonByName<AtkUnitBase>("SatisfactionSupply", out var addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 288080030;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0054;
|
||||
case 2:
|
||||
return LAddon.IsAddonReady(addonPtr);
|
||||
case 1:
|
||||
return false;
|
||||
}
|
||||
continue;
|
||||
IL_0054:
|
||||
num = 288080031;
|
||||
return false;
|
||||
}
|
||||
return LAddon.IsAddonReady(addonPtr);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool IsSatisfactionSupplyFullyReady(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(1887910937), out addonPtr) ? (-536091870) : (-536091865));
|
||||
AgentSatisfactionSupply* ptr = default(AgentSatisfactionSupply*);
|
||||
while (true)
|
||||
if (!gameGui.TryGetAddonByName<AtkUnitBase>("SatisfactionSupply", out var addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -536091868;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 1:
|
||||
ptr = AgentSatisfactionSupply.Instance();
|
||||
num = ((ptr == null) ? (-536091871) : (-536091872));
|
||||
break;
|
||||
case 2:
|
||||
return ptr->NpcInfo.Initialized;
|
||||
case 6:
|
||||
num = (LAddon.IsAddonReady(addonPtr) ? (-536091867) : (-536091869));
|
||||
break;
|
||||
case 7:
|
||||
return false;
|
||||
case 8:
|
||||
num = ((!ptr->NpcInfo.Valid) ? (-536091871) : (-536091866));
|
||||
break;
|
||||
case 0:
|
||||
num = -536091865;
|
||||
break;
|
||||
case 4:
|
||||
num = ((!ptr->IsAgentActive()) ? (-536091871) : (-536091860));
|
||||
break;
|
||||
case 5:
|
||||
return false;
|
||||
case 3:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (!LAddon.IsAddonReady(addonPtr))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
AgentSatisfactionSupply* ptr = AgentSatisfactionSupply.Instance();
|
||||
if (ptr != null && ptr->IsAgentActive() && ptr->NpcInfo.Valid)
|
||||
{
|
||||
return ptr->NpcInfo.Initialized;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public unsafe static bool TrySelectDeliverySlot(IGameGui gameGui, int slot)
|
||||
{
|
||||
int num = (IsSatisfactionSupplyFullyReady(gameGui) ? 1316647877 : 1316647878);
|
||||
while (true)
|
||||
if (!IsSatisfactionSupplyFullyReady(gameGui))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1316647876;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
AgentSatisfactionSupply* ptr = AgentSatisfactionSupply.Instance();
|
||||
AtkValue atkValue = new AtkValue();
|
||||
Span<AtkValue> span = stackalloc AtkValue[2];
|
||||
span[0].SetInt(1);
|
||||
span[1].SetInt(slot);
|
||||
ptr->ReceiveEvent(&atkValue, span.GetPointer(0), 2u, 0uL);
|
||||
return true;
|
||||
}
|
||||
case 2:
|
||||
return false;
|
||||
case 0:
|
||||
goto IL_009f;
|
||||
}
|
||||
continue;
|
||||
IL_009f:
|
||||
num = 1316647878;
|
||||
return false;
|
||||
}
|
||||
AgentSatisfactionSupply* ptr = AgentSatisfactionSupply.Instance();
|
||||
AtkValue atkValue = new AtkValue();
|
||||
Span<AtkValue> span = stackalloc AtkValue[2];
|
||||
span[0].SetInt(1);
|
||||
span[1].SetInt(slot);
|
||||
ptr->ReceiveEvent(&atkValue, span.GetPointer(0), 2u, 0uL);
|
||||
return true;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TryCloseSatisfactionSupply(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(-304354033), out addonPtr) ? (-1559808430) : (-1559808431));
|
||||
while (true)
|
||||
if (!gameGui.TryGetAddonByName<AtkUnitBase>("SatisfactionSupply", out var addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1559808429;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0052;
|
||||
case 1:
|
||||
addonPtr->FireCallbackInt(0);
|
||||
return true;
|
||||
case 2:
|
||||
return false;
|
||||
}
|
||||
continue;
|
||||
IL_0052:
|
||||
num = -1559808431;
|
||||
return false;
|
||||
}
|
||||
addonPtr->FireCallbackInt(0);
|
||||
return true;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool IsTalkInProgress(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(-5198087), out addonPtr) ? 208572511 : 208572508);
|
||||
while (true)
|
||||
if (!gameGui.TryGetAddonByName<AtkUnitBase>("Talk", out var addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 208572510;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 3:
|
||||
num = 208572508;
|
||||
break;
|
||||
case 0:
|
||||
return LAddon.IsAddonReady(addonPtr);
|
||||
case 2:
|
||||
return false;
|
||||
case 4:
|
||||
return false;
|
||||
case 1:
|
||||
num = ((!addonPtr->IsVisible) ? 208572506 : 208572510);
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (addonPtr->IsVisible)
|
||||
{
|
||||
return LAddon.IsAddonReady(addonPtr);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TryProgressTalk(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(1257507185), out addonPtr) ? 1712398322 : 1712398327);
|
||||
while (true)
|
||||
if (!gameGui.TryGetAddonByName<AtkUnitBase>("Talk", out var addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1712398326;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 2:
|
||||
return false;
|
||||
case 1:
|
||||
return false;
|
||||
case 3:
|
||||
num = 1712398327;
|
||||
break;
|
||||
case 0:
|
||||
num = (LAddon.IsAddonReady(addonPtr) ? 1712398323 : 1712398324);
|
||||
break;
|
||||
case 5:
|
||||
addonPtr->FireCallbackInt(0);
|
||||
return true;
|
||||
case 4:
|
||||
num = ((!addonPtr->IsVisible) ? 1712398324 : 1712398326);
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (!addonPtr->IsVisible || !LAddon.IsAddonReady(addonPtr))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
addonPtr->FireCallbackInt(0);
|
||||
return true;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool IsSatisfactionSupplyResultVisible(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(-1902425193), out addonPtr) ? 744661943 : 744661940);
|
||||
while (true)
|
||||
if (!gameGui.TryGetAddonByName<AtkUnitBase>("SatisfactionSupplyResult", out var addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 744661941;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 2:
|
||||
return LAddon.IsAddonReady(addonPtr);
|
||||
case 1:
|
||||
return false;
|
||||
case 0:
|
||||
goto IL_005b;
|
||||
}
|
||||
continue;
|
||||
IL_005b:
|
||||
num = 744661940;
|
||||
return false;
|
||||
}
|
||||
return LAddon.IsAddonReady(addonPtr);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TryCloseSatisfactionSupplyResult(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-2097771631), out addonPtr) ? (-1858872072) : (-1858872069));
|
||||
while (true)
|
||||
if (!gameGui.TryGetAddonByName<AtkUnitBase>("SatisfactionSupplyResult", out var addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1858872071;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0054;
|
||||
case 2:
|
||||
return false;
|
||||
case 1:
|
||||
addonPtr->Close(fireCallback: true);
|
||||
return true;
|
||||
}
|
||||
continue;
|
||||
IL_0054:
|
||||
num = -1858872069;
|
||||
return false;
|
||||
}
|
||||
addonPtr->Close(fireCallback: true);
|
||||
return true;
|
||||
}
|
||||
|
||||
public unsafe static bool IsNpcTradeReady()
|
||||
{
|
||||
AgentNpcTrade* ptr = AgentNpcTrade.Instance();
|
||||
int num = ((ptr == null) ? 553633651 : 553633650);
|
||||
while (true)
|
||||
if (ptr != null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 553633651;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 2:
|
||||
goto IL_004b;
|
||||
case 1:
|
||||
return ptr->IsAgentActive();
|
||||
case 0:
|
||||
return false;
|
||||
}
|
||||
continue;
|
||||
IL_004b:
|
||||
num = 553633650;
|
||||
return ptr->IsAgentActive();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public unsafe static (bool Exists, bool Active, int SelectedSlot) GetNpcTradeState()
|
||||
{
|
||||
AgentNpcTrade* ptr = AgentNpcTrade.Instance();
|
||||
int num = ((ptr != null) ? 1702648938 : 1702648937);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1702648939;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0049;
|
||||
case 2:
|
||||
return (Exists: false, Active: false, SelectedSlot: -99);
|
||||
case 1:
|
||||
return (Exists: true, Active: ptr->IsAgentActive(), SelectedSlot: ptr->SelectedTurnInSlot);
|
||||
}
|
||||
continue;
|
||||
IL_0049:
|
||||
num = 1702648937;
|
||||
return (Exists: false, Active: false, SelectedSlot: -99);
|
||||
}
|
||||
return (Exists: true, Active: ptr->IsAgentActive(), SelectedSlot: ptr->SelectedTurnInSlot);
|
||||
}
|
||||
|
||||
public unsafe static bool TryConfirmTrade()
|
||||
{
|
||||
AgentNpcTrade* ptr = AgentNpcTrade.Instance();
|
||||
int num = ((ptr == null) ? (-859221764) : (-859221774));
|
||||
AtkValue atkValue = default(AtkValue);
|
||||
Span<AtkValue> span = default(Span<AtkValue>);
|
||||
while (true)
|
||||
if (ptr == null || !ptr->IsAgentActive())
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -859221772;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
return false;
|
||||
}
|
||||
AtkValue atkValue = new AtkValue();
|
||||
Span<AtkValue> span = stackalloc AtkValue[4];
|
||||
if (ptr->SelectedTurnInSlot < 0)
|
||||
{
|
||||
span[0].SetInt(2);
|
||||
span[1].SetInt(0);
|
||||
span[2].SetInt(0);
|
||||
span[3].SetInt(0);
|
||||
ptr->ReceiveEvent(&atkValue, span.GetPointer(0), 4u, 0uL);
|
||||
if (ptr->SelectedTurnInSlot != 0 || ptr->SelectedTurnInSlotItemOptions <= 0)
|
||||
{
|
||||
case 2:
|
||||
return false;
|
||||
case 0:
|
||||
atkValue = new AtkValue();
|
||||
span = stackalloc AtkValue[4];
|
||||
num = ((ptr->SelectedTurnInSlot >= 0) ? (-859221771) : (-859221776));
|
||||
break;
|
||||
case 6:
|
||||
num = (ptr->IsAgentActive() ? (-859221772) : (-859221764));
|
||||
break;
|
||||
case 8:
|
||||
return false;
|
||||
case 7:
|
||||
return false;
|
||||
case 5:
|
||||
span[0].SetInt(0);
|
||||
span[1].SetInt(0);
|
||||
span[2].SetInt(0);
|
||||
span[3].SetInt(0);
|
||||
ptr->ReceiveEvent(&atkValue, span.GetPointer(0), 4u, 1uL);
|
||||
ptr->ReceiveEvent(&atkValue, span.GetPointer(0), 4u, 0uL);
|
||||
return true;
|
||||
case 1:
|
||||
num = ((ptr->SelectedTurnInSlot == 0) ? (-859221775) : (-859221770));
|
||||
break;
|
||||
case 9:
|
||||
num = -859221774;
|
||||
break;
|
||||
case 3:
|
||||
num = ((ptr->SelectedTurnInSlotItemOptions > 0) ? (-859221775) : (-859221773));
|
||||
break;
|
||||
case 4:
|
||||
span[0].SetInt(2);
|
||||
span[1].SetInt(0);
|
||||
span[2].SetInt(0);
|
||||
span[3].SetInt(0);
|
||||
ptr->ReceiveEvent(&atkValue, span.GetPointer(0), 4u, 0uL);
|
||||
num = ((ptr->SelectedTurnInSlot != 0) ? (-859221773) : (-859221769));
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (ptr->SelectedTurnInSlot != 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
span[0].SetInt(0);
|
||||
span[1].SetInt(0);
|
||||
span[2].SetInt(0);
|
||||
span[3].SetInt(0);
|
||||
ptr->ReceiveEvent(&atkValue, span.GetPointer(0), 4u, 1uL);
|
||||
ptr->ReceiveEvent(&atkValue, span.GetPointer(0), 4u, 0uL);
|
||||
return true;
|
||||
}
|
||||
|
||||
public unsafe static int GetRemainingAllowances()
|
||||
{
|
||||
SatisfactionSupplyManager* ptr = SatisfactionSupplyManager.Instance();
|
||||
int num = ((ptr != null) ? (-1768883873) : (-1768883876));
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1768883874;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0049;
|
||||
case 2:
|
||||
return 0;
|
||||
case 1:
|
||||
return ptr->GetRemainingAllowances();
|
||||
}
|
||||
continue;
|
||||
IL_0049:
|
||||
num = -1768883876;
|
||||
return 0;
|
||||
}
|
||||
return ptr->GetRemainingAllowances();
|
||||
}
|
||||
|
||||
public unsafe static NpcState GetNpcState(int npcIndex)
|
||||
{
|
||||
SatisfactionSupplyManager* ptr = SatisfactionSupplyManager.Instance();
|
||||
int num = ((ptr != null) ? (-1038874379) : (-1038874380));
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1038874384;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
num = -1038874380;
|
||||
break;
|
||||
case 2:
|
||||
return new NpcState(ptr->SatisfactionRanks[npcIndex], ptr->Satisfaction[npcIndex], 0, ptr->UsedAllowances[npcIndex]);
|
||||
case 1:
|
||||
return default(NpcState);
|
||||
case 3:
|
||||
num = ((npcIndex < ptr->SatisfactionRanks.Length) ? (-1038874382) : (-1038874383));
|
||||
break;
|
||||
case 5:
|
||||
num = ((npcIndex < 0) ? (-1038874383) : (-1038874381));
|
||||
break;
|
||||
case 4:
|
||||
return default(NpcState);
|
||||
}
|
||||
return default(NpcState);
|
||||
}
|
||||
if (npcIndex < 0 || npcIndex >= ptr->SatisfactionRanks.Length)
|
||||
{
|
||||
return default(NpcState);
|
||||
}
|
||||
return new NpcState(ptr->SatisfactionRanks[npcIndex], ptr->Satisfaction[npcIndex], 0, ptr->UsedAllowances[npcIndex]);
|
||||
}
|
||||
|
||||
public unsafe static uint GetSupplySeed()
|
||||
{
|
||||
SatisfactionSupplyManager* ptr = SatisfactionSupplyManager.Instance();
|
||||
int num = ((ptr != null) ? (-919360628) : (-919360625));
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -919360626;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
goto IL_004b;
|
||||
case 1:
|
||||
return 0u;
|
||||
case 2:
|
||||
return ptr->SupplySeed;
|
||||
}
|
||||
continue;
|
||||
IL_004b:
|
||||
num = -919360625;
|
||||
return 0u;
|
||||
}
|
||||
return ptr->SupplySeed;
|
||||
}
|
||||
|
||||
public unsafe static byte GetBonusGuaranteeRowId()
|
||||
{
|
||||
SatisfactionSupplyManager* ptr = SatisfactionSupplyManager.Instance();
|
||||
int num = ((ptr != null) ? (-1374760124) : (-1374760121));
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1374760123;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 1:
|
||||
return ptr->BonusGuaranteeRowId;
|
||||
case 2:
|
||||
return byte.MaxValue;
|
||||
case 0:
|
||||
goto IL_0058;
|
||||
}
|
||||
continue;
|
||||
IL_0058:
|
||||
num = -1374760121;
|
||||
return byte.MaxValue;
|
||||
}
|
||||
return ptr->BonusGuaranteeRowId;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using Dalamud.Plugin.Services;
|
||||
using FFXIVClientStructs.FFXIV.Component.GUI;
|
||||
using LLib.GameUI;
|
||||
|
|
@ -15,288 +14,131 @@ public static class VendorPurchaseActions
|
|||
|
||||
private const string SelectYesnoAddon = "SelectYesno";
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool IsDialogReady(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = ((!gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-1862554063), out addonPtr)) ? 148759857 : 148759862);
|
||||
AtkUnitBase* addonPtr2 = default(AtkUnitBase*);
|
||||
while (true)
|
||||
if (gameGui.TryGetAddonByName<AtkUnitBase>("SelectIconString", out var addonPtr) && LAddon.IsAddonReady(addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 148759859;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 3:
|
||||
return true;
|
||||
case 5:
|
||||
num = ((!LAddon.IsAddonReady(addonPtr)) ? 148759857 : 148759858);
|
||||
break;
|
||||
case 0:
|
||||
return false;
|
||||
case 2:
|
||||
num = ((!gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(-1204054181), out addonPtr2)) ? 148759859 : 148759863);
|
||||
break;
|
||||
case 6:
|
||||
num = 148759862;
|
||||
break;
|
||||
case 1:
|
||||
return true;
|
||||
case 4:
|
||||
num = ((!LAddon.IsAddonReady(addonPtr2)) ? 148759859 : 148759856);
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if (gameGui.TryGetAddonByName<AtkUnitBase>("SelectString", out var addonPtr2) && LAddon.IsAddonReady(addonPtr2))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TrySelectDialogOption(IGameGui gameGui, int index)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = ((!gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-1862554063), out addonPtr)) ? (-479532860) : (-479532861));
|
||||
AtkUnitBase* addonPtr2 = default(AtkUnitBase*);
|
||||
while (true)
|
||||
if (gameGui.TryGetAddonByName<AtkUnitBase>("SelectIconString", out var addonPtr) && LAddon.IsAddonReady(addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -479532858;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 3:
|
||||
num = -479532861;
|
||||
break;
|
||||
case 2:
|
||||
num = ((!gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(-100229517), out addonPtr2)) ? (-479532857) : (-479532862));
|
||||
break;
|
||||
case 5:
|
||||
num = ((!LAddon.IsAddonReady(addonPtr)) ? (-479532860) : (-479532858));
|
||||
break;
|
||||
case 4:
|
||||
num = ((!LAddon.IsAddonReady(addonPtr2)) ? (-479532857) : (-479532864));
|
||||
break;
|
||||
case 6:
|
||||
AddonCallback.Fire(addonPtr2, index);
|
||||
return true;
|
||||
case 0:
|
||||
AddonCallback.Fire(addonPtr, index);
|
||||
return true;
|
||||
case 1:
|
||||
return false;
|
||||
}
|
||||
AddonCallback.Fire(addonPtr, index);
|
||||
return true;
|
||||
}
|
||||
if (gameGui.TryGetAddonByName<AtkUnitBase>("SelectString", out var addonPtr2) && LAddon.IsAddonReady(addonPtr2))
|
||||
{
|
||||
AddonCallback.Fire(addonPtr2, index);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool IsShopReady(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(854458650), out addonPtr) ? 1690879529 : 1690879530);
|
||||
while (true)
|
||||
if (!gameGui.TryGetAddonByName<AtkUnitBase>("Shop", out var addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1690879531;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0054;
|
||||
case 1:
|
||||
return false;
|
||||
case 2:
|
||||
return LAddon.IsAddonReady(addonPtr);
|
||||
}
|
||||
continue;
|
||||
IL_0054:
|
||||
num = 1690879530;
|
||||
return false;
|
||||
}
|
||||
return LAddon.IsAddonReady(addonPtr);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static int FindItemDisplayIndex(IGameGui gameGui, uint itemId)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(-526765299), out addonPtr) ? 2111523499 : 2111523488);
|
||||
int num6 = default(int);
|
||||
int num5 = default(int);
|
||||
uint uInt = default(uint);
|
||||
while (true)
|
||||
if (!gameGui.TryGetAddonByName<AtkUnitBase>("Shop", out var addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 2111523490;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
return -1;
|
||||
}
|
||||
if (!LAddon.IsAddonReady(addonPtr))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
if (addonPtr->AtkValues == null || addonPtr->AtkValuesCount <= 2)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
uint uInt = addonPtr->AtkValues[2].UInt;
|
||||
for (int i = 0; i < uInt; i++)
|
||||
{
|
||||
int num = 441 + i;
|
||||
if (num >= addonPtr->AtkValuesCount)
|
||||
{
|
||||
case 8:
|
||||
num = ((addonPtr->AtkValues == null) ? 2111523494 : 2111523490);
|
||||
break;
|
||||
case 7:
|
||||
{
|
||||
int num7 = num6;
|
||||
num3 = 1;
|
||||
num4 = num7;
|
||||
num6 = (num4 | num3) + (num4 & num3);
|
||||
num = 2111523502;
|
||||
break;
|
||||
return -1;
|
||||
}
|
||||
case 5:
|
||||
if (addonPtr->AtkValues[num].UInt == itemId)
|
||||
{
|
||||
num3 = num6;
|
||||
num4 = 441;
|
||||
int num8 = num4 ^ num3;
|
||||
int num9 = num4 & num3;
|
||||
num5 = num8 + (num9 + num9);
|
||||
num = ((num5 < addonPtr->AtkValuesCount) ? 2111523492 : 2111523503);
|
||||
break;
|
||||
}
|
||||
case 14:
|
||||
uInt = addonPtr->AtkValues[2].UInt;
|
||||
num6 = 0;
|
||||
num = 2111523502;
|
||||
break;
|
||||
case 12:
|
||||
num = ((num6 < uInt) ? 2111523495 : 2111523491);
|
||||
break;
|
||||
case 2:
|
||||
return -1;
|
||||
case 10:
|
||||
return -1;
|
||||
case 9:
|
||||
num = (LAddon.IsAddonReady(addonPtr) ? 2111523498 : 2111523496);
|
||||
break;
|
||||
case 3:
|
||||
return num6;
|
||||
case 0:
|
||||
num = ((addonPtr->AtkValuesCount > 2) ? 2111523500 : 2111523494);
|
||||
break;
|
||||
case 1:
|
||||
return -1;
|
||||
case 4:
|
||||
return -1;
|
||||
case 13:
|
||||
return -1;
|
||||
case 11:
|
||||
num = 2111523488;
|
||||
break;
|
||||
case 6:
|
||||
num = ((addonPtr->AtkValues[num5].UInt != itemId) ? 2111523493 : 2111523489);
|
||||
break;
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TryBuyItem(IGameGui gameGui, int itemIndex, int quantity)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(-364498650), out addonPtr) ? (-705089016) : (-705089011));
|
||||
while (true)
|
||||
if (!gameGui.TryGetAddonByName<AtkUnitBase>("Shop", out var addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -705089012;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 4:
|
||||
num = (LAddon.IsAddonReady(addonPtr) ? (-705089009) : (-705089012));
|
||||
break;
|
||||
case 0:
|
||||
return false;
|
||||
case 2:
|
||||
num = -705089011;
|
||||
break;
|
||||
case 1:
|
||||
return false;
|
||||
case 3:
|
||||
{
|
||||
AtkValue* values = stackalloc AtkValue[4]
|
||||
{
|
||||
new AtkValue
|
||||
{
|
||||
Type = AtkValueType.Int,
|
||||
Int = 0
|
||||
},
|
||||
new AtkValue
|
||||
{
|
||||
Type = AtkValueType.Int,
|
||||
Int = itemIndex
|
||||
},
|
||||
new AtkValue
|
||||
{
|
||||
Type = AtkValueType.Int,
|
||||
Int = quantity
|
||||
},
|
||||
new AtkValue
|
||||
{
|
||||
Type = AtkValueType.Undefined,
|
||||
Int = 0
|
||||
}
|
||||
};
|
||||
addonPtr->FireCallback(4u, values);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (!LAddon.IsAddonReady(addonPtr))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
AtkValue* values = stackalloc AtkValue[4]
|
||||
{
|
||||
new AtkValue
|
||||
{
|
||||
Type = AtkValueType.Int,
|
||||
Int = 0
|
||||
},
|
||||
new AtkValue
|
||||
{
|
||||
Type = AtkValueType.Int,
|
||||
Int = itemIndex
|
||||
},
|
||||
new AtkValue
|
||||
{
|
||||
Type = AtkValueType.Int,
|
||||
Int = quantity
|
||||
},
|
||||
new AtkValue
|
||||
{
|
||||
Type = AtkValueType.Undefined,
|
||||
Int = 0
|
||||
}
|
||||
};
|
||||
addonPtr->FireCallback(4u, values);
|
||||
return true;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TryConfirmPurchase(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(-502173951), out addonPtr) ? 723548803 : 723548800);
|
||||
while (true)
|
||||
if (!gameGui.TryGetAddonByName<AtkUnitBase>("SelectYesno", out var addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 723548802;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 3:
|
||||
AddonCallback.ClickYes(addonPtr);
|
||||
return true;
|
||||
case 2:
|
||||
return false;
|
||||
case 4:
|
||||
num = 723548800;
|
||||
break;
|
||||
case 1:
|
||||
num = (LAddon.IsAddonReady(addonPtr) ? 723548801 : 723548802);
|
||||
break;
|
||||
case 0:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (!LAddon.IsAddonReady(addonPtr))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
AddonCallback.ClickYes(addonPtr);
|
||||
return true;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public unsafe static bool TryCloseShop(IGameGui gameGui)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
int num = (gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(-364498650), out addonPtr) ? 206614822 : 206614821);
|
||||
while (true)
|
||||
if (!gameGui.TryGetAddonByName<AtkUnitBase>("Shop", out var addonPtr))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 206614820;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 2:
|
||||
addonPtr->Close(fireCallback: true);
|
||||
return true;
|
||||
case 1:
|
||||
return false;
|
||||
case 0:
|
||||
goto IL_0060;
|
||||
}
|
||||
continue;
|
||||
IL_0060:
|
||||
num = 206614821;
|
||||
return false;
|
||||
}
|
||||
addonPtr->Close(fireCallback: true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,87 +31,22 @@ public sealed class VendorResolver
|
|||
|
||||
public IReadOnlyList<ShopSearchResult> FindVendorsForItem(uint itemId, EShopType shopType)
|
||||
{
|
||||
int num;
|
||||
List<ShopSearchResult> result = default(List<ShopSearchResult>);
|
||||
switch (shopType)
|
||||
return shopType switch
|
||||
{
|
||||
default:
|
||||
num = -1685291890;
|
||||
goto IL_001d;
|
||||
case EShopType.SpecialShop:
|
||||
result = _specialShopSearcher.Search(itemId);
|
||||
num = -1685291895;
|
||||
goto IL_001d;
|
||||
case EShopType.GCShop:
|
||||
goto IL_006c;
|
||||
case EShopType.GilShop:
|
||||
goto IL_00ab;
|
||||
IL_001d:
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1685291889;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 6:
|
||||
return result;
|
||||
case 4:
|
||||
goto end_IL_001d;
|
||||
case 2:
|
||||
goto IL_006c;
|
||||
case 0:
|
||||
result = new List<ShopSearchResult>();
|
||||
num = -1685291895;
|
||||
break;
|
||||
case 5:
|
||||
num = -1685291890;
|
||||
break;
|
||||
case 1:
|
||||
num = -1685291889;
|
||||
break;
|
||||
case 3:
|
||||
goto IL_00ab;
|
||||
}
|
||||
continue;
|
||||
end_IL_001d:
|
||||
break;
|
||||
}
|
||||
goto case EShopType.SpecialShop;
|
||||
IL_00ab:
|
||||
result = _gilShopSearcher.Search(itemId);
|
||||
num = -1685291895;
|
||||
goto IL_001d;
|
||||
IL_006c:
|
||||
result = _gcShopSearcher.Search(itemId);
|
||||
num = -1685291895;
|
||||
goto IL_001d;
|
||||
}
|
||||
EShopType.GilShop => _gilShopSearcher.Search(itemId),
|
||||
EShopType.SpecialShop => _specialShopSearcher.Search(itemId),
|
||||
EShopType.GCShop => _gcShopSearcher.Search(itemId),
|
||||
_ => new List<ShopSearchResult>(),
|
||||
};
|
||||
}
|
||||
|
||||
public ShopSearchResult? FindGilVendor(uint itemId)
|
||||
{
|
||||
List<ShopSearchResult> list = _gilShopSearcher.Search(itemId);
|
||||
int num = ((list.Count > 0) ? 274593349 : 274593348);
|
||||
while (true)
|
||||
if (list.Count <= 0)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 274593349;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 2:
|
||||
goto IL_0056;
|
||||
case 1:
|
||||
return null;
|
||||
case 0:
|
||||
return list[0];
|
||||
}
|
||||
continue;
|
||||
IL_0056:
|
||||
num = 274593348;
|
||||
return null;
|
||||
}
|
||||
return list[0];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,15 +13,15 @@
|
|||
<PropertyGroup />
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<Reference Include="FFXIVClientStructs">
|
||||
<HintPath>C:\Users\Aly\AppData\Roaming\XIVLauncher\addon\Hooks\15.0.3.2\FFXIVClientStructs.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Dalamud">
|
||||
<HintPath>C:\Users\Aly\AppData\Roaming\XIVLauncher\addon\Hooks\15.0.3.2\Dalamud.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Lumina">
|
||||
<HintPath>C:\Users\Aly\AppData\Roaming\XIVLauncher\addon\Hooks\15.0.3.2\Lumina.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FFXIVClientStructs">
|
||||
<HintPath>C:\Users\Aly\AppData\Roaming\XIVLauncher\addon\Hooks\15.0.3.2\FFXIVClientStructs.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Lumina.Excel">
|
||||
<HintPath>C:\Users\Aly\AppData\Roaming\XIVLauncher\addon\Hooks\15.0.3.2\Lumina.Excel.dll</HintPath>
|
||||
</Reference>
|
||||
|
|
|
|||
|
|
@ -1,95 +1,30 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace LLib;
|
||||
|
||||
public static class AtomicFile
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public static void WriteAllText(string path, string contents)
|
||||
{
|
||||
DefaultInterpolatedStringHandler defaultInterpolatedStringHandler = new DefaultInterpolatedStringHandler(5, 2);
|
||||
defaultInterpolatedStringHandler.AppendFormatted(path);
|
||||
defaultInterpolatedStringHandler.AppendLiteral(global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(657022072));
|
||||
defaultInterpolatedStringHandler.AppendFormatted(Guid.NewGuid(), global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(-2122338139));
|
||||
defaultInterpolatedStringHandler.AppendLiteral(global::_003CModule_003E._202E_202C_206D_206B_202B_202D_206D_202E_206F_202E_202A_206A_206A_202B_206A_202D_202C_206C_206B_202C_206E_202B_200E_206E_206A_206C_200D_200D_200F_200B_202C_200B_200E_206F_202C_200F_202D_202A_206E_202B_202E<string>(-1367875388));
|
||||
string text = defaultInterpolatedStringHandler.ToStringAndClear();
|
||||
string text = $"{path}.{Guid.NewGuid():N}.tmp";
|
||||
try
|
||||
{
|
||||
FileStream fileStream = _200F_202A_202C_202D_206D_202A_206A_202E_200F_206D_200F_206D_206B_202E_206E_206A_200D_200D_202D_200C_200C_206C_206E_200F_200B_202D_206D_200B_206B_200C_202E_206D_206B_202D_200B_206C_200C_202B_202B_202E_202E(text, FileMode.CreateNew, FileAccess.Write, FileShare.None);
|
||||
try
|
||||
using (FileStream fileStream = new FileStream(text, FileMode.CreateNew, FileAccess.Write, FileShare.None))
|
||||
{
|
||||
StreamWriter streamWriter = _202C_202C_202D_206A_202A_200B_200E_206B_206F_206A_202C_206B_206E_202E_206C_206F_206B_206F_206B_202B_202C_200F_202A_206A_202E_202C_200F_206B_200F_206D_202D_202A_200C_200E_202C_206A_202D_206B_202D_202B_202E((Stream)fileStream);
|
||||
try
|
||||
{
|
||||
_206F_206F_202B_202B_206A_206A_202A_206C_200C_200E_206C_206A_200C_200E_202A_200E_206F_206F_202E_202B_202E_202E_202A_202B_206B_200F_202B_206F_202C_202D_200C_202A_202D_202B_202A_206D_202B_206B_206D_206D_202E((TextWriter)streamWriter, contents);
|
||||
_206D_202E_200C_200D_202D_206D_202B_206B_202C_200E_202E_202D_206B_202C_206C_206C_206C_202C_202D_206D_200E_200F_200C_202C_202A_206A_200B_202E_200D_206F_200C_206D_202C_206B_200B_200C_200F_200B_202D_202A_202E((TextWriter)streamWriter);
|
||||
_200C_200F_202A_206C_200D_206A_200F_206D_206E_202B_200D_200F_202B_206D_202A_202D_200E_206A_202C_200C_200C_202C_202C_206E_202B_200C_206A_206D_200E_200F_206E_200B_200C_202B_200D_206A_200D_202C_206A_200D_202E(fileStream, true);
|
||||
}
|
||||
finally
|
||||
{
|
||||
int num = ((streamWriter == null) ? 2495584 : 2495587);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 2495585;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 1:
|
||||
goto end_IL_0099;
|
||||
case 2:
|
||||
_206E_202D_202D_200F_202E_206C_206E_200C_206C_200E_202E_206A_206C_200D_200E_202B_206E_202C_200D_206E_200F_202A_206F_202B_202D_206F_206C_206C_206E_200D_200B_200F_202E_206E_200C_200D_206A_200C_206F_202C_202E((IDisposable)streamWriter);
|
||||
num = 2495584;
|
||||
break;
|
||||
case 0:
|
||||
num = 2495587;
|
||||
break;
|
||||
}
|
||||
continue;
|
||||
end_IL_0099:
|
||||
break;
|
||||
}
|
||||
}
|
||||
using StreamWriter streamWriter = new StreamWriter(fileStream);
|
||||
streamWriter.Write(contents);
|
||||
streamWriter.Flush();
|
||||
fileStream.Flush(flushToDisk: true);
|
||||
}
|
||||
finally
|
||||
{
|
||||
int num = ((fileStream == null) ? 135208521 : 135208522);
|
||||
while (true)
|
||||
{
|
||||
int num7 = num;
|
||||
int num3 = 135208520;
|
||||
int num4 = num7;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
num = 135208522;
|
||||
break;
|
||||
case 2:
|
||||
_206E_202D_202D_200F_202E_206C_206E_200C_206C_200E_202E_206A_206C_200D_200E_202B_206E_202C_200D_206E_200F_202A_206F_202B_202D_206F_206C_206C_206E_200D_200B_200F_202E_206E_200C_200D_206A_200C_206F_202C_202E((IDisposable)fileStream);
|
||||
num = 135208521;
|
||||
break;
|
||||
case 1:
|
||||
goto end_IL_0109;
|
||||
}
|
||||
continue;
|
||||
end_IL_0109:
|
||||
break;
|
||||
}
|
||||
}
|
||||
_202D_202C_200C_200B_200F_206E_202E_200C_200F_202D_202C_200C_200E_206A_200B_206A_200D_202E_200E_200C_200D_206D_206C_206E_206D_200B_202D_200E_202D_200E_206C_202D_200D_206F_202A_202D_206B_202A_202E_202E_202E(text, path, true);
|
||||
File.Move(text, path, overwrite: true);
|
||||
CleanupOrphanedTempFiles(path, text);
|
||||
}
|
||||
catch
|
||||
{
|
||||
try
|
||||
{
|
||||
_206D_200C_200C_202B_206D_206F_206F_200D_200E_200D_200F_200E_202D_202C_206D_202D_200B_202C_202E_206D_200F_206F_206C_206E_206B_206D_202B_202E_206F_200C_206B_200E_202D_206A_200C_206D_202C_206A_200D_206C_202E(text);
|
||||
File.Delete(text);
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
|
@ -98,80 +33,24 @@ public static class AtomicFile
|
|||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
private static void CleanupOrphanedTempFiles(string path, string currentTmp)
|
||||
{
|
||||
try
|
||||
{
|
||||
string text = _200C_200D_200F_202B_202B_200B_200D_206E_206C_206B_200F_206D_202E_206B_200E_206B_206C_200B_206C_202A_206F_206C_206A_200E_202B_206B_202E_206A_200D_202D_202B_200C_202D_206B_200E_200E_206C_200E_200F_200D_202E(path);
|
||||
int num = ((text == null) ? (-1500986327) : (-1500986326));
|
||||
string text2;
|
||||
while (true)
|
||||
string directoryName = Path.GetDirectoryName(path);
|
||||
string path2 = ((directoryName != null && directoryName.Length > 0) ? directoryName : ".");
|
||||
string searchPattern = Path.GetFileName(path) + ".*.tmp";
|
||||
foreach (string item in Directory.EnumerateFiles(path2, searchPattern))
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1500986327;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
if (!string.Equals(Path.GetFileName(item), Path.GetFileName(currentTmp), StringComparison.Ordinal))
|
||||
{
|
||||
default:
|
||||
continue;
|
||||
case 2:
|
||||
num = -1500986326;
|
||||
continue;
|
||||
case 3:
|
||||
num = ((_200C_206E_200D_202A_200C_202D_200F_200E_200F_202E_202B_206A_200F_206C_200B_200F_202B_200F_200D_206D_206F_200F_202E_206D_202C_200E_202A_202C_206A_202D_200D_202B_200B_202B_206D_206B_200B_200C_202E_202E_202E(text) > 0) ? (-1500986328) : (-1500986327));
|
||||
continue;
|
||||
case 0:
|
||||
text2 = global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(-1154351772);
|
||||
break;
|
||||
case 1:
|
||||
text2 = text;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
string text3 = _202B_200F_206B_206B_206A_202C_200D_200D_200D_202A_202A_206D_202E_202A_200E_200C_206B_202A_202A_200B_200E_206B_206C_206D_200C_206F_202E_206A_206B_202B_206F_206C_200F_202C_206A_200F_202E_202C_206E_206F_202E(_202C_206E_200F_200F_202D_200B_206D_202C_202E_206E_200F_200B_206E_200C_200F_202C_206F_206B_206B_206C_200E_202B_206E_206F_202E_206D_206A_202E_202E_202B_202D_206E_206E_206D_202E_206A_206D_206B_200D_202C_202E(path), global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(-1112271862));
|
||||
IEnumerator<string> enumerator = _202D_206C_206F_200F_206C_206E_206C_200C_200E_202B_202A_202B_202C_206A_206D_202C_202D_206F_202B_200E_206C_206C_200B_206D_202D_202E_206B_202E_200B_200C_206F_206B_200B_200E_200F_200F_206A_200C_200C_202C_202E(text2, text3).GetEnumerator();
|
||||
try
|
||||
{
|
||||
while (_200D_202B_206F_200E_206A_200C_202D_200E_206D_206A_206E_206F_200D_202A_202D_202C_202E_202D_206C_206D_206F_206C_206F_200D_206F_206D_200B_202E_200E_200B_200B_206D_206D_202C_200C_202B_202C_200B_206B_206A_202E((IEnumerator)enumerator))
|
||||
{
|
||||
string current = enumerator.Current;
|
||||
if (!_206E_200B_202D_202A_206E_202D_202C_202E_206B_206D_202E_200D_206E_206A_200B_202D_200F_206D_206F_200E_206B_206A_200B_206A_206A_206C_200D_206A_206C_200D_202C_202C_200D_206D_202D_206B_200D_200C_202A_202C_202E(_202C_206E_200F_200F_202D_200B_206D_202C_202E_206E_200F_200B_206E_200C_200F_202C_206F_206B_206B_206C_200E_202B_206E_206F_202E_206D_206A_202E_202E_202B_202D_206E_206E_206D_202E_206A_206D_206B_200D_202C_202E(current), _202C_206E_200F_200F_202D_200B_206D_202C_202E_206E_200F_200B_206E_200C_200F_202C_206F_206B_206B_206C_200E_202B_206E_206F_202E_206D_206A_202E_202E_202B_202D_206E_206E_206D_202E_206A_206D_206B_200D_202C_202E(currentTmp), StringComparison.Ordinal))
|
||||
try
|
||||
{
|
||||
try
|
||||
{
|
||||
_206D_200C_200C_202B_206D_206F_206F_200D_200E_200D_200F_200E_202D_202C_206D_202D_200B_202C_202E_206D_200F_206F_206C_206E_206B_206D_202B_202E_206F_200C_206B_200E_202D_206A_200C_206D_202C_206A_200D_206C_202E(current);
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
File.Delete(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
num = ((enumerator == null) ? (-1811405444) : (-1811405441));
|
||||
while (true)
|
||||
{
|
||||
int num5 = num;
|
||||
int num3 = -1811405443;
|
||||
int num4 = num5;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
catch
|
||||
{
|
||||
case 0:
|
||||
num = -1811405441;
|
||||
break;
|
||||
case 2:
|
||||
_206E_202D_202D_200F_202E_206C_206E_200C_206C_200E_202E_206A_206C_200D_200E_202B_206E_202C_200D_206E_200F_202A_206F_202B_202D_206F_206C_206C_206E_200D_200B_200F_202E_206E_200C_200D_206A_200C_206F_202C_202E((IDisposable)enumerator);
|
||||
num = -1811405444;
|
||||
break;
|
||||
case 1:
|
||||
goto end_IL_0126;
|
||||
}
|
||||
continue;
|
||||
end_IL_0126:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -179,79 +58,4 @@ public static class AtomicFile
|
|||
{
|
||||
}
|
||||
}
|
||||
|
||||
static FileStream _200F_202A_202C_202D_206D_202A_206A_202E_200F_206D_200F_206D_206B_202E_206E_206A_200D_200D_202D_200C_200C_206C_206E_200F_200B_202D_206D_200B_206B_200C_202E_206D_206B_202D_200B_206C_200C_202B_202B_202E_202E(string P_0, FileMode P_1, FileAccess P_2, FileShare P_3)
|
||||
{
|
||||
return new FileStream(P_0, P_1, P_2, P_3);
|
||||
}
|
||||
|
||||
static StreamWriter _202C_202C_202D_206A_202A_200B_200E_206B_206F_206A_202C_206B_206E_202E_206C_206F_206B_206F_206B_202B_202C_200F_202A_206A_202E_202C_200F_206B_200F_206D_202D_202A_200C_200E_202C_206A_202D_206B_202D_202B_202E(Stream P_0)
|
||||
{
|
||||
return new StreamWriter(P_0);
|
||||
}
|
||||
|
||||
static void _206F_206F_202B_202B_206A_206A_202A_206C_200C_200E_206C_206A_200C_200E_202A_200E_206F_206F_202E_202B_202E_202E_202A_202B_206B_200F_202B_206F_202C_202D_200C_202A_202D_202B_202A_206D_202B_206B_206D_206D_202E(TextWriter P_0, string P_1)
|
||||
{
|
||||
P_0.Write(P_1);
|
||||
}
|
||||
|
||||
static void _206D_202E_200C_200D_202D_206D_202B_206B_202C_200E_202E_202D_206B_202C_206C_206C_206C_202C_202D_206D_200E_200F_200C_202C_202A_206A_200B_202E_200D_206F_200C_206D_202C_206B_200B_200C_200F_200B_202D_202A_202E(TextWriter P_0)
|
||||
{
|
||||
P_0.Flush();
|
||||
}
|
||||
|
||||
static void _200C_200F_202A_206C_200D_206A_200F_206D_206E_202B_200D_200F_202B_206D_202A_202D_200E_206A_202C_200C_200C_202C_202C_206E_202B_200C_206A_206D_200E_200F_206E_200B_200C_202B_200D_206A_200D_202C_206A_200D_202E(FileStream P_0, bool P_1)
|
||||
{
|
||||
P_0.Flush(P_1);
|
||||
}
|
||||
|
||||
static void _206E_202D_202D_200F_202E_206C_206E_200C_206C_200E_202E_206A_206C_200D_200E_202B_206E_202C_200D_206E_200F_202A_206F_202B_202D_206F_206C_206C_206E_200D_200B_200F_202E_206E_200C_200D_206A_200C_206F_202C_202E(IDisposable P_0)
|
||||
{
|
||||
P_0.Dispose();
|
||||
}
|
||||
|
||||
static void _202D_202C_200C_200B_200F_206E_202E_200C_200F_202D_202C_200C_200E_206A_200B_206A_200D_202E_200E_200C_200D_206D_206C_206E_206D_200B_202D_200E_202D_200E_206C_202D_200D_206F_202A_202D_206B_202A_202E_202E_202E(string P_0, string P_1, bool P_2)
|
||||
{
|
||||
File.Move(P_0, P_1, P_2);
|
||||
}
|
||||
|
||||
static void _206D_200C_200C_202B_206D_206F_206F_200D_200E_200D_200F_200E_202D_202C_206D_202D_200B_202C_202E_206D_200F_206F_206C_206E_206B_206D_202B_202E_206F_200C_206B_200E_202D_206A_200C_206D_202C_206A_200D_206C_202E(string P_0)
|
||||
{
|
||||
File.Delete(P_0);
|
||||
}
|
||||
|
||||
static string _200C_200D_200F_202B_202B_200B_200D_206E_206C_206B_200F_206D_202E_206B_200E_206B_206C_200B_206C_202A_206F_206C_206A_200E_202B_206B_202E_206A_200D_202D_202B_200C_202D_206B_200E_200E_206C_200E_200F_200D_202E(string P_0)
|
||||
{
|
||||
return Path.GetDirectoryName(P_0);
|
||||
}
|
||||
|
||||
static int _200C_206E_200D_202A_200C_202D_200F_200E_200F_202E_202B_206A_200F_206C_200B_200F_202B_200F_200D_206D_206F_200F_202E_206D_202C_200E_202A_202C_206A_202D_200D_202B_200B_202B_206D_206B_200B_200C_202E_202E_202E(string P_0)
|
||||
{
|
||||
return P_0.Length;
|
||||
}
|
||||
|
||||
static string _202C_206E_200F_200F_202D_200B_206D_202C_202E_206E_200F_200B_206E_200C_200F_202C_206F_206B_206B_206C_200E_202B_206E_206F_202E_206D_206A_202E_202E_202B_202D_206E_206E_206D_202E_206A_206D_206B_200D_202C_202E(string P_0)
|
||||
{
|
||||
return Path.GetFileName(P_0);
|
||||
}
|
||||
|
||||
static string _202B_200F_206B_206B_206A_202C_200D_200D_200D_202A_202A_206D_202E_202A_200E_200C_206B_202A_202A_200B_200E_206B_206C_206D_200C_206F_202E_206A_206B_202B_206F_206C_200F_202C_206A_200F_202E_202C_206E_206F_202E(string P_0, string P_1)
|
||||
{
|
||||
return P_0 + P_1;
|
||||
}
|
||||
|
||||
static IEnumerable<string> _202D_206C_206F_200F_206C_206E_206C_200C_200E_202B_202A_202B_202C_206A_206D_202C_202D_206F_202B_200E_206C_206C_200B_206D_202D_202E_206B_202E_200B_200C_206F_206B_200B_200E_200F_200F_206A_200C_200C_202C_202E(string P_0, string P_1)
|
||||
{
|
||||
return Directory.EnumerateFiles(P_0, P_1);
|
||||
}
|
||||
|
||||
static bool _206E_200B_202D_202A_206E_202D_202C_202E_206B_206D_202E_200D_206E_206A_200B_202D_200F_206D_206F_200E_206B_206A_200B_206A_206A_206C_200D_206A_206C_200D_202C_202C_200D_206D_202D_206B_200D_200C_202A_202C_202E(string P_0, string P_1, StringComparison P_2)
|
||||
{
|
||||
return string.Equals(P_0, P_1, P_2);
|
||||
}
|
||||
|
||||
static bool _200D_202B_206F_200E_206A_200C_202D_200E_206D_206A_206E_206F_200D_202A_202D_202C_202E_202D_206C_206D_206F_206C_206F_200D_206F_206D_200B_202E_200E_200B_200B_206D_206D_202C_200C_202B_202C_200B_206B_206A_202E(IEnumerator P_0)
|
||||
{
|
||||
return P_0.MoveNext();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,42 +10,23 @@ public static class ChatHelper
|
|||
public unsafe static void SendCommand(string command)
|
||||
{
|
||||
Framework* ptr = Framework.Instance();
|
||||
int num = ((ptr != null) ? 97201329 : 97201331);
|
||||
UIModule* uIModule = default(UIModule*);
|
||||
while (true)
|
||||
if (ptr == null)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 97201328;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
num = 97201331;
|
||||
break;
|
||||
case 3:
|
||||
return;
|
||||
case 2:
|
||||
return;
|
||||
case 1:
|
||||
uIModule = ptr->GetUIModule();
|
||||
num = ((uIModule != null) ? 97201332 : 97201330);
|
||||
break;
|
||||
case 4:
|
||||
{
|
||||
Utf8String utf8String = new Utf8String(command);
|
||||
try
|
||||
{
|
||||
uIModule->ProcessChatBoxEntry(&utf8String);
|
||||
return;
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)utf8String/*cast due to .constrained prefix*/).Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
UIModule* uIModule = ptr->GetUIModule();
|
||||
if (uIModule == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
Utf8String utf8String = new Utf8String(command);
|
||||
try
|
||||
{
|
||||
uIModule->ProcessChatBoxEntry(&utf8String);
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)utf8String/*cast due to .constrained prefix*/).Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,7 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text.RegularExpressions;
|
||||
using Dalamud.Plugin.Services;
|
||||
using Lumina.Excel;
|
||||
|
|
@ -12,143 +10,9 @@ namespace LLib;
|
|||
|
||||
public static class DataManagerExtensions
|
||||
{
|
||||
[Serializable]
|
||||
[CompilerGenerated]
|
||||
private sealed class _003C_003Ec
|
||||
{
|
||||
public static readonly _003C_003Ec _003C_003E9 = new _003C_003Ec();
|
||||
|
||||
public static Func<ReadOnlySePayload, string> _003C_003E9__7_0;
|
||||
|
||||
public static Func<ReadOnlySePayload, string> _003C_003E9__8_0;
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
internal string _003CToRegex_003Eb__7_0(ReadOnlySePayload payload)
|
||||
{
|
||||
int num = ((payload.Type != ReadOnlySePayloadType.Text) ? 653215038 : 653215037);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 653215036;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0049;
|
||||
case 2:
|
||||
return global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-1401261324);
|
||||
case 1:
|
||||
return _206E_200E_202D_206D_206F_200E_202C_206B_206E_202E_200D_200E_200F_200F_202D_206F_200B_202B_200B_200E_202E_206C_200C_202E_206A_200C_202E_200D_200D_206C_206C_206D_202A_202D_200B_206C_200C_200E_202C_202E(payload.ToString());
|
||||
}
|
||||
continue;
|
||||
IL_0049:
|
||||
num = 653215037;
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
internal string _003CWithCertainMacroCodeReplacements_003Eb__8_0(ReadOnlySePayload payload)
|
||||
{
|
||||
ReadOnlySePayloadType type = payload.Type;
|
||||
int num = ((type == ReadOnlySePayloadType.Text) ? 665720307 : 665720306);
|
||||
MacroCode macroCode = default(MacroCode);
|
||||
string result = default(string);
|
||||
string text = default(string);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 665720319;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 15:
|
||||
macroCode = payload.MacroCode;
|
||||
num = ((macroCode > MacroCode.SoftHyphen) ? 665720311 : 665720310);
|
||||
break;
|
||||
case 5:
|
||||
return result;
|
||||
case 10:
|
||||
text = global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(-1220250632);
|
||||
num = 665720312;
|
||||
break;
|
||||
case 18:
|
||||
num = 665720306;
|
||||
break;
|
||||
case 17:
|
||||
num = ((macroCode == MacroCode.Hyphen) ? 665720309 : 665720318);
|
||||
break;
|
||||
case 4:
|
||||
text = payload.ToString();
|
||||
num = 665720312;
|
||||
break;
|
||||
case 14:
|
||||
text = global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-581253858);
|
||||
num = 665720312;
|
||||
break;
|
||||
case 0:
|
||||
num = ((macroCode == MacroCode.SoftHyphen) ? 665720313 : 665720303);
|
||||
break;
|
||||
case 13:
|
||||
num = ((type == ReadOnlySePayloadType.Macro) ? 665720304 : 665720308);
|
||||
break;
|
||||
case 12:
|
||||
result = payload.ToString();
|
||||
num = 665720314;
|
||||
break;
|
||||
case 16:
|
||||
num = 665720315;
|
||||
break;
|
||||
case 1:
|
||||
num = 665720315;
|
||||
break;
|
||||
case 7:
|
||||
result = text;
|
||||
num = 665720314;
|
||||
break;
|
||||
case 6:
|
||||
text = global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(336218591);
|
||||
num = 665720312;
|
||||
break;
|
||||
case 8:
|
||||
num = ((macroCode == MacroCode.NonBreakingSpace) ? 665720305 : 665720302);
|
||||
break;
|
||||
case 2:
|
||||
text = _202A_200D_200D_202A_200B_200E_202E_202C_200D_202D_202B_200F_202C_206A_202D_202A_206B_206C_200D_206B_206A_206B_206E_202B_202B_206C_206F_202A_206B_202B_202C_206F_200F_202B_202B_200C_202E_200B_202D_202C_202E();
|
||||
num = 665720312;
|
||||
break;
|
||||
case 11:
|
||||
num = 665720316;
|
||||
break;
|
||||
case 9:
|
||||
num = ((macroCode == MacroCode.NewLine) ? 665720317 : 665720319);
|
||||
break;
|
||||
case 3:
|
||||
result = payload.ToString();
|
||||
num = 665720314;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static string _206E_200E_202D_206D_206F_200E_202C_206B_206E_202E_200D_200E_200F_200F_202D_206F_200B_202B_200B_200E_202E_206C_200C_202E_206A_200C_202E_200D_200D_206C_206C_206D_202A_202D_200B_206C_200C_200E_202C_202E(string P_0)
|
||||
{
|
||||
return Regex.Escape(P_0);
|
||||
}
|
||||
|
||||
static string _202A_200D_200D_202A_200B_200E_202E_202C_200D_202D_202B_200F_202C_206A_202D_202A_206B_206C_200D_206B_206A_206B_206E_202B_202B_206C_206F_202A_206B_202B_202C_206F_200F_202B_202B_200C_202E_200B_202D_202C_202E()
|
||||
{
|
||||
return Environment.NewLine;
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public static ReadOnlySeString? GetSeString<T>(this IDataManager dataManager, string key) where T : struct, IQuestDialogueText, IExcelRow<T>
|
||||
{
|
||||
_202A_202A_206D_206A_206B_202B_206E_206F_206F_206A_202B_202E_206A_202E_202A_206A_206A_202C_200D_206C_206E_202B_202B_206E_200E_200F_200F_202D_206E_202B_202C_200B_206E_206D_202D_200E_202E_206A_200B_202C_202E((object)dataManager, global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(1058761074));
|
||||
ArgumentNullException.ThrowIfNull(dataManager, "dataManager");
|
||||
return dataManager.GetExcelSheet<T>().Cast<T?>().FirstOrDefault((T? x) => x.Value.Key == key)?.Value;
|
||||
}
|
||||
|
||||
|
|
@ -160,56 +24,23 @@ public static class DataManagerExtensions
|
|||
public static Regex? GetRegex<T>(this IDataManager dataManager, string key, IPluginLog? pluginLog) where T : struct, IQuestDialogueText, IExcelRow<T>
|
||||
{
|
||||
ReadOnlySeString? seString = dataManager.GetSeString<T>(key);
|
||||
int num = (seString.HasValue ? 532905786 : 532905785);
|
||||
while (true)
|
||||
if (!seString.HasValue)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 532905787;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0051;
|
||||
case 1:
|
||||
return seString.ToRegex();
|
||||
case 2:
|
||||
return null;
|
||||
}
|
||||
continue;
|
||||
IL_0051:
|
||||
num = 532905785;
|
||||
return null;
|
||||
}
|
||||
return seString.ToRegex();
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public static ReadOnlySeString? GetSeString<T>(this IDataManager dataManager, uint rowId, Func<T, ReadOnlySeString?> mapper) where T : struct, IExcelRow<T>
|
||||
{
|
||||
_202A_202A_206D_206A_206B_202B_206E_206F_206F_206A_202B_202E_206A_202E_202A_206A_206A_202C_200D_206C_206E_202B_202B_206E_200E_200F_200F_202D_206E_202B_202C_200B_206E_206D_202D_200E_202E_206A_200B_202C_202E((object)dataManager, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(-1509101314));
|
||||
_202A_202A_206D_206A_206B_202B_206E_206F_206F_206A_202B_202E_206A_202E_202A_206A_206A_202C_200D_206C_206E_202B_202B_206E_200E_200F_200F_202D_206E_202B_202C_200B_206E_206D_202D_200E_202E_206A_200B_202C_202E((object)mapper, global::_003CModule_003E._200E_206F_206C_206C_200E_202A_206D_206B_200B_202D_202B_200F_200F_206B_206C_206F_202D_206F_206A_202D_206A_200B_200B_202B_202D_202C_200F_200D_202E_200E_200D_202A_202B_206F_202E_200E_200B_206B_200E_202E_202E<string>(1413795073));
|
||||
ArgumentNullException.ThrowIfNull(dataManager, "dataManager");
|
||||
ArgumentNullException.ThrowIfNull(mapper, "mapper");
|
||||
T? rowOrDefault = dataManager.GetExcelSheet<T>().GetRowOrDefault(rowId);
|
||||
int num = (rowOrDefault.HasValue ? 766901278 : 766901279);
|
||||
while (true)
|
||||
if (!rowOrDefault.HasValue)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 766901278;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 2:
|
||||
goto IL_0086;
|
||||
case 1:
|
||||
return null;
|
||||
case 0:
|
||||
return mapper(rowOrDefault.Value);
|
||||
}
|
||||
continue;
|
||||
IL_0086:
|
||||
num = 766901279;
|
||||
return null;
|
||||
}
|
||||
return mapper(rowOrDefault.Value);
|
||||
}
|
||||
|
||||
public static string? GetString<T>(this IDataManager dataManager, uint rowId, Func<T, ReadOnlySeString?> mapper, IPluginLog? pluginLog = null) where T : struct, IExcelRow<T>
|
||||
|
|
@ -220,188 +51,44 @@ public static class DataManagerExtensions
|
|||
public static Regex? GetRegex<T>(this IDataManager dataManager, uint rowId, Func<T, ReadOnlySeString?> mapper, IPluginLog? pluginLog = null) where T : struct, IExcelRow<T>
|
||||
{
|
||||
ReadOnlySeString? seString = dataManager.GetSeString(rowId, mapper);
|
||||
int num = (seString.HasValue ? (-1910871313) : (-1910871316));
|
||||
while (true)
|
||||
if (!seString.HasValue)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1910871314;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 1:
|
||||
return seString.ToRegex();
|
||||
case 2:
|
||||
return null;
|
||||
case 0:
|
||||
goto IL_005b;
|
||||
}
|
||||
continue;
|
||||
IL_005b:
|
||||
num = -1910871316;
|
||||
return null;
|
||||
}
|
||||
return seString.ToRegex();
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public static Regex? GetRegex<T>(this T excelRow, Func<T, ReadOnlySeString?> mapper, IPluginLog? pluginLog) where T : struct, IExcelRow<T>
|
||||
{
|
||||
_202A_202A_206D_206A_206B_202B_206E_206F_206F_206A_202B_202E_206A_202E_202A_206A_206A_202C_200D_206C_206E_202B_202B_206E_200E_200F_200F_202D_206E_202B_202C_200B_206E_206D_202D_200E_202E_206A_200B_202C_202E((object)mapper, global::_003CModule_003E._206A_206D_202C_206E_206D_206E_202A_200F_200D_206A_200F_206C_202C_202D_206D_206A_200D_200F_206A_206C_202C_206D_206E_200F_200F_200C_206B_200B_206B_206E_202B_206B_200E_200E_200B_206F_200F_202E_200C_200C_202E<string>(211367094));
|
||||
ArgumentNullException.ThrowIfNull(mapper, "mapper");
|
||||
ReadOnlySeString? text = mapper(excelRow);
|
||||
int num = (text.HasValue ? 995158761 : 995158762);
|
||||
while (true)
|
||||
if (!text.HasValue)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 995158760;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 1:
|
||||
return text.ToRegex();
|
||||
case 2:
|
||||
return null;
|
||||
case 0:
|
||||
goto IL_006a;
|
||||
}
|
||||
continue;
|
||||
IL_006a:
|
||||
num = 995158762;
|
||||
return null;
|
||||
}
|
||||
return text.ToRegex();
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public static Regex ToRegex(this ReadOnlySeString? text)
|
||||
{
|
||||
_202A_202A_206D_206A_206B_202B_206E_206F_206F_206A_202B_202E_206A_202E_202A_206A_206A_202C_200D_206C_206E_202B_202B_206E_200E_200F_200F_202D_206E_202B_202C_200B_206E_206D_202D_200E_202E_206A_200B_202C_202E((object)text, global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(782807675));
|
||||
return _206B_202D_202E_202A_206F_206D_202D_200D_202C_200E_200D_200D_206D_200B_202C_206F_202E_202A_206B_202A_202A_202C_202D_200E_200D_202D_200B_206A_206F_206F_206F_206E_202B_206F_200D_200F_200C_202A_200F_202E_202E(_200D_206D_200E_206E_202B_200C_202A_200D_206A_202D_206C_206C_200E_206E_202D_202D_200F_206D_202A_202D_200D_200F_200F_202E_200D_206F_202B_206F_202D_206D_206C_200B_206A_202B_206F_202A_206C_200C_206C_200C_202E(global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(-1158161199), text.Value.Select([MethodImpl(MethodImplOptions.NoInlining)] (ReadOnlySePayload payload) =>
|
||||
{
|
||||
int num = ((payload.Type != ReadOnlySePayloadType.Text) ? 653215038 : 653215037);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 653215036;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 0:
|
||||
goto IL_0049;
|
||||
case 2:
|
||||
return global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-1401261324);
|
||||
case 1:
|
||||
return _003C_003Ec._206E_200E_202D_206D_206F_200E_202C_206B_206E_202E_200D_200E_200F_200F_202D_206F_200B_202B_200B_200E_202E_206C_200C_202E_206A_200C_202E_200D_200D_206C_206C_206D_202A_202D_200B_206C_200C_200E_202C_202E(payload.ToString());
|
||||
}
|
||||
continue;
|
||||
IL_0049:
|
||||
num = 653215037;
|
||||
}
|
||||
})), RegexOptions.Compiled);
|
||||
ArgumentNullException.ThrowIfNull(text, "text");
|
||||
return new Regex(string.Join("", text.Value.Select((ReadOnlySePayload payload) => (payload.Type == ReadOnlySePayloadType.Text) ? Regex.Escape(payload.ToString()) : "(.*)")), RegexOptions.Compiled);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public static string WithCertainMacroCodeReplacements(this ReadOnlySeString text)
|
||||
{
|
||||
return _200D_206D_200E_206E_202B_200C_202A_200D_206A_202D_206C_206C_200E_206E_202D_202D_200F_206D_202A_202D_200D_200F_200F_202E_200D_206F_202B_206F_202D_206D_206C_200B_206A_202B_206F_202A_206C_200C_206C_200C_202E(global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(336218591), text.Select([MethodImpl(MethodImplOptions.NoInlining)] (ReadOnlySePayload payload) =>
|
||||
return string.Join("", text.Select((ReadOnlySePayload payload) => payload.Type switch
|
||||
{
|
||||
ReadOnlySePayloadType type = payload.Type;
|
||||
int num = ((type == ReadOnlySePayloadType.Text) ? 665720307 : 665720306);
|
||||
MacroCode macroCode = default(MacroCode);
|
||||
string result = default(string);
|
||||
string text2 = default(string);
|
||||
while (true)
|
||||
ReadOnlySePayloadType.Text => payload.ToString(),
|
||||
ReadOnlySePayloadType.Macro => payload.MacroCode switch
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 665720319;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 15:
|
||||
macroCode = payload.MacroCode;
|
||||
num = ((macroCode > MacroCode.SoftHyphen) ? 665720311 : 665720310);
|
||||
break;
|
||||
case 5:
|
||||
return result;
|
||||
case 10:
|
||||
text2 = global::_003CModule_003E._206E_202B_206C_202A_202A_200E_202B_202B_206D_200B_200C_206B_200B_206D_202E_202D_206C_202B_200B_206A_202D_206C_202A_200F_202D_200C_200B_200B_200B_200D_202C_206E_206D_202E_200C_206B_206A_206D_202D_202C_202E<string>(-1220250632);
|
||||
num = 665720312;
|
||||
break;
|
||||
case 18:
|
||||
num = 665720306;
|
||||
break;
|
||||
case 17:
|
||||
num = ((macroCode == MacroCode.Hyphen) ? 665720309 : 665720318);
|
||||
break;
|
||||
case 4:
|
||||
text2 = payload.ToString();
|
||||
num = 665720312;
|
||||
break;
|
||||
case 14:
|
||||
text2 = global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(-581253858);
|
||||
num = 665720312;
|
||||
break;
|
||||
case 0:
|
||||
num = ((macroCode == MacroCode.SoftHyphen) ? 665720313 : 665720303);
|
||||
break;
|
||||
case 13:
|
||||
num = ((type == ReadOnlySePayloadType.Macro) ? 665720304 : 665720308);
|
||||
break;
|
||||
case 12:
|
||||
result = payload.ToString();
|
||||
num = 665720314;
|
||||
break;
|
||||
case 16:
|
||||
num = 665720315;
|
||||
break;
|
||||
case 1:
|
||||
num = 665720315;
|
||||
break;
|
||||
case 7:
|
||||
result = text2;
|
||||
num = 665720314;
|
||||
break;
|
||||
case 6:
|
||||
text2 = global::_003CModule_003E._206A_202C_200C_206F_202A_200C_200F_206F_202B_202B_200D_206F_206D_200E_206A_206B_202A_200F_200B_206C_202B_202A_202B_206C_200F_206C_202C_202C_200C_206C_206F_200C_200B_202D_200E_202A_202A_206B_206B_200F_202E<string>(336218591);
|
||||
num = 665720312;
|
||||
break;
|
||||
case 8:
|
||||
num = ((macroCode == MacroCode.NonBreakingSpace) ? 665720305 : 665720302);
|
||||
break;
|
||||
case 2:
|
||||
text2 = _003C_003Ec._202A_200D_200D_202A_200B_200E_202E_202C_200D_202D_202B_200F_202C_206A_202D_202A_206B_206C_200D_206B_206A_206B_206E_202B_202B_206C_206F_202A_206B_202B_202C_206F_200F_202B_202B_200C_202E_200B_202D_202C_202E();
|
||||
num = 665720312;
|
||||
break;
|
||||
case 11:
|
||||
num = 665720316;
|
||||
break;
|
||||
case 9:
|
||||
num = ((macroCode == MacroCode.NewLine) ? 665720317 : 665720319);
|
||||
break;
|
||||
case 3:
|
||||
result = payload.ToString();
|
||||
num = 665720314;
|
||||
break;
|
||||
}
|
||||
}
|
||||
MacroCode.NewLine => Environment.NewLine,
|
||||
MacroCode.NonBreakingSpace => " ",
|
||||
MacroCode.Hyphen => "-",
|
||||
MacroCode.SoftHyphen => "",
|
||||
_ => payload.ToString(),
|
||||
},
|
||||
_ => payload.ToString(),
|
||||
}));
|
||||
}
|
||||
|
||||
static void _202A_202A_206D_206A_206B_202B_206E_206F_206F_206A_202B_202E_206A_202E_202A_206A_206A_202C_200D_206C_206E_202B_202B_206E_200E_200F_200F_202D_206E_202B_202C_200B_206E_206D_202D_200E_202E_206A_200B_202C_202E(object P_0, string P_1)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(P_0, P_1);
|
||||
}
|
||||
|
||||
static string _200D_206D_200E_206E_202B_200C_202A_200D_206A_202D_206C_206C_200E_206E_202D_202D_200F_206D_202A_202D_200D_200F_200F_202E_200D_206F_202B_206F_202D_206D_206C_200B_206A_202B_206F_202A_206C_200C_206C_200C_202E(string P_0, IEnumerable<string> P_1)
|
||||
{
|
||||
return string.Join(P_0, P_1);
|
||||
}
|
||||
|
||||
static Regex _206B_202D_202E_202A_206F_206D_202D_200D_202C_200E_200D_200D_206D_200B_202C_206F_202E_202A_206B_202A_202A_202C_202D_200E_200D_202D_200B_206A_206F_206F_206F_206E_202B_206F_200D_200F_200C_202A_200F_202E_202E(string P_0, RegexOptions P_1)
|
||||
{
|
||||
return new Regex(P_0, P_1);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,7 +1,4 @@
|
|||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Dalamud.Plugin.Services;
|
||||
|
|
@ -10,446 +7,47 @@ namespace LLib;
|
|||
|
||||
public static class PollHelper
|
||||
{
|
||||
[StructLayout(LayoutKind.Auto)]
|
||||
[CompilerGenerated]
|
||||
private struct _003CPollUntilAsync_003Ed__1 : IAsyncStateMachine
|
||||
{
|
||||
public int _003C_003E1__state;
|
||||
|
||||
public AsyncTaskMethodBuilder<bool> _003C_003Et__builder;
|
||||
|
||||
public TimeSpan timeout;
|
||||
|
||||
public TimeSpan? interval;
|
||||
|
||||
public CancellationToken ct;
|
||||
|
||||
public Func<bool> action;
|
||||
|
||||
private bool _003Cinfinite_003E5__2;
|
||||
|
||||
private long _003CdeadlineMs_003E5__3;
|
||||
|
||||
private TimeSpan _003Cdelay_003E5__4;
|
||||
|
||||
private TaskAwaiter _003C_003Eu__1;
|
||||
|
||||
private void MoveNext()
|
||||
{
|
||||
int num = _003C_003E1__state;
|
||||
bool result;
|
||||
try
|
||||
{
|
||||
int num2 = ((num == 0) ? 1451400526 : 1451400517);
|
||||
TaskAwaiter awaiter = default(TaskAwaiter);
|
||||
while (true)
|
||||
{
|
||||
int num3 = num2;
|
||||
int num4 = 1451400516;
|
||||
int num5 = num3;
|
||||
int num6 = num5 + num4;
|
||||
int num7 = num5 & num4;
|
||||
switch (num6 - (num7 + num7))
|
||||
{
|
||||
case 9:
|
||||
ct.ThrowIfCancellationRequested();
|
||||
num2 = ((!action()) ? 1451400515 : 1451400516);
|
||||
break;
|
||||
case 0:
|
||||
result = true;
|
||||
goto end_IL_0025;
|
||||
case 5:
|
||||
result = false;
|
||||
goto end_IL_0025;
|
||||
case 8:
|
||||
num2 = ((_202D_200B_206E_202E_206F_200B_200F_202E_200D_202C_206B_206E_206E_206C_200D_202E_202C_206D_200B_202D_202D_206A_206C_202A_202E_202A_202B_200C_206E_202B_202C_200E_206F_200E_206D_200F_206D_206C_206F_202A_202E() < _003CdeadlineMs_003E5__3) ? 1451400518 : 1451400513);
|
||||
break;
|
||||
case 4:
|
||||
num2 = 1451400517;
|
||||
break;
|
||||
case 1:
|
||||
_003Cinfinite_003E5__2 = timeout < TimeSpan.Zero;
|
||||
_003CdeadlineMs_003E5__3 = _202D_200B_206E_202E_206F_200B_200F_202E_200D_202C_206B_206E_206E_206C_200D_202E_202C_206D_200B_202D_202D_206A_206C_202A_202E_202A_202B_200C_206E_202B_202C_200E_206F_200E_206D_200F_206D_206C_206F_202A_202E() + (long)timeout.TotalMilliseconds;
|
||||
_003Cdelay_003E5__4 = interval ?? DefaultInterval;
|
||||
num2 = 1451400525;
|
||||
break;
|
||||
case 7:
|
||||
num2 = (_003Cinfinite_003E5__2 ? 1451400518 : 1451400524);
|
||||
break;
|
||||
case 2:
|
||||
awaiter = _200C_202A_202A_202A_206C_206E_202C_206C_206A_200D_202D_200F_202B_200E_202D_202E_206F_206A_206F_200D_206E_202B_202D_200B_206D_202C_200B_206C_206C_200F_200D_206C_206D_206C_206F_202A_200C_206F_200C_206D_202E(_206B_202C_200F_200F_200C_202C_200E_200E_202B_202C_206C_200D_200E_206C_200F_206A_202C_206B_202B_206C_206F_200F_200C_206C_206F_202B_206E_202C_202A_200E_200B_202E_202C_202C_206A_200C_202A_206E_202B_206F_202E(_003Cdelay_003E5__4, ct));
|
||||
num2 = (awaiter.IsCompleted ? 1451400514 : 1451400519);
|
||||
break;
|
||||
case 6:
|
||||
awaiter.GetResult();
|
||||
num2 = 1451400525;
|
||||
break;
|
||||
case 10:
|
||||
awaiter = _003C_003Eu__1;
|
||||
_003C_003Eu__1 = default(TaskAwaiter);
|
||||
num = (_003C_003E1__state = -1);
|
||||
num2 = 1451400514;
|
||||
break;
|
||||
case 3:
|
||||
num = (_003C_003E1__state = 0);
|
||||
_003C_003Eu__1 = awaiter;
|
||||
_003C_003Et__builder.AwaitUnsafeOnCompleted(ref awaiter, ref this);
|
||||
return;
|
||||
}
|
||||
continue;
|
||||
end_IL_0025:
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
_003C_003E1__state = -2;
|
||||
_003C_003Et__builder.SetException(exception);
|
||||
return;
|
||||
}
|
||||
_003C_003E1__state = -2;
|
||||
_003C_003Et__builder.SetResult(result);
|
||||
}
|
||||
|
||||
void IAsyncStateMachine.MoveNext()
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
|
||||
this.MoveNext();
|
||||
}
|
||||
|
||||
[DebuggerHidden]
|
||||
private void SetStateMachine(IAsyncStateMachine stateMachine)
|
||||
{
|
||||
_003C_003Et__builder.SetStateMachine(stateMachine);
|
||||
}
|
||||
|
||||
void IAsyncStateMachine.SetStateMachine(IAsyncStateMachine stateMachine)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in SetStateMachine
|
||||
this.SetStateMachine(stateMachine);
|
||||
}
|
||||
|
||||
static long _202D_200B_206E_202E_206F_200B_200F_202E_200D_202C_206B_206E_206E_206C_200D_202E_202C_206D_200B_202D_202D_206A_206C_202A_202E_202A_202B_200C_206E_202B_202C_200E_206F_200E_206D_200F_206D_206C_206F_202A_202E()
|
||||
{
|
||||
return Environment.TickCount64;
|
||||
}
|
||||
|
||||
static Task _206B_202C_200F_200F_200C_202C_200E_200E_202B_202C_206C_200D_200E_206C_200F_206A_202C_206B_202B_206C_206F_200F_200C_206C_206F_202B_206E_202C_202A_200E_200B_202E_202C_202C_206A_200C_202A_206E_202B_206F_202E(TimeSpan P_0, CancellationToken P_1)
|
||||
{
|
||||
return Task.Delay(P_0, P_1);
|
||||
}
|
||||
|
||||
static TaskAwaiter _200C_202A_202A_202A_206C_206E_202C_206C_206A_200D_202D_200F_202B_200E_202D_202E_206F_206A_206F_200D_206E_202B_202D_200B_206D_202C_200B_206C_206C_200F_200D_206C_206D_206C_206F_202A_200C_206F_200C_206D_202E(Task P_0)
|
||||
{
|
||||
return P_0.GetAwaiter();
|
||||
}
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Auto)]
|
||||
[CompilerGenerated]
|
||||
private struct _003CPollUntilOnFrameworkAsync_003Ed__2 : IAsyncStateMachine
|
||||
{
|
||||
public int _003C_003E1__state;
|
||||
|
||||
public AsyncTaskMethodBuilder<bool> _003C_003Et__builder;
|
||||
|
||||
public TimeSpan timeout;
|
||||
|
||||
public TimeSpan? interval;
|
||||
|
||||
public CancellationToken ct;
|
||||
|
||||
public IFramework framework;
|
||||
|
||||
public Func<bool> action;
|
||||
|
||||
private bool _003Cinfinite_003E5__2;
|
||||
|
||||
private long _003CdeadlineMs_003E5__3;
|
||||
|
||||
private TimeSpan _003Cdelay_003E5__4;
|
||||
|
||||
private TaskAwaiter<bool> _003C_003Eu__1;
|
||||
|
||||
private TaskAwaiter _003C_003Eu__2;
|
||||
|
||||
private void MoveNext()
|
||||
{
|
||||
int num = _003C_003E1__state;
|
||||
bool result;
|
||||
try
|
||||
{
|
||||
int num2 = ((num == 0) ? 30471137 : 30471145);
|
||||
TaskAwaiter awaiter2 = default(TaskAwaiter);
|
||||
TaskAwaiter<bool> awaiter = default(TaskAwaiter<bool>);
|
||||
while (true)
|
||||
{
|
||||
int num3 = num2;
|
||||
int num4 = 30471147;
|
||||
int num5 = num3;
|
||||
int num6 = num5 + num4;
|
||||
int num7 = num5 & num4;
|
||||
switch (num6 - (num7 + num7))
|
||||
{
|
||||
case 6:
|
||||
num2 = ((_206C_202A_200D_202C_206C_206D_202B_206D_206E_202E_200C_200C_200C_206A_202A_202D_206B_206A_206B_200C_206F_206F_206D_200F_206A_202E_202E_200B_200C_200D_206E_202B_202D_202B_202B_206E_202E_200F_206A_206A_202E() < _003CdeadlineMs_003E5__3) ? 30471143 : 30471142);
|
||||
break;
|
||||
case 2:
|
||||
num2 = ((num == 1) ? 30471144 : 30471136);
|
||||
break;
|
||||
case 12:
|
||||
awaiter2 = _200C_200E_200B_200D_202D_206B_202A_202D_206E_202E_202D_202B_206B_206C_200C_200E_206E_202D_206C_200C_202D_206A_206B_206D_206B_206E_202D_200B_206F_200E_206D_200F_206B_206D_202D_206A_202C_206A_200F_200D_202E(_202A_206C_202B_200B_200D_206F_202B_202C_202E_202B_206F_202E_200B_206A_206F_200D_200C_202E_202E_206E_202E_202E_202B_202E_202C_206F_206C_200B_206B_202A_202B_206A_202E_202C_202C_200E_206B_206B_200D_202E_202E(_003Cdelay_003E5__4, ct));
|
||||
num2 = (awaiter2.IsCompleted ? 30471141 : 30471151);
|
||||
break;
|
||||
case 13:
|
||||
result = false;
|
||||
goto end_IL_0025;
|
||||
case 8:
|
||||
result = true;
|
||||
goto end_IL_0025;
|
||||
case 1:
|
||||
ct.ThrowIfCancellationRequested();
|
||||
awaiter = framework.RunOnFrameworkThread(action).WaitAsync(ct).GetAwaiter();
|
||||
num2 = (awaiter.IsCompleted ? 30471138 : 30471150);
|
||||
break;
|
||||
case 14:
|
||||
awaiter2.GetResult();
|
||||
num2 = 30471146;
|
||||
break;
|
||||
case 3:
|
||||
awaiter2 = _003C_003Eu__2;
|
||||
_003C_003Eu__2 = default(TaskAwaiter);
|
||||
num = (_003C_003E1__state = -1);
|
||||
num2 = 30471141;
|
||||
break;
|
||||
case 9:
|
||||
num2 = ((!awaiter.GetResult()) ? 30471147 : 30471139);
|
||||
break;
|
||||
case 4:
|
||||
num = (_003C_003E1__state = 1);
|
||||
_003C_003Eu__2 = awaiter2;
|
||||
_003C_003Et__builder.AwaitUnsafeOnCompleted(ref awaiter2, ref this);
|
||||
return;
|
||||
case 10:
|
||||
awaiter = _003C_003Eu__1;
|
||||
_003C_003Eu__1 = default(TaskAwaiter<bool>);
|
||||
num = (_003C_003E1__state = -1);
|
||||
num2 = 30471138;
|
||||
break;
|
||||
case 0:
|
||||
num2 = (_003Cinfinite_003E5__2 ? 30471143 : 30471149);
|
||||
break;
|
||||
case 7:
|
||||
num2 = 30471145;
|
||||
break;
|
||||
case 5:
|
||||
num = (_003C_003E1__state = 0);
|
||||
_003C_003Eu__1 = awaiter;
|
||||
_003C_003Et__builder.AwaitUnsafeOnCompleted(ref awaiter, ref this);
|
||||
return;
|
||||
case 11:
|
||||
_003Cinfinite_003E5__2 = timeout < TimeSpan.Zero;
|
||||
_003CdeadlineMs_003E5__3 = _206C_202A_200D_202C_206C_206D_202B_206D_206E_202E_200C_200C_200C_206A_202A_202D_206B_206A_206B_200C_206F_206F_206D_200F_206A_202E_202E_200B_200C_200D_206E_202B_202D_202B_202B_206E_202E_200F_206A_206A_202E() + (long)timeout.TotalMilliseconds;
|
||||
_003Cdelay_003E5__4 = interval ?? DefaultInterval;
|
||||
num2 = 30471146;
|
||||
break;
|
||||
}
|
||||
continue;
|
||||
end_IL_0025:
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
_003C_003E1__state = -2;
|
||||
_003C_003Et__builder.SetException(exception);
|
||||
return;
|
||||
}
|
||||
_003C_003E1__state = -2;
|
||||
_003C_003Et__builder.SetResult(result);
|
||||
}
|
||||
|
||||
void IAsyncStateMachine.MoveNext()
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
|
||||
this.MoveNext();
|
||||
}
|
||||
|
||||
[DebuggerHidden]
|
||||
private void SetStateMachine(IAsyncStateMachine stateMachine)
|
||||
{
|
||||
_003C_003Et__builder.SetStateMachine(stateMachine);
|
||||
}
|
||||
|
||||
void IAsyncStateMachine.SetStateMachine(IAsyncStateMachine stateMachine)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in SetStateMachine
|
||||
this.SetStateMachine(stateMachine);
|
||||
}
|
||||
|
||||
static long _206C_202A_200D_202C_206C_206D_202B_206D_206E_202E_200C_200C_200C_206A_202A_202D_206B_206A_206B_200C_206F_206F_206D_200F_206A_202E_202E_200B_200C_200D_206E_202B_202D_202B_202B_206E_202E_200F_206A_206A_202E()
|
||||
{
|
||||
return Environment.TickCount64;
|
||||
}
|
||||
|
||||
static Task _202A_206C_202B_200B_200D_206F_202B_202C_202E_202B_206F_202E_200B_206A_206F_200D_200C_202E_202E_206E_202E_202E_202B_202E_202C_206F_206C_200B_206B_202A_202B_206A_202E_202C_202C_200E_206B_206B_200D_202E_202E(TimeSpan P_0, CancellationToken P_1)
|
||||
{
|
||||
return Task.Delay(P_0, P_1);
|
||||
}
|
||||
|
||||
static TaskAwaiter _200C_200E_200B_200D_202D_206B_202A_202D_206E_202E_202D_202B_206B_206C_200C_200E_206E_202D_206C_200C_202D_206A_206B_206D_206B_206E_202D_200B_206F_200E_206D_200F_206B_206D_202D_206A_202C_206A_200F_200D_202E(Task P_0)
|
||||
{
|
||||
return P_0.GetAwaiter();
|
||||
}
|
||||
}
|
||||
|
||||
private static readonly TimeSpan DefaultInterval = TimeSpan.FromMilliseconds(100L);
|
||||
|
||||
public static async Task<bool> PollUntilAsync(Func<bool> action, TimeSpan timeout, CancellationToken ct, TimeSpan? interval = null)
|
||||
{
|
||||
int num = 1451400517;
|
||||
long deadlineMs = default(long);
|
||||
bool infinite = default(bool);
|
||||
TimeSpan delay = default(TimeSpan);
|
||||
TaskAwaiter taskAwaiter = default(TaskAwaiter);
|
||||
TaskAwaiter taskAwaiter2 = default(TaskAwaiter);
|
||||
bool infinite = timeout < TimeSpan.Zero;
|
||||
long deadlineMs = Environment.TickCount64 + (long)timeout.TotalMilliseconds;
|
||||
TimeSpan delay = interval ?? DefaultInterval;
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 1451400516;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
ct.ThrowIfCancellationRequested();
|
||||
if (action())
|
||||
{
|
||||
case 9:
|
||||
ct.ThrowIfCancellationRequested();
|
||||
num = ((!action()) ? 1451400515 : 1451400516);
|
||||
break;
|
||||
case 0:
|
||||
return true;
|
||||
case 5:
|
||||
return false;
|
||||
case 8:
|
||||
num = ((_003CPollUntilAsync_003Ed__1._202D_200B_206E_202E_206F_200B_200F_202E_200D_202C_206B_206E_206E_206C_200D_202E_202C_206D_200B_202D_202D_206A_206C_202A_202E_202A_202B_200C_206E_202B_202C_200E_206F_200E_206D_200F_206D_206C_206F_202A_202E() < deadlineMs) ? 1451400518 : 1451400513);
|
||||
break;
|
||||
case 4:
|
||||
num = 1451400517;
|
||||
break;
|
||||
case 1:
|
||||
infinite = timeout < TimeSpan.Zero;
|
||||
deadlineMs = _003CPollUntilAsync_003Ed__1._202D_200B_206E_202E_206F_200B_200F_202E_200D_202C_206B_206E_206E_206C_200D_202E_202C_206D_200B_202D_202D_206A_206C_202A_202E_202A_202B_200C_206E_202B_202C_200E_206F_200E_206D_200F_206D_206C_206F_202A_202E() + (long)timeout.TotalMilliseconds;
|
||||
delay = interval ?? DefaultInterval;
|
||||
num = 1451400525;
|
||||
break;
|
||||
case 7:
|
||||
num = (infinite ? 1451400518 : 1451400524);
|
||||
break;
|
||||
case 2:
|
||||
taskAwaiter = _003CPollUntilAsync_003Ed__1._200C_202A_202A_202A_206C_206E_202C_206C_206A_200D_202D_200F_202B_200E_202D_202E_206F_206A_206F_200D_206E_202B_202D_200B_206D_202C_200B_206C_206C_200F_200D_206C_206D_206C_206F_202A_200C_206F_200C_206D_202E(_003CPollUntilAsync_003Ed__1._206B_202C_200F_200F_200C_202C_200E_200E_202B_202C_206C_200D_200E_206C_200F_206A_202C_206B_202B_206C_206F_200F_200C_206C_206F_202B_206E_202C_202A_200E_200B_202E_202C_202C_206A_200C_202A_206E_202B_206F_202E(delay, ct));
|
||||
num = (taskAwaiter.IsCompleted ? 1451400514 : 1451400519);
|
||||
break;
|
||||
case 6:
|
||||
taskAwaiter.GetResult();
|
||||
num = 1451400525;
|
||||
break;
|
||||
case 10:
|
||||
taskAwaiter = taskAwaiter2;
|
||||
taskAwaiter2 = default(TaskAwaiter);
|
||||
num = 1451400514;
|
||||
break;
|
||||
case 3:
|
||||
await taskAwaiter;
|
||||
num = 1451400526;
|
||||
}
|
||||
if (!infinite && Environment.TickCount64 >= deadlineMs)
|
||||
{
|
||||
break;
|
||||
}
|
||||
await Task.Delay(delay, ct);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static async Task<bool> PollUntilOnFrameworkAsync(this IFramework framework, Func<bool> action, TimeSpan timeout, CancellationToken ct, TimeSpan? interval = null)
|
||||
{
|
||||
long deadlineMs = default(long);
|
||||
TaskAwaiter taskAwaiter2 = default(TaskAwaiter);
|
||||
TimeSpan delay = default(TimeSpan);
|
||||
TaskAwaiter<bool> taskAwaiter = default(TaskAwaiter<bool>);
|
||||
TaskAwaiter taskAwaiter4 = default(TaskAwaiter);
|
||||
TaskAwaiter<bool> taskAwaiter3 = default(TaskAwaiter<bool>);
|
||||
bool infinite = default(bool);
|
||||
bool infinite = timeout < TimeSpan.Zero;
|
||||
long deadlineMs = Environment.TickCount64 + (long)timeout.TotalMilliseconds;
|
||||
TimeSpan delay = interval ?? DefaultInterval;
|
||||
while (true)
|
||||
{
|
||||
int num = 30471145;
|
||||
while (true)
|
||||
ct.ThrowIfCancellationRequested();
|
||||
if (await framework.RunOnFrameworkThread(action).WaitAsync(ct))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (!infinite && Environment.TickCount64 >= deadlineMs)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = 30471147;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
int num7;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
default:
|
||||
continue;
|
||||
case 6:
|
||||
num = ((_003CPollUntilOnFrameworkAsync_003Ed__2._206C_202A_200D_202C_206C_206D_202B_206D_206E_202E_200C_200C_200C_206A_202A_202D_206B_206A_206B_200C_206F_206F_206D_200F_206A_202E_202E_200B_200C_200D_206E_202B_202D_202B_202B_206E_202E_200F_206A_206A_202E() < deadlineMs) ? 30471143 : 30471142);
|
||||
continue;
|
||||
case 2:
|
||||
num = ((num7 == 1) ? 30471144 : 30471136);
|
||||
continue;
|
||||
case 12:
|
||||
taskAwaiter2 = _003CPollUntilOnFrameworkAsync_003Ed__2._200C_200E_200B_200D_202D_206B_202A_202D_206E_202E_202D_202B_206B_206C_200C_200E_206E_202D_206C_200C_202D_206A_206B_206D_206B_206E_202D_200B_206F_200E_206D_200F_206B_206D_202D_206A_202C_206A_200F_200D_202E(_003CPollUntilOnFrameworkAsync_003Ed__2._202A_206C_202B_200B_200D_206F_202B_202C_202E_202B_206F_202E_200B_206A_206F_200D_200C_202E_202E_206E_202E_202E_202B_202E_202C_206F_206C_200B_206B_202A_202B_206A_202E_202C_202C_200E_206B_206B_200D_202E_202E(delay, ct));
|
||||
num = (taskAwaiter2.IsCompleted ? 30471141 : 30471151);
|
||||
continue;
|
||||
case 13:
|
||||
return false;
|
||||
case 8:
|
||||
return true;
|
||||
case 1:
|
||||
ct.ThrowIfCancellationRequested();
|
||||
taskAwaiter = framework.RunOnFrameworkThread(action).WaitAsync(ct).GetAwaiter();
|
||||
num = (taskAwaiter.IsCompleted ? 30471138 : 30471150);
|
||||
continue;
|
||||
case 14:
|
||||
taskAwaiter2.GetResult();
|
||||
num = 30471146;
|
||||
continue;
|
||||
case 3:
|
||||
taskAwaiter2 = taskAwaiter4;
|
||||
taskAwaiter4 = default(TaskAwaiter);
|
||||
num7 = -1;
|
||||
num = 30471141;
|
||||
continue;
|
||||
case 9:
|
||||
num = ((!taskAwaiter.GetResult()) ? 30471147 : 30471139);
|
||||
continue;
|
||||
case 4:
|
||||
break;
|
||||
case 10:
|
||||
taskAwaiter = taskAwaiter3;
|
||||
taskAwaiter3 = default(TaskAwaiter<bool>);
|
||||
num7 = -1;
|
||||
num = 30471138;
|
||||
continue;
|
||||
case 0:
|
||||
num = (infinite ? 30471143 : 30471149);
|
||||
continue;
|
||||
case 7:
|
||||
num = 30471145;
|
||||
continue;
|
||||
case 5:
|
||||
await taskAwaiter;
|
||||
num = 30471137;
|
||||
continue;
|
||||
case 11:
|
||||
infinite = timeout < TimeSpan.Zero;
|
||||
deadlineMs = _003CPollUntilOnFrameworkAsync_003Ed__2._206C_202A_200D_202C_206C_206D_202B_206D_206E_202E_200C_200C_200C_206A_202A_202D_206B_206A_206B_200C_206F_206F_206D_200F_206A_202E_202E_200B_200C_200D_206E_202B_202D_202B_202B_206E_202E_200F_206A_206A_202E() + (long)timeout.TotalMilliseconds;
|
||||
delay = interval ?? DefaultInterval;
|
||||
num = 30471146;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
await taskAwaiter2;
|
||||
await Task.Delay(delay, ct);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,21 +12,9 @@ public readonly struct QuestDialogueText : IQuestDialogueText, IExcelRow<QuestDi
|
|||
|
||||
public uint RowOffset => _003Coffset_003EP;
|
||||
|
||||
public ReadOnlySeString Key => _202C_200E_200F_206D_206B_206A_206C_200D_202C_202A_206C_206D_200D_202E_200D_206F_206C_206F_202C_206E_206B_206C_202D_200F_200C_202B_206D_206F_206A_200F_202D_200B_200E_200E_200B_202B_200C_200C_200B_206E_202E(_003Cpage_003EP, (nuint)_003Coffset_003EP, (nuint)_003Coffset_003EP);
|
||||
public ReadOnlySeString Key => _003Cpage_003EP.ReadString(_003Coffset_003EP, _003Coffset_003EP);
|
||||
|
||||
public ReadOnlySeString Value
|
||||
{
|
||||
get
|
||||
{
|
||||
ExcelPage excelPage = _003Cpage_003EP;
|
||||
uint num = _003Coffset_003EP;
|
||||
int num2 = 4;
|
||||
int num3 = (int)num;
|
||||
int num4 = num3 ^ num2;
|
||||
int num5 = num3 & num2;
|
||||
return _202C_200E_200F_206D_206B_206A_206C_200D_202C_202A_206C_206D_200D_202E_200D_206F_206C_206F_202C_206E_206B_206C_202D_200F_200C_202B_206D_206F_206A_200F_202D_200B_200E_200E_200B_202B_200C_200C_200B_206E_202E(excelPage, (nuint)(uint)(num4 + (num5 + num5)), (nuint)_003Coffset_003EP);
|
||||
}
|
||||
}
|
||||
public ReadOnlySeString Value => _003Cpage_003EP.ReadString(_003Coffset_003EP + 4, _003Coffset_003EP);
|
||||
|
||||
public QuestDialogueText(ExcelPage page, uint offset, uint row)
|
||||
{
|
||||
|
|
@ -39,9 +27,4 @@ public readonly struct QuestDialogueText : IQuestDialogueText, IExcelRow<QuestDi
|
|||
{
|
||||
return new QuestDialogueText(page, offset, row);
|
||||
}
|
||||
|
||||
static ReadOnlySeString _202C_200E_200F_206D_206B_206A_206C_200D_202C_202A_206C_206D_200D_202E_200D_206F_206C_206F_202C_206E_206B_206C_202D_200F_200C_202B_206D_206F_206A_200F_202D_200B_200E_200E_200B_202B_200C_200C_200B_206E_202E(ExcelPage P_0, nuint P_1, nuint P_2)
|
||||
{
|
||||
return P_0.ReadString(P_1, P_2);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,44 +6,21 @@ public struct Throttle
|
|||
{
|
||||
private long _nextAllowedMs;
|
||||
|
||||
public readonly bool IsReady => _200F_202C_200C_202E_206A_206F_206E_206D_206C_202E_202E_202D_200B_206E_200D_200F_206F_202C_200D_200F_206C_200D_202E_206C_200D_202E_200C_206E_202A_206B_202E_202E_202C_206A_202E_200D_200E_206D_202D_206A_202E() >= _nextAllowedMs;
|
||||
public readonly bool IsReady => Environment.TickCount64 >= _nextAllowedMs;
|
||||
|
||||
public bool TryReset(double cooldownSeconds)
|
||||
{
|
||||
long num = _200F_202C_200C_202E_206A_206F_206E_206D_206C_202E_202E_202D_200B_206E_200D_200F_206F_202C_200D_200F_206C_200D_202E_206C_200D_202E_200C_206E_202A_206B_202E_202E_202C_206A_202E_200D_200E_206D_202D_206A_202E();
|
||||
int num2 = ((num >= _nextAllowedMs) ? (-1425131609) : (-1425131610));
|
||||
while (true)
|
||||
long tickCount = Environment.TickCount64;
|
||||
if (tickCount < _nextAllowedMs)
|
||||
{
|
||||
int num3 = num2;
|
||||
int num4 = -1425131609;
|
||||
int num5 = num3;
|
||||
switch ((num5 | num4) - (num5 & num4))
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
long num6 = (long)(cooldownSeconds * 1000.0);
|
||||
long num7 = num;
|
||||
_nextAllowedMs = (num7 | num6) + (num7 & num6);
|
||||
return true;
|
||||
}
|
||||
case 1:
|
||||
return false;
|
||||
case 2:
|
||||
goto IL_0073;
|
||||
}
|
||||
continue;
|
||||
IL_0073:
|
||||
num2 = -1425131610;
|
||||
return false;
|
||||
}
|
||||
_nextAllowedMs = tickCount + (long)(cooldownSeconds * 1000.0);
|
||||
return true;
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
_nextAllowedMs = 0L;
|
||||
}
|
||||
|
||||
static long _200F_202C_200C_202E_206A_206F_206E_206D_206C_202E_202E_202D_200B_206E_200D_200F_206F_202C_200D_200F_206C_200D_202E_206C_200D_202E_200C_206E_202A_206B_202E_202E_202C_206A_202E_200D_200E_206D_202D_206A_202E()
|
||||
{
|
||||
return Environment.TickCount64;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -2,8 +2,6 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Security.Cryptography;
|
||||
using System.Threading;
|
||||
using Questionable.Model.IO;
|
||||
|
|
@ -17,14 +15,7 @@ internal static class AssemblyQuestLoader
|
|||
|
||||
internal static TimeSpan? DecodeDuration { get; private set; }
|
||||
|
||||
internal static Stream QuestSchema
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
get
|
||||
{
|
||||
return _200E_200D_206A_200C_200B_200B_206F_200B_206D_206E_202A_206A_202A_202B_202E_206B_206F_200B_202A_202E_202B_206F_200C_202E_202E_206E_202D_200D_202B_202C_200B_200C_202A_200B_206A_206B_206F_200B_200E_202E(_202C_202D_200C_206D_202A_200E_200C_206B_206B_206B_206B_206B_206B_202D_206B_206E_206C_200D_206F_202B_200C_206B_202D_202A_206B_200F_202E_200E_200B_206F_200C_200F_206D_202D_200F_206D_206C_202B_206C_206C_202E(_202D_202C_202A_206B_202E_206C_206E_206B_200B_202A_200D_200D_202A_202A_206D_206C_200F_202C_206A_202D_200F_202B_202E_202E_206D_202E_206F_202E_200D_200F_206C_200E_202E_200E_206E_200E_202D_202D_206C_206F_202E(typeof(AssemblyQuestLoader).TypeHandle)), global::_003CModule_003E._206F_202D_200C_200B_206A_202E_206E_202A_200D_206A_202B_202C_200E_202B_200B_202C_200B_202C_206A_202D_206C_200C_206A_200D_200B_202A_206C_206F_206E_202E_200E_206A_202D_200B_200E_206E_200E_200D_202A_202E<string>(-1394732188));
|
||||
}
|
||||
}
|
||||
internal static Stream QuestSchema => typeof(AssemblyQuestLoader).Assembly.GetManifestResourceStream("Questionable.QuestPaths.QuestSchema");
|
||||
|
||||
internal static IReadOnlyDictionary<ElementId, QuestRoot> GetQuests()
|
||||
{
|
||||
|
|
@ -36,113 +27,19 @@ internal static class AssemblyQuestLoader
|
|||
return null;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
private static IReadOnlyDictionary<ElementId, QuestRoot> LoadQuests()
|
||||
{
|
||||
Stopwatch stopwatch = _200B_200E_200D_200D_202B_206F_200E_202A_206E_206E_202A_206B_202B_202E_206C_200E_202A_200B_206E_200C_202A_200D_200C_200F_206E_206F_200C_206B_200E_200F_206B_206B_206F_202E_202B_206F_206C_200B_202B_202E();
|
||||
Stream stream = _200E_200D_206A_200C_200B_200B_206F_200B_206D_206E_202A_206A_202A_202B_202E_206B_206F_200B_202A_202E_202B_206F_200C_202E_202E_206E_202D_200D_202B_202C_200B_200C_202A_200B_206A_206B_206F_200B_200E_202E(_202C_202D_200C_206D_202A_200E_200C_206B_206B_206B_206B_206B_206B_202D_206B_206E_206C_200D_206F_202B_200C_206B_202D_202A_206B_200F_202E_200E_200B_206F_200C_200F_206D_202D_200F_206D_206C_202B_206C_206C_202E(_202D_202C_202A_206B_202E_206C_206E_206B_200B_202A_200D_200D_202A_202A_206D_206C_200F_202C_206A_202D_200F_202B_202E_202E_206D_202E_206F_202E_200D_200F_206C_200E_202E_200E_206E_200E_202D_202D_206C_206F_202E(typeof(AssemblyQuestLoader).TypeHandle)), global::_003CModule_003E._200B_200F_206E_200E_206B_200B_200D_200E_200C_202C_200B_202C_200D_206F_206E_202E_202C_202B_202C_206B_206F_200F_206E_206B_206A_206B_200C_206A_200B_206A_200D_206C_206B_202E_200C_206E_202E_202D_200D_206D_202E<string>(-1192865642));
|
||||
try
|
||||
Stopwatch stopwatch = Stopwatch.StartNew();
|
||||
using Stream stream = typeof(AssemblyQuestLoader).Assembly.GetManifestResourceStream("Questionable.QuestPaths.QuestBundle");
|
||||
byte[] array = PathBundleSecret.Key();
|
||||
List<KeyValuePair<string, QuestRoot>> list = PathBundle.Deserialize<QuestRoot>(stream, array);
|
||||
CryptographicOperations.ZeroMemory(array);
|
||||
Dictionary<ElementId, QuestRoot> dictionary = new Dictionary<ElementId, QuestRoot>(list.Count);
|
||||
foreach (var (value, value2) in list)
|
||||
{
|
||||
byte[] array = PathBundleSecret.Key();
|
||||
List<KeyValuePair<string, QuestRoot>> list = PathBundle.Deserialize<QuestRoot>(stream, array);
|
||||
_206E_200C_206B_206D_206B_202E_206E_200F_202B_200C_200F_202D_202B_200E_206E_206D_202B_206C_200E_202E_202C_200B_202B_206F_202E_206B_202A_202C_200D_206A_200D_200B_206D_206B_206E_200B_202D_202E_206F_206D_202E((Span<byte>)array);
|
||||
Dictionary<ElementId, QuestRoot> dictionary = new Dictionary<ElementId, QuestRoot>(list.Count);
|
||||
using (List<KeyValuePair<string, QuestRoot>>.Enumerator enumerator = list.GetEnumerator())
|
||||
{
|
||||
int num = -221038175;
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -221038175;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
num = (enumerator.MoveNext() ? (-221038176) : (-221038174));
|
||||
break;
|
||||
case 1:
|
||||
var (text2, value) = (KeyValuePair<string, QuestRoot>)(ref enumerator.Current);
|
||||
dictionary[_200D_206F_200D_206E_200B_202D_206C_206A_202E_200C_206B_200D_200C_206D_200E_202C_206C_200E_206E_202D_200C_202C_200F_200E_202B_206E_206F_206E_200C_206C_202A_206A_206F_200E_202D_200E_206F_206E_206B_206F_202E(text2)] = value;
|
||||
num = -221038175;
|
||||
break;
|
||||
case 2:
|
||||
num = -221038175;
|
||||
break;
|
||||
case 3:
|
||||
goto end_IL_005c;
|
||||
}
|
||||
continue;
|
||||
end_IL_005c:
|
||||
break;
|
||||
}
|
||||
}
|
||||
DecodeDuration = _202A_206C_200C_202D_202A_202E_202C_206E_206E_206E_202C_202D_202B_200C_200F_200F_202E_206D_200D_206B_202E_202A_200B_202A_200E_200E_206A_200C_200F_202D_206D_206A_206B_202C_206B_202E_200C_200F_206F_206B_202E(stopwatch);
|
||||
return dictionary;
|
||||
dictionary[ElementId.FromString(value)] = value2;
|
||||
}
|
||||
finally
|
||||
{
|
||||
int num = ((stream == null) ? (-142648274) : (-142648275));
|
||||
while (true)
|
||||
{
|
||||
int num5 = num;
|
||||
int num3 = -142648273;
|
||||
int num4 = num5;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
num = -142648275;
|
||||
break;
|
||||
case 2:
|
||||
_202D_206B_200E_206C_202A_206B_206C_200E_206A_200D_206E_202E_200E_202A_206C_202C_200E_206E_200F_200F_202D_206E_202B_202C_206E_202D_202A_200F_202D_200C_202A_202C_202A_206A_202B_206F_206C_202C_206F_206D_202E((IDisposable)stream);
|
||||
num = -142648274;
|
||||
break;
|
||||
case 1:
|
||||
goto end_IL_013c;
|
||||
}
|
||||
continue;
|
||||
end_IL_013c:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static Type _202D_202C_202A_206B_202E_206C_206E_206B_200B_202A_200D_200D_202A_202A_206D_206C_200F_202C_206A_202D_200F_202B_202E_202E_206D_202E_206F_202E_200D_200F_206C_200E_202E_200E_206E_200E_202D_202D_206C_206F_202E(RuntimeTypeHandle P_0)
|
||||
{
|
||||
return Type.GetTypeFromHandle(P_0);
|
||||
}
|
||||
|
||||
static Assembly _202C_202D_200C_206D_202A_200E_200C_206B_206B_206B_206B_206B_206B_202D_206B_206E_206C_200D_206F_202B_200C_206B_202D_202A_206B_200F_202E_200E_200B_206F_200C_200F_206D_202D_200F_206D_206C_202B_206C_206C_202E(Type P_0)
|
||||
{
|
||||
return P_0.Assembly;
|
||||
}
|
||||
|
||||
static Stream _200E_200D_206A_200C_200B_200B_206F_200B_206D_206E_202A_206A_202A_202B_202E_206B_206F_200B_202A_202E_202B_206F_200C_202E_202E_206E_202D_200D_202B_202C_200B_200C_202A_200B_206A_206B_206F_200B_200E_202E(Assembly P_0, string P_1)
|
||||
{
|
||||
return P_0.GetManifestResourceStream(P_1);
|
||||
}
|
||||
|
||||
static Stopwatch _200B_200E_200D_200D_202B_206F_200E_202A_206E_206E_202A_206B_202B_202E_206C_200E_202A_200B_206E_200C_202A_200D_200C_200F_206E_206F_200C_206B_200E_200F_206B_206B_206F_202E_202B_206F_206C_200B_202B_202E()
|
||||
{
|
||||
return Stopwatch.StartNew();
|
||||
}
|
||||
|
||||
static void _206E_200C_206B_206D_206B_202E_206E_200F_202B_200C_200F_202D_202B_200E_206E_206D_202B_206C_200E_202E_202C_200B_202B_206F_202E_206B_202A_202C_200D_206A_200D_200B_206D_206B_206E_200B_202D_202E_206F_206D_202E(Span<byte> P_0)
|
||||
{
|
||||
CryptographicOperations.ZeroMemory(P_0);
|
||||
}
|
||||
|
||||
static ElementId _200D_206F_200D_206E_200B_202D_206C_206A_202E_200C_206B_200D_200C_206D_200E_202C_206C_200E_206E_202D_200C_202C_200F_200E_202B_206E_206F_206E_200C_206C_202A_206A_206F_200E_202D_200E_206F_206E_206B_206F_202E(string P_0)
|
||||
{
|
||||
return ElementId.FromString(P_0);
|
||||
}
|
||||
|
||||
static TimeSpan _202A_206C_200C_202D_202A_202E_202C_206E_206E_206E_202C_202D_202B_200C_200F_200F_202E_206D_200D_206B_202E_202A_200B_202A_200E_200E_206A_200C_200F_202D_206D_206A_206B_202C_206B_202E_200C_200F_206F_206B_202E(Stopwatch P_0)
|
||||
{
|
||||
return P_0.Elapsed;
|
||||
}
|
||||
|
||||
static void _202D_206B_200E_206C_202A_206B_206C_200E_206A_200D_206E_202E_200E_202A_206C_202C_200E_206E_200F_200F_202D_206E_202B_202C_206E_202D_202A_200F_202D_200C_202A_202C_202A_206A_202B_206F_206C_202C_206F_206D_202E(IDisposable P_0)
|
||||
{
|
||||
P_0.Dispose();
|
||||
DecodeDuration = stopwatch.Elapsed;
|
||||
return dictionary;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,66 +1,30 @@
|
|||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Questionable.QuestPaths;
|
||||
|
||||
internal static class PathBundleSecret
|
||||
{
|
||||
private static readonly byte[] A;
|
||||
private static readonly byte[] A = new byte[32]
|
||||
{
|
||||
14, 205, 205, 220, 252, 13, 221, 232, 100, 189,
|
||||
37, 224, 91, 77, 175, 255, 30, 195, 23, 136,
|
||||
234, 230, 125, 209, 122, 165, 20, 174, 100, 226,
|
||||
27, 222
|
||||
};
|
||||
|
||||
private static readonly byte[] B;
|
||||
private static readonly byte[] B = new byte[32]
|
||||
{
|
||||
241, 56, 43, 159, 122, 127, 111, 25, 223, 150,
|
||||
24, 59, 99, 24, 253, 141, 217, 107, 154, 16,
|
||||
247, 125, 175, 254, 169, 41, 27, 2, 18, 101,
|
||||
46, 175
|
||||
};
|
||||
|
||||
internal static byte[] Key()
|
||||
{
|
||||
byte[] array = new byte[A.Length];
|
||||
int num = 0;
|
||||
int num2 = 320407520;
|
||||
while (true)
|
||||
for (int i = 0; i < array.Length; i++)
|
||||
{
|
||||
int num3 = num2;
|
||||
int num4 = 320407521;
|
||||
int num5 = num3;
|
||||
switch ((num5 | num4) - (num5 & num4))
|
||||
{
|
||||
case 3:
|
||||
num2 = 320407520;
|
||||
break;
|
||||
case 0:
|
||||
return array;
|
||||
case 2:
|
||||
{
|
||||
int num6 = num;
|
||||
byte num7 = A[num];
|
||||
num4 = B[num];
|
||||
num5 = num7;
|
||||
int num8 = num5 + num4;
|
||||
int num9 = num5 & num4;
|
||||
array[num6] = (byte)(num8 - (num9 + num9));
|
||||
int num10 = num;
|
||||
num4 = 1;
|
||||
num5 = num10;
|
||||
num = (num5 | num4) + (num5 & num4);
|
||||
num2 = 320407520;
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
num2 = ((num < array.Length) ? 320407523 : 320407521);
|
||||
break;
|
||||
}
|
||||
array[i] = (byte)(A[i] ^ B[i]);
|
||||
}
|
||||
}
|
||||
|
||||
static PathBundleSecret()
|
||||
{
|
||||
byte[] array = new byte[32];
|
||||
_206B_200D_200D_200D_200F_202A_200E_202D_202B_206C_206B_206D_202E_202A_206D_206A_200E_200C_202D_206D_206C_202B_202B_206D_202D_202C_200C_202D_200D_206F_200F_206B_206F_206B_206E_200F_200E_200E_200C_202D_202E((Array)array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
|
||||
A = array;
|
||||
byte[] array2 = new byte[32];
|
||||
_206B_200D_200D_200D_200F_202A_200E_202D_202B_206C_206B_206D_202E_202A_206D_206A_200E_200C_202D_206D_206C_202B_202B_206D_202D_202C_200C_202D_200D_206F_200F_206B_206F_206B_206E_200F_200E_200E_200C_202D_202E((Array)array2, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
|
||||
B = array2;
|
||||
}
|
||||
|
||||
static void _206B_200D_200D_200D_200F_202A_200E_202D_202B_206C_206B_206D_202E_202A_206D_206A_200E_200C_202D_206D_206C_202B_202B_206D_202D_202C_200C_202D_200D_206F_200F_206B_206F_206B_206E_200F_200E_200E_200C_202D_202E(Array P_0, RuntimeFieldHandle P_1)
|
||||
{
|
||||
RuntimeHelpers.InitializeArray(P_0, P_1);
|
||||
return array;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
21
Questionable.LgbWorker/Questionable.LgbWorker.csproj
Normal file
21
Questionable.LgbWorker/Questionable.LgbWorker.csproj
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<AssemblyName>Questionable.LgbWorker</AssemblyName>
|
||||
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp1.0</TargetFramework>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<LangVersion>12.0</LangVersion>
|
||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup />
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<Reference Include="Lumina">
|
||||
<HintPath>C:\Users\Aly\AppData\Roaming\XIVLauncher\addon\Hooks\15.0.3.2\Lumina.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
using System.Numerics;
|
||||
|
||||
namespace Questionable.LgbWorker;
|
||||
|
||||
internal sealed record ExitRangeEntry(ushort SourceTerritoryId, uint InstanceId, Vector3 SourcePosition, ushort DestTerritoryId, uint DestInstanceId, uint ReturnInstanceId, Vector3 Rotation, Vector3 HalfExtents);
|
||||
21
Questionable.LgbWorker/Questionable.LgbWorker/LevelEntry.cs
Normal file
21
Questionable.LgbWorker/Questionable.LgbWorker/LevelEntry.cs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Questionable.LgbWorker;
|
||||
|
||||
internal sealed class LevelEntry
|
||||
{
|
||||
[JsonPropertyName("objectId")]
|
||||
public uint ObjectId { get; set; }
|
||||
|
||||
[JsonPropertyName("territoryId")]
|
||||
public ushort TerritoryId { get; set; }
|
||||
|
||||
[JsonPropertyName("x")]
|
||||
public float X { get; set; }
|
||||
|
||||
[JsonPropertyName("y")]
|
||||
public float Y { get; set; }
|
||||
|
||||
[JsonPropertyName("z")]
|
||||
public float Z { get; set; }
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue