39 lines
899 B
C#
39 lines
899 B
C#
using System.Collections.Generic;
|
|
using Dalamud.Plugin.Services;
|
|
using FFXIVClientStructs.FFXIV.Client.Game;
|
|
|
|
namespace Questionable.Controller.DebugCommands;
|
|
|
|
internal sealed class FestivalsCommandHandler : IDebugCommandHandler
|
|
{
|
|
private readonly IChatGui _chatGui;
|
|
|
|
public string CommandName => "festivals";
|
|
|
|
public FestivalsCommandHandler(IChatGui chatGui)
|
|
{
|
|
_chatGui = chatGui;
|
|
}
|
|
|
|
public unsafe void Execute(string[] arguments)
|
|
{
|
|
List<string> list = new List<string>();
|
|
for (byte b = 0; b < 4; b++)
|
|
{
|
|
GameMain.Festival festival = GameMain.Instance()->ActiveFestivals[b];
|
|
if (festival.Id == 0)
|
|
{
|
|
list.Add($"Slot {b}: None");
|
|
}
|
|
else
|
|
{
|
|
list.Add($"Slot {b}: {festival.Id}({festival.Phase})");
|
|
}
|
|
}
|
|
_chatGui.Print("Festival slots:", "Questionable", 576);
|
|
foreach (string item in list)
|
|
{
|
|
_chatGui.Print(" " + item, "Questionable", 576);
|
|
}
|
|
}
|
|
}
|