1
0
Fork 0
forked from aly/qstbak

muffin v7.5.12

This commit is contained in:
alydev 2026-08-19 13:19:57 +10:00
parent 3102923ce2
commit 911ed68baa
65 changed files with 2356 additions and 1539 deletions

View file

@ -11,6 +11,8 @@ internal sealed class RotationSolverRebornModule : ICombatModule, IDisposable
{
private const byte ModeOff = 0;
private const byte ModeManual = 3;
private const byte ModeHenched = 4;
private readonly ILogger<RotationSolverRebornModule> _logger;
@ -21,15 +23,12 @@ internal sealed class RotationSolverRebornModule : ICombatModule, IDisposable
private readonly ICallGateSubscriber<byte, object> _changeOperationMode;
private readonly ICallGateSubscriber<string, object, object> _setConfig;
public RotationSolverRebornModule(ILogger<RotationSolverRebornModule> logger, IDalamudPluginInterface pluginInterface, Configuration configuration)
{
_logger = logger;
_configuration = configuration;
_test = pluginInterface.GetIpcSubscriber<string, object>("RotationSolverReborn.Test");
_changeOperationMode = pluginInterface.GetIpcSubscriber<byte, object>("RotationSolverReborn.ChangeOperatingMode");
_setConfig = pluginInterface.GetIpcSubscriber<string, object, object>("RotationSolverReborn.SetConfig");
}
public bool IsAvailable()
@ -55,13 +54,20 @@ internal sealed class RotationSolverRebornModule : ICombatModule, IDisposable
}
public bool Start(CombatController.CombatData combatData)
{
return Start(3);
}
public bool StartForDuty()
{
return Start(4);
}
private bool Start(byte mode)
{
try
{
_changeOperationMode.InvokeAction(4);
SetConfig("AutoOffAfterCombat", false);
SetConfig("HealPartyMembers", true);
SetConfig("HostileType", 1);
_changeOperationMode.InvokeAction(mode);
return true;
}
catch (IpcError exception)
@ -101,16 +107,4 @@ internal sealed class RotationSolverRebornModule : ICombatModule, IDisposable
public void Dispose()
{
}
private void SetConfig(string key, object value)
{
try
{
_setConfig.InvokeAction(key, value);
}
catch (IpcError exception)
{
_logger.LogDebug(exception, "RSR SetConfig {Key} failed", key);
}
}
}