Code cleanup
This commit is contained in:
parent
3c1ebdb403
commit
72c2858cae
@ -5,6 +5,7 @@ using Dalamud.Plugin;
|
||||
using Dalamud.Plugin.Ipc;
|
||||
using Dalamud.Plugin.Ipc.Exceptions;
|
||||
using Dalamud.Plugin.Services;
|
||||
using JetBrains.Annotations;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Questionable.Model;
|
||||
|
||||
@ -89,6 +90,7 @@ internal sealed class RotationSolverRebornModule : ICombatModule, IDisposable
|
||||
|
||||
public void Dispose() => Stop();
|
||||
|
||||
[PublicAPI]
|
||||
enum StateCommandType : byte
|
||||
{
|
||||
Off,
|
||||
|
@ -28,7 +28,7 @@ internal static class AethernetShard
|
||||
{
|
||||
public EAetheryteLocation AetheryteLocation { get; set; }
|
||||
|
||||
public ITask? With(EAetheryteLocation aetheryteLocation)
|
||||
public ITask With(EAetheryteLocation aetheryteLocation)
|
||||
{
|
||||
AetheryteLocation = aetheryteLocation;
|
||||
return this;
|
||||
|
@ -90,20 +90,20 @@ internal static class EquipItem
|
||||
return ETaskResult.StillRunning;
|
||||
}
|
||||
|
||||
private unsafe bool Equip()
|
||||
private unsafe void Equip()
|
||||
{
|
||||
var inventoryManager = InventoryManager.Instance();
|
||||
if (inventoryManager == null)
|
||||
return false;
|
||||
return;
|
||||
|
||||
var equippedContainer = inventoryManager->GetInventoryContainer(InventoryType.EquippedItems);
|
||||
if (equippedContainer == null)
|
||||
return false;
|
||||
return;
|
||||
|
||||
if (_targetSlots.Any(slot => equippedContainer->GetInventorySlot(slot)->ItemId == _itemId))
|
||||
{
|
||||
logger.LogInformation("Already equipped {Item}, skipping step", _item.Name?.ToString());
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (InventoryType sourceInventoryType in SourceInventoryTypes)
|
||||
@ -134,11 +134,9 @@ internal static class EquipItem
|
||||
int result = inventoryManager->MoveItemSlot(sourceInventoryType, sourceSlot,
|
||||
InventoryType.EquippedItems, targetSlot, 1);
|
||||
logger.LogInformation("MoveItemSlot result: {Result}", result);
|
||||
return result == 0;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private static List<ushort>? GetEquipSlot(Item item)
|
||||
|
@ -2,7 +2,6 @@
|
||||
using System.Linq;
|
||||
using Dalamud.Plugin.Services;
|
||||
using Lumina.Excel.GeneratedSheets2;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Questionable.Data;
|
||||
|
||||
@ -10,7 +9,7 @@ internal sealed class AetherCurrentData
|
||||
{
|
||||
private readonly ImmutableDictionary<ushort, ImmutableList<uint>> _overworldCurrents;
|
||||
|
||||
public AetherCurrentData(IDataManager dataManager, ILogger<AetherCurrentData> logger)
|
||||
public AetherCurrentData(IDataManager dataManager)
|
||||
{
|
||||
_overworldCurrents = dataManager.GetExcelSheet<AetherCurrentCompFlgSet>()!
|
||||
.Where(x => x.RowId > 0)
|
||||
|
Loading…
Reference in New Issue
Block a user