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,66 @@
|
|||
using System.Collections.Generic;
|
||||
using Dalamud.Plugin.Services;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game.UI;
|
||||
using Lumina.Excel;
|
||||
using Lumina.Excel.Sheets;
|
||||
|
||||
namespace Questionable.Controller.DebugCommands;
|
||||
|
||||
internal sealed class TaxiCommandHandler : IDebugCommandHandler
|
||||
{
|
||||
private readonly IDataManager _dataManager;
|
||||
|
||||
private readonly IClientState _clientState;
|
||||
|
||||
private readonly IChatGui _chatGui;
|
||||
|
||||
public string CommandName => "taxi";
|
||||
|
||||
public TaxiCommandHandler(IDataManager dataManager, IClientState clientState, IChatGui chatGui)
|
||||
{
|
||||
_dataManager = dataManager;
|
||||
_clientState = clientState;
|
||||
_chatGui = chatGui;
|
||||
}
|
||||
|
||||
public unsafe void Execute(string[] arguments)
|
||||
{
|
||||
List<string> list = new List<string>();
|
||||
ExcelSheet<ChocoboTaxiStand> excelSheet = _dataManager.GetExcelSheet<ChocoboTaxiStand>();
|
||||
UIState* ptr = UIState.Instance();
|
||||
if (ptr == null)
|
||||
{
|
||||
_chatGui.PrintError("UIState is null", "Questionable", 576);
|
||||
return;
|
||||
}
|
||||
for (int i = 0; i < 192; i++)
|
||||
{
|
||||
uint num = (uint)(i + 1179648);
|
||||
try
|
||||
{
|
||||
if (excelSheet.HasRow(num) && ptr->IsChocoboTaxiStandUnlocked(num))
|
||||
{
|
||||
string value = excelSheet.GetRow(num).PlaceName.ToString();
|
||||
if (string.IsNullOrEmpty(value))
|
||||
{
|
||||
value = "Unknown";
|
||||
}
|
||||
list.Add($"{value} (ID: {i}, Row: 0x{num:X})");
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
_chatGui.Print($"Unlocked taxi stands ({list.Count}):", "Questionable", 576);
|
||||
if (list.Count == 0)
|
||||
{
|
||||
_chatGui.Print(" (No unlocked taxi stands found)", "Questionable", 576);
|
||||
return;
|
||||
}
|
||||
foreach (string item in list)
|
||||
{
|
||||
_chatGui.Print(" - " + item, "Questionable", 576);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue