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,6 +1,11 @@
|
|||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Dalamud.Game.ClientState.Objects.SubKinds;
|
||||
using Dalamud.Game.ClientState.Objects.Types;
|
||||
using Dalamud.Plugin.Ipc.Exceptions;
|
||||
using Dalamud.Plugin.Services;
|
||||
using Lumina.Excel;
|
||||
using Lumina.Excel.Sheets;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Questionable.External;
|
||||
|
||||
|
|
@ -14,61 +19,210 @@ internal sealed class BossModModule : ICombatModule, IDisposable
|
|||
|
||||
private readonly Configuration _configuration;
|
||||
|
||||
public BossModModule(ILogger<BossModModule> logger, BossModIpc bossModIpc, Configuration configuration)
|
||||
private readonly IObjectTable _objectTable;
|
||||
|
||||
public BossModModule(ILogger<BossModModule> logger, BossModIpc bossModIpc, Configuration configuration, IObjectTable objectTable)
|
||||
{
|
||||
_logger = logger;
|
||||
_bossModIpc = bossModIpc;
|
||||
_configuration = configuration;
|
||||
_objectTable = objectTable;
|
||||
}
|
||||
|
||||
public bool CanHandleFight(CombatController.CombatData combatData)
|
||||
{
|
||||
if (_configuration.General.CombatModule != Configuration.ECombatModule.BossMod)
|
||||
int num = ((_configuration.General.CombatModule == Configuration.ECombatModule.BossMod) ? (-1465780808) : (-1465780807));
|
||||
while (true)
|
||||
{
|
||||
return false;
|
||||
int num2 = num;
|
||||
int num3 = -1465780808;
|
||||
int num4 = num2;
|
||||
switch ((num4 | num3) - (num4 & num3))
|
||||
{
|
||||
case 0:
|
||||
return _bossModIpc.IsSupported();
|
||||
case 1:
|
||||
return false;
|
||||
case 2:
|
||||
goto IL_005f;
|
||||
}
|
||||
continue;
|
||||
IL_005f:
|
||||
num = -1465780807;
|
||||
}
|
||||
return _bossModIpc.IsSupported();
|
||||
}
|
||||
|
||||
bool ICombatModule.CanHandleFight(CombatController.CombatData combatData)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in CanHandleFight
|
||||
return this.CanHandleFight(combatData);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public bool Start(CombatController.CombatData combatData)
|
||||
{
|
||||
try
|
||||
{
|
||||
_bossModIpc.SetPreset(BossModIpc.EPreset.Overworld);
|
||||
return true;
|
||||
_200F_202B_206D_200D_202A_206D_206B_200D_206F_206C_202D_202B_200E_202B_202A_200C_202C_206C_206B_206F_206A_202B_206E_206A_200F_202D_206A_200F_206E_200D_202E_202B_200D_202E_202C_202C_200B_200C_200F_206B_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>(460354770), new object[1] { combatData.SpawnType });
|
||||
int num = (_bossModIpc.EnableAi(BossModIpc.EPreset.Active) ? (-1132234490) : (-1132234488));
|
||||
byte? b = default(byte?);
|
||||
bool flag = default(bool);
|
||||
IPlayerCharacter playerCharacter = default(IPlayerCharacter);
|
||||
while (true)
|
||||
{
|
||||
int num2 = num;
|
||||
int num3 = -1132234496;
|
||||
int num4 = num2;
|
||||
int num5 = num4 + num3;
|
||||
int num6 = num4 & num3;
|
||||
switch (num5 - (num6 + num6))
|
||||
{
|
||||
case 5:
|
||||
{
|
||||
byte valueOrDefault = b.GetValueOrDefault();
|
||||
num3 = 3;
|
||||
num4 = valueOrDefault;
|
||||
num = (((uint)(~(~num4 + num3)) > 1u) ? (-1132234489) : (-1132234494));
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
flag = true;
|
||||
num = -1132234493;
|
||||
break;
|
||||
case 1:
|
||||
b = _200C_202E_206E_200C_206E_206E_202C_200F_200C_200F_200B_200B_200C_206A_202A_206C_206E_206C_206D_206D_202D_200F_202B_206C_200B_206B_206E_200F_200E_206A_202A_202C_200D_206D_202D_206F_206E_202A_206B_200E_202E((ICharacter)playerCharacter).ValueNullable?.Role;
|
||||
num = ((!b.HasValue) ? (-1132234489) : (-1132234491));
|
||||
break;
|
||||
case 3:
|
||||
{
|
||||
bool flag2 = flag;
|
||||
ILogger<BossModModule> logger = _logger;
|
||||
string text = 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>(305098006);
|
||||
object[] obj = new object[2] { flag2, null };
|
||||
ClassJob? valueNullable = _200C_202E_206E_200C_206E_206E_202C_200F_200C_200F_200B_200B_200C_206A_202A_206C_206E_206C_206D_206D_202D_200F_202B_206C_200B_206B_206E_200F_200E_206A_202A_202C_200D_206D_202D_206F_206E_202A_206B_200E_202E((ICharacter)playerCharacter).ValueNullable;
|
||||
byte? b2;
|
||||
if (!valueNullable.HasValue)
|
||||
{
|
||||
b = null;
|
||||
b2 = b;
|
||||
}
|
||||
else
|
||||
{
|
||||
b2 = valueNullable.GetValueOrDefault().Role;
|
||||
}
|
||||
obj[1] = b2;
|
||||
_200F_202B_206D_200D_202A_206D_206B_200D_206F_206C_202D_202B_200E_202B_202A_200C_202C_206C_206B_206F_206A_202B_206E_206A_200F_202D_206A_200F_206E_200D_202E_202B_200D_202E_202C_202C_200B_200C_200F_206B_202E((ILogger)logger, text, obj);
|
||||
_bossModIpc.SetRangeStrategy(BossModIpc.EPreset.Active, flag2);
|
||||
num = -1132234492;
|
||||
break;
|
||||
}
|
||||
case 6:
|
||||
playerCharacter = _206F_206B_200B_206F_200D_206E_202C_206B_202D_200F_202D_202A_206D_206C_202E_200E_200D_200F_206B_206E_202A_206D_206F_200D_200F_200E_206A_200E_206B_206C_200D_200F_206F_206E_202E_202E_206F_206E_200E_202A_202E(_objectTable);
|
||||
num = ((playerCharacter == null) ? (-1132234492) : (-1132234495));
|
||||
break;
|
||||
case 8:
|
||||
_200E_202D_202D_206F_206D_202D_206D_206A_200B_200D_206E_206A_206E_200B_200B_200C_206E_206E_206E_200D_202B_206A_202C_202E_206B_200D_206A_202C_200E_206D_202E_202C_202A_200F_200D_202C_202B_206F_202E_202B_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>(-651638394), Array.Empty<object>());
|
||||
return false;
|
||||
case 0:
|
||||
num = -1132234488;
|
||||
break;
|
||||
case 7:
|
||||
flag = false;
|
||||
num = -1132234493;
|
||||
break;
|
||||
case 4:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (IpcError exception)
|
||||
catch (IpcError ipcError)
|
||||
{
|
||||
_logger.LogWarning(exception, "Could not start combat");
|
||||
_206E_206C_202C_202E_200F_206E_206B_206D_202B_202E_202C_202A_200D_200B_206B_200F_202E_202C_202B_206B_200E_202D_200B_206D_200B_206B_200C_202E_206B_206D_206F_200E_200E_202D_200E_206E_206A_202C_202A_206C_202E((ILogger)_logger, (Exception)ipcError, 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>(-1300221531), Array.Empty<object>());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool ICombatModule.Start(CombatController.CombatData combatData)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in Start
|
||||
return this.Start(combatData);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public bool Stop()
|
||||
{
|
||||
try
|
||||
{
|
||||
_bossModIpc.ClearPreset();
|
||||
_bossModIpc.DisableAi();
|
||||
return true;
|
||||
}
|
||||
catch (IpcError exception)
|
||||
catch (IpcError ipcError)
|
||||
{
|
||||
_logger.LogWarning(exception, "Could not turn off combat");
|
||||
_206E_206C_202C_202E_200F_206E_206B_206D_202B_202E_202C_202A_200D_200B_206B_200F_202E_202C_202B_206B_200E_202D_200B_206D_200B_206B_200C_202E_206B_206D_206F_200E_200E_202D_200E_206E_206A_202C_202A_206C_202E((ILogger)_logger, (Exception)ipcError, global::_003CModule_003E._206C_202A_206D_206A_206E_202A_202B_206F_206D_200F_202D_200F_202D_206A_202C_202B_206D_206A_200E_200E_202D_202D_200D_200C_200D_200D_206D_206E_202A_200F_206E_206C_206D_206A_206D_202B_200F_200D_206E_200C_202E<string>(-52047300), Array.Empty<object>());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool ICombatModule.Stop()
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in Stop
|
||||
return this.Stop();
|
||||
}
|
||||
|
||||
public void Update(IGameObject gameObject)
|
||||
{
|
||||
}
|
||||
|
||||
void ICombatModule.Update(IGameObject gameObject)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in Update
|
||||
this.Update(gameObject);
|
||||
}
|
||||
|
||||
public bool CanAttack(IBattleNpc target)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ICombatModule.CanAttack(IBattleNpc target)
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in CanAttack
|
||||
return this.CanAttack(target);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Stop();
|
||||
}
|
||||
|
||||
void IDisposable.Dispose()
|
||||
{
|
||||
//ILSpy generated this explicit interface implementation from .override directive in Dispose
|
||||
this.Dispose();
|
||||
}
|
||||
|
||||
static void _200F_202B_206D_200D_202A_206D_206B_200D_206F_206C_202D_202B_200E_202B_202A_200C_202C_206C_206B_206F_206A_202B_206E_206A_200F_202D_206A_200F_206E_200D_202E_202B_200D_202E_202C_202C_200B_200C_200F_206B_202E(ILogger P_0, string P_1, object[] P_2)
|
||||
{
|
||||
P_0.LogDebug(P_1, P_2);
|
||||
}
|
||||
|
||||
static void _200E_202D_202D_206F_206D_202D_206D_206A_200B_200D_206E_206A_206E_200B_200B_200C_206E_206E_206E_200D_202B_206A_202C_202E_206B_200D_206A_202C_200E_206D_202E_202C_202A_200F_200D_202C_202B_206F_202E_202B_202E(ILogger P_0, string P_1, object[] P_2)
|
||||
{
|
||||
P_0.LogWarning(P_1, P_2);
|
||||
}
|
||||
|
||||
static IPlayerCharacter _206F_206B_200B_206F_200D_206E_202C_206B_202D_200F_202D_202A_206D_206C_202E_200E_200D_200F_206B_206E_202A_206D_206F_200D_200F_200E_206A_200E_206B_206C_200D_200F_206F_206E_202E_202E_206F_206E_200E_202A_202E(IObjectTable P_0)
|
||||
{
|
||||
return P_0.LocalPlayer;
|
||||
}
|
||||
|
||||
static RowRef<ClassJob> _200C_202E_206E_200C_206E_206E_202C_200F_200C_200F_200B_200B_200C_206A_202A_206C_206E_206C_206D_206D_202D_200F_202B_206C_200B_206B_206E_200F_200E_206A_202A_202C_200D_206D_202D_206F_206E_202A_206B_200E_202E(ICharacter P_0)
|
||||
{
|
||||
return P_0.ClassJob;
|
||||
}
|
||||
|
||||
static void _206E_206C_202C_202E_200F_206E_206B_206D_202B_202E_202C_202A_200D_200B_206B_200F_202E_202C_202B_206B_200E_202D_200B_206D_200B_206B_200C_202E_206B_206D_206F_200E_200E_202D_200E_206E_206A_202C_202A_206C_202E(ILogger P_0, Exception P_1, string P_2, object[] P_3)
|
||||
{
|
||||
P_0.LogWarning(P_1, P_2, P_3);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue