muffin v7.38.8
This commit is contained in:
parent
5e2d8f648b
commit
3e10cbbbf2
51 changed files with 2585 additions and 1972 deletions
|
|
@ -0,0 +1,37 @@
|
|||
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<Mount>().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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue