using Dalamud.Plugin.Ipc;
using Dalamud.Plugin.Ipc.Exceptions;
using Dalamud.Plugin.Services;
+using JetBrains.Annotations;
using Microsoft.Extensions.Logging;
using Questionable.Model;
public void Dispose() => Stop();
+ [PublicAPI]
enum StateCommandType : byte
{
Off,
{
public EAetheryteLocation AetheryteLocation { get; set; }
- public ITask? With(EAetheryteLocation aetheryteLocation)
+ public ITask With(EAetheryteLocation aetheryteLocation)
{
AetheryteLocation = aetheryteLocation;
return this;
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)
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)
using System.Linq;
using Dalamud.Plugin.Services;
using Lumina.Excel.GeneratedSheets2;
-using Microsoft.Extensions.Logging;
namespace Questionable.Data;
{
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)