using Dalamud.Plugin.Services; using Lumina.Excel.Sheets; using Questionable.Functions; namespace Questionable.Controller.DebugCommands; internal sealed class MountIdCommandHandler : IDebugCommandHandler { private readonly GameFunctions _gameFunctions; private readonly IDataManager _dataManager; private readonly IChatGui _chatGui; public string CommandName => "mountid"; public MountIdCommandHandler(GameFunctions gameFunctions, IDataManager dataManager, IChatGui chatGui) { _gameFunctions = gameFunctions; _dataManager = dataManager; _chatGui = chatGui; } public void Execute(string[] arguments) { ushort? mountId = _gameFunctions.GetMountId(); if (mountId.HasValue) { Mount? rowOrDefault = _dataManager.GetExcelSheet().GetRowOrDefault(mountId.Value); _chatGui.Print($"Mount ID: {mountId}, Name: {rowOrDefault?.Singular}, Obtainable: {((rowOrDefault?.Order == -1) ? "No" : "Yes")}", "Questionable", 576); } else { _chatGui.Print("You are not mounted.", "Questionable", 576); } } }