forked from aly/qstbak
muffin v7.5.6
This commit is contained in:
parent
6266f9e6b7
commit
addf2d530f
619 changed files with 264792 additions and 446022 deletions
|
|
@ -1,7 +1,10 @@
|
|||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Dalamud.Game.Config;
|
||||
using Dalamud.Plugin.Services;
|
||||
using FFXIVClientStructs.FFXIV.Component.GUI;
|
||||
using FFXIVClientStructs.Interop;
|
||||
using LLib;
|
||||
using LLib.GameUI;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Questionable.Controller.Utils;
|
||||
|
|
@ -20,9 +23,9 @@ internal sealed class QteController : IDisposable
|
|||
|
||||
private readonly ILogger<QteController> _logger;
|
||||
|
||||
private long _throttler = Environment.TickCount64;
|
||||
private Throttle _throttle;
|
||||
|
||||
private readonly Random _random = new Random();
|
||||
private readonly Random _random = _206A_206D_200B_206B_202B_206B_206F_202C_200B_200C_202A_206B_206B_200F_206C_202E_206A_202D_202D_200E_206F_200B_206A_200B_206F_206F_202C_200D_200B_200C_202C_202E_202A_202E_202C_206D_206A_202C_200B_206B_202E();
|
||||
|
||||
private bool _hasDirectChat;
|
||||
|
||||
|
|
@ -35,79 +38,243 @@ internal sealed class QteController : IDisposable
|
|||
_gameConfig = gameConfig;
|
||||
_framework = framework;
|
||||
_logger = logger;
|
||||
_framework.Update += OnUpdate;
|
||||
_200C_206B_202C_202D_206D_202C_200B_202B_206E_206C_200E_206C_200D_206C_200B_206C_206C_200F_202D_202B_200B_206B_206C_200E_206C_200E_200E_206F_206A_206A_202B_206F_202E_206A_200D_206B_202E_200D_200E_202E_202E(_framework, (IFramework.OnUpdateDelegate)OnUpdate);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
private unsafe void OnUpdate(IFramework framework)
|
||||
{
|
||||
AtkUnitBase* addonPtr;
|
||||
if (!_configuration.General.AutoSolveQte)
|
||||
int num = (_configuration.General.AutoSolveQte ? (-1685552556) : (-1685552558));
|
||||
AtkUnitBase* addonPtr = default(AtkUnitBase*);
|
||||
while (true)
|
||||
{
|
||||
EnableDirectChatIfNeeded();
|
||||
}
|
||||
else if (_gameGui.TryGetAddonByName<AtkUnitBase>("QTE", out addonPtr) && LAddon.IsAddonReady(addonPtr) && addonPtr->IsVisible)
|
||||
{
|
||||
DisableDirectChatIfNeeded();
|
||||
if (Environment.TickCount64 >= _throttler)
|
||||
int num2 = num;
|
||||
int num3 = -1685552557;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
if (IsChatLogFocused())
|
||||
{
|
||||
WindowsKeypress.SendKeypress(WindowsKeypress.LimitedKeys.Escape);
|
||||
}
|
||||
case 3:
|
||||
_206B_202D_206C_206F_200D_200E_202D_202A_206B_206E_200E_200B_202C_206F_202C_206A_206D_200C_202E_206D_206C_200C_202B_206F_206B_206E_200B_206A_200C_200F_200C_200F_200D_206A_202B_202A_206F_200B_202D_202E((ILogger)_logger, global::_003CModule_003E._202E_206C_200F_206B_206A_202A_202C_206F_200C_206C_202B_206B_206D_206D_206D_202D_206E_202E_206C_206E_206D_202C_206F_200D_202D_202E_206A_206D_202A_206A_202B_200D_200C_206D_202B_200B_200D_200C_206E_206B_202E<string>(495416041), Array.Empty<object>());
|
||||
WindowsKeypress.SendKeypress(WindowsKeypress.LimitedKeys.Escape);
|
||||
num = -1685552559;
|
||||
break;
|
||||
case 5:
|
||||
EnableDirectChatIfNeeded();
|
||||
num = -1685552550;
|
||||
break;
|
||||
case 1:
|
||||
EnableDirectChatIfNeeded();
|
||||
return;
|
||||
case 0:
|
||||
num = ((!_206D_206D_200E_200E_206C_206A_202C_206D_200D_200D_206A_202B_202D_200E_206C_200E_206D_202B_206B_202C_206D_200D_206D_206F_200D_206F_200B_206C_202B_200F_200C_200F_206B_202D_206C_206E_206E_202C_200F_202C_202E(addonPtr)) ? (-1685552554) : (-1685552549));
|
||||
break;
|
||||
case 9:
|
||||
return;
|
||||
case 4:
|
||||
DisableDirectChatIfNeeded();
|
||||
num = ((!_throttle.TryReset((double)_206C_206E_200E_200C_202C_206C_202B_206C_202E_206E_206A_200B_206D_202B_202C_206B_202C_206C_200B_202B_206D_206D_206B_200B_206F_206F_202C_202D_206D_206C_206E_200C_200D_202C_202A_202D_206C_202C_200E_206F_202E(_random, 25, 50) / 1000.0)) ? (-1685552550) : (-1685552551));
|
||||
break;
|
||||
case 10:
|
||||
num = ((!IsChatLogFocused()) ? (-1685552559) : (-1685552560));
|
||||
break;
|
||||
case 6:
|
||||
num = -1685552558;
|
||||
break;
|
||||
case 7:
|
||||
num = ((!_gameGui.TryGetAddonByName<AtkUnitBase>(global::_003CModule_003E._200B_206B_206B_200E_200B_206A_206D_206B_206E_200F_206A_206F_206E_202B_200F_206C_202B_206D_206E_200F_200C_200E_206F_200D_200F_200B_202B_202B_202B_202B_206D_202C_206A_206D_200B_206E_200D_206A_206F_200F_202E<string>(-1397653892), out addonPtr)) ? (-1685552554) : (-1685552557));
|
||||
break;
|
||||
case 2:
|
||||
WindowsKeypress.SendKeypress(WindowsKeypress.LimitedKeys.A);
|
||||
_throttler = Environment.TickCount64 + _random.Next(25, 50);
|
||||
return;
|
||||
case 8:
|
||||
num = ((!addonPtr->IsVisible) ? (-1685552554) : (-1685552553));
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
EnableDirectChatIfNeeded();
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
private unsafe bool IsChatLogFocused()
|
||||
{
|
||||
AtkStage* ptr = AtkStage.Instance();
|
||||
if (ptr == null)
|
||||
int num = ((ptr != null) ? (-1746454886) : (-1746454891));
|
||||
int num5 = default(int);
|
||||
Span<Pointer<AtkUnitBase>> entries = default(Span<Pointer<AtkUnitBase>>);
|
||||
Pointer<AtkUnitBase> pointer = default(Pointer<AtkUnitBase>);
|
||||
while (true)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
Span<Pointer<AtkUnitBase>> entries = ptr->RaptureAtkUnitManager->AtkUnitManager.FocusedUnitsList.Entries;
|
||||
for (int i = 0; i < entries.Length; i++)
|
||||
{
|
||||
Pointer<AtkUnitBase> pointer = entries[i];
|
||||
if (pointer.Value != null && pointer.Value->NameString == "ChatLog")
|
||||
int num2 = num;
|
||||
int num3 = -1746454883;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 5:
|
||||
num = ((num5 < entries.Length) ? (-1746454887) : (-1746454885));
|
||||
break;
|
||||
case 8:
|
||||
return false;
|
||||
case 0:
|
||||
num = -1746454891;
|
||||
break;
|
||||
case 6:
|
||||
return false;
|
||||
case 3:
|
||||
return true;
|
||||
case 2:
|
||||
{
|
||||
int num6 = num5;
|
||||
num3 = 1;
|
||||
num4 = num6;
|
||||
int num7 = num4 ^ num3;
|
||||
int num8 = num4 & num3;
|
||||
num5 = num7 + (num8 + num8);
|
||||
num = -1746454888;
|
||||
break;
|
||||
}
|
||||
case 4:
|
||||
pointer = entries[num5];
|
||||
num = ((pointer.Value == null) ? (-1746454881) : (-1746454884));
|
||||
break;
|
||||
case 7:
|
||||
entries = ptr->RaptureAtkUnitManager->AtkUnitManager.FocusedUnitsList.Entries;
|
||||
num5 = 0;
|
||||
num = -1746454888;
|
||||
break;
|
||||
case 1:
|
||||
num = ((!_206D_200D_200D_206A_202C_200D_202A_206F_202C_206A_200D_200B_200E_202E_200E_200E_202D_200D_200F_202C_202A_200D_206B_206C_200F_202E_200C_206D_200B_200F_200F_206A_200D_202D_200C_206C_202E_206B_202C_202E_202E(pointer.Value->NameString, global::_003CModule_003E._202A_206B_206D_200C_206B_200E_200E_202A_200B_202E_206A_206F_206A_206B_200E_200D_200F_206D_206E_206A_206F_200C_206C_202C_202A_206E_202C_200B_206E_202A_206E_202B_206B_202E_202E_206A_206D_206D_202C_200F_202E<string>(-101701378))) ? (-1746454881) : (-1746454882));
|
||||
break;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
private void EnableDirectChatIfNeeded()
|
||||
{
|
||||
if (_hasDirectChat)
|
||||
int num = ((!_hasDirectChat) ? 514735225 : 514735226);
|
||||
while (true)
|
||||
{
|
||||
_gameConfig.UiControl.Set("DirectChat", _directChatWasEnabled);
|
||||
_hasDirectChat = false;
|
||||
int num2 = num;
|
||||
int num3 = 514735224;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 1:
|
||||
return;
|
||||
case 2:
|
||||
_202A_206D_202C_202A_200F_206B_200F_206D_200E_206E_200B_206F_202C_206B_206B_202A_206E_206F_202E_202E_200F_206F_206A_206E_200D_206C_206A_200C_206B_200D_200D_200E_206A_202C_200E_200C_202D_206D_202C_206E_202E(_200E_202C_206D_206C_200C_206E_200F_200F_200B_206E_200D_200D_206D_206C_206A_200C_206C_202E_202C_206C_206D_202E_202E_200C_206F_200E_206E_202B_200D_200D_200F_206B_200F_202C_200C_202B_206C_200D_202E(_gameConfig), global::_003CModule_003E._200B_206B_206B_200E_200B_206A_206D_206B_206E_200F_206A_206F_206E_202B_200F_206C_202B_206D_206E_200F_200C_200E_206F_200D_200F_200B_202B_202B_202B_202B_206D_202C_206A_206D_200B_206E_200D_206A_206F_200F_202E<string>(12163311), _directChatWasEnabled);
|
||||
_hasDirectChat = false;
|
||||
_206B_202D_206C_206F_200D_200E_202D_202A_206B_206E_200E_200B_202C_206F_202C_206A_206D_200C_202E_206D_206C_200C_202B_206F_206B_206E_200B_206A_200C_200F_200C_200F_200D_206A_202B_202A_206F_200B_202D_202E((ILogger)_logger, global::_003CModule_003E._202D_206D_206A_206E_202C_202B_200C_206C_200E_206A_206D_200E_206A_202A_200C_202E_206E_202C_206F_200B_206D_206F_200C_202C_200B_202B_200F_200B_206A_206F_200F_202E_206B_200E_202B_202A_200F_200B_202A_200E_202E<string>(-1824458648), new object[1] { _directChatWasEnabled });
|
||||
num = 514735225;
|
||||
break;
|
||||
case 0:
|
||||
num = 514735226;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
private void DisableDirectChatIfNeeded()
|
||||
{
|
||||
if (!_hasDirectChat && _gameConfig.UiControl.TryGetBool("DirectChat", out var value))
|
||||
int num = (_hasDirectChat ? 343908918 : 343908917);
|
||||
bool flag = default(bool);
|
||||
while (true)
|
||||
{
|
||||
_directChatWasEnabled = value;
|
||||
if (value)
|
||||
int num2 = num;
|
||||
int num3 = 343908918;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
_gameConfig.UiControl.Set("DirectChat", value: false);
|
||||
case 0:
|
||||
return;
|
||||
case 3:
|
||||
num = ((!_206B_206E_200C_206C_202A_202E_206A_206F_206D_206D_200E_200C_206D_200F_202E_202E_206F_206F_202D_202A_202A_206B_202E_200C_206A_206C_200E_200C_202A_200F_200C_206B_202A_200B_200E_206C_206D_202A_206B_200D_202E(_200E_202C_206D_206C_200C_206E_200F_200F_200B_206E_200D_200D_206D_206C_206A_200C_206C_202E_202C_206C_206D_202E_202E_200C_206F_200E_206E_202B_200D_200D_200F_206B_200F_202C_200C_202B_206C_200D_202E(_gameConfig), global::_003CModule_003E._202D_206D_206A_206E_202C_202B_200C_206C_200E_206A_206D_200E_206A_202A_200C_202E_206E_202C_206F_200B_206D_206F_200C_202C_200B_202B_200F_200B_206A_206F_200F_202E_206B_200E_202B_202A_200F_200B_202A_200E_202E<string>(1876854388), ref flag)) ? 343908918 : 343908916);
|
||||
break;
|
||||
case 5:
|
||||
_hasDirectChat = true;
|
||||
num = 343908918;
|
||||
break;
|
||||
case 1:
|
||||
_202A_206D_202C_202A_200F_206B_200F_206D_200E_206E_200B_206F_202C_206B_206B_202A_206E_206F_202E_202E_200F_206F_206A_206E_200D_206C_206A_200C_206B_200D_200D_200E_206A_202C_200E_200C_202D_206D_202C_206E_202E(_200E_202C_206D_206C_200C_206E_200F_200F_200B_206E_200D_200D_206D_206C_206A_200C_206C_202E_202C_206C_206D_202E_202E_200C_206F_200E_206E_202B_200D_200D_200F_206B_200F_202C_200C_202B_206C_200D_202E(_gameConfig), global::_003CModule_003E._202D_206D_206A_206E_202C_202B_200C_206C_200E_206A_206D_200E_206A_202A_200C_202E_206E_202C_206F_200B_206D_206F_200C_202C_200B_202B_200F_200B_206A_206F_200F_202E_206B_200E_202B_202A_200F_200B_202A_200E_202E<string>(1876854388), false);
|
||||
_206B_202D_206C_206F_200D_200E_202D_202A_206B_206E_200E_200B_202C_206F_202C_206A_206D_200C_202E_206D_206C_200C_202B_206F_206B_206E_200B_206A_200C_200F_200C_200F_200D_206A_202B_202A_206F_200B_202D_202E((ILogger)_logger, global::_003CModule_003E._202A_206B_206D_200C_206B_200E_200E_202A_200B_202E_206A_206F_206A_206B_200E_200D_200F_206D_206E_206A_206F_200C_206C_202C_202A_206E_202C_200B_206E_202A_206E_202B_206B_202E_202E_206A_206D_206D_202C_200F_202E<string>(1363621454), Array.Empty<object>());
|
||||
num = 343908915;
|
||||
break;
|
||||
case 4:
|
||||
num = 343908917;
|
||||
break;
|
||||
case 2:
|
||||
_directChatWasEnabled = flag;
|
||||
num = ((!flag) ? 343908915 : 343908919);
|
||||
break;
|
||||
}
|
||||
_hasDirectChat = true;
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
_framework.Update -= OnUpdate;
|
||||
_200D_200C_206B_206C_200F_200B_202B_202C_202E_200C_200E_202B_200E_200E_206A_200C_202A_202A_202D_206A_202C_202A_206D_202A_206F_206F_202B_206E_206B_200E_206E_202E_200B_200F_200B_202E_200E_202C_200F_206E_202E(_framework, (IFramework.OnUpdateDelegate)OnUpdate);
|
||||
EnableDirectChatIfNeeded();
|
||||
}
|
||||
|
||||
void IDisposable.Dispose()
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in Dispose
|
||||
this.Dispose();
|
||||
}
|
||||
|
||||
static Random _206A_206D_200B_206B_202B_206B_206F_202C_200B_200C_202A_206B_206B_200F_206C_202E_206A_202D_202D_200E_206F_200B_206A_200B_206F_206F_202C_200D_200B_200C_202C_202E_202A_202E_202C_206D_206A_202C_200B_206B_202E()
|
||||
{
|
||||
return new Random();
|
||||
}
|
||||
|
||||
static void _200C_206B_202C_202D_206D_202C_200B_202B_206E_206C_200E_206C_200D_206C_200B_206C_206C_200F_202D_202B_200B_206B_206C_200E_206C_200E_200E_206F_206A_206A_202B_206F_202E_206A_200D_206B_202E_200D_200E_202E_202E(IFramework P_0, IFramework.OnUpdateDelegate P_1)
|
||||
{
|
||||
P_0.Update += P_1;
|
||||
}
|
||||
|
||||
unsafe static bool _206D_206D_200E_200E_206C_206A_202C_206D_200D_200D_206A_202B_202D_200E_206C_200E_206D_202B_206B_202C_206D_200D_206D_206F_200D_206F_200B_206C_202B_200F_200C_200F_206B_202D_206C_206E_206E_202C_200F_202C_202E(AtkUnitBase* P_0)
|
||||
{
|
||||
return LAddon.IsAddonReady(P_0);
|
||||
}
|
||||
|
||||
static int _206C_206E_200E_200C_202C_206C_202B_206C_202E_206E_206A_200B_206D_202B_202C_206B_202C_206C_200B_202B_206D_206D_206B_200B_206F_206F_202C_202D_206D_206C_206E_200C_200D_202C_202A_202D_206C_202C_200E_206F_202E(Random P_0, int P_1, int P_2)
|
||||
{
|
||||
return P_0.Next(P_1, P_2);
|
||||
}
|
||||
|
||||
static void _206B_202D_206C_206F_200D_200E_202D_202A_206B_206E_200E_200B_202C_206F_202C_206A_206D_200C_202E_206D_206C_200C_202B_206F_206B_206E_200B_206A_200C_200F_200C_200F_200D_206A_202B_202A_206F_200B_202D_202E(ILogger P_0, string P_1, object[] P_2)
|
||||
{
|
||||
P_0.LogDebug(P_1, P_2);
|
||||
}
|
||||
|
||||
static bool _206D_200D_200D_206A_202C_200D_202A_206F_202C_206A_200D_200B_200E_202E_200E_200E_202D_200D_200F_202C_202A_200D_206B_206C_200F_202E_200C_206D_200B_200F_200F_206A_200D_202D_200C_206C_202E_206B_202C_202E_202E(string P_0, string P_1)
|
||||
{
|
||||
return P_0 == P_1;
|
||||
}
|
||||
|
||||
static GameConfigSection _200E_202C_206D_206C_200C_206E_200F_200F_200B_206E_200D_200D_206D_206C_206A_200C_206C_202E_202C_206C_206D_202E_202E_200C_206F_200E_206E_202B_200D_200D_200F_206B_200F_202C_200C_202B_206C_200D_202E(IGameConfig P_0)
|
||||
{
|
||||
return P_0.UiControl;
|
||||
}
|
||||
|
||||
static void _202A_206D_202C_202A_200F_206B_200F_206D_200E_206E_200B_206F_202C_206B_206B_202A_206E_206F_202E_202E_200F_206F_206A_206E_200D_206C_206A_200C_206B_200D_200D_200E_206A_202C_200E_200C_202D_206D_202C_206E_202E(GameConfigSection P_0, string P_1, bool P_2)
|
||||
{
|
||||
P_0.Set(P_1, P_2);
|
||||
}
|
||||
|
||||
static bool _206B_206E_200C_206C_202A_202E_206A_206F_206D_206D_200E_200C_206D_200F_202E_202E_206F_206F_202D_202A_202A_206B_202E_200C_206A_206C_200E_200C_202A_200F_200C_206B_202A_200B_200E_206C_206D_202A_206B_200D_202E(GameConfigSection P_0, string P_1, ref bool P_2)
|
||||
{
|
||||
return P_0.TryGetBool(P_1, out P_2);
|
||||
}
|
||||
|
||||
static void _200D_200C_206B_206C_200F_200B_202B_202C_202E_200C_200E_202B_200E_200E_206A_200C_202A_202A_202D_206A_202C_202A_206D_202A_206F_206F_202B_206E_206B_200E_206E_202E_200B_200F_200B_202E_200E_202C_200F_206E_202E(IFramework P_0, IFramework.OnUpdateDelegate P_1)
|
||||
{
|
||||
P_0.Update -= P_1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue