From 44d33a0b56924268748aea0387fef225e5335cdd Mon Sep 17 00:00:00 2001 From: alydev Date: Sat, 18 Oct 2025 23:54:48 +1000 Subject: [PATCH] muffin v6.27 --- .../AssemblyQuestLoader.cs | 2 +- .../Interact.cs | 2 +- .../SkipCondition.cs | 21 ++++---- .../Questionable.Controller/CommandHandler.cs | 50 +++++++++++++++---- .../Questionable.Functions/GameFunctions.cs | 2 +- Questionable/Questionable.csproj | 3 ++ 6 files changed, 59 insertions(+), 21 deletions(-) diff --git a/QuestPaths/Questionable.QuestPaths/AssemblyQuestLoader.cs b/QuestPaths/Questionable.QuestPaths/AssemblyQuestLoader.cs index cdef72f..3f458c2 100644 --- a/QuestPaths/Questionable.QuestPaths/AssemblyQuestLoader.cs +++ b/QuestPaths/Questionable.QuestPaths/AssemblyQuestLoader.cs @@ -48793,7 +48793,7 @@ public static class AssemblyQuestLoader span[index] = "liza"; questRoot13.Author = list119; questRoot13.IsSeasonalQuest = true; - questRoot13.SeasonalQuestExpiry = new DateTime(2025, 12, 23, 0, 0, 0, DateTimeKind.Utc); + questRoot13.SeasonalQuestExpiry = new DateTime(2025, 12, 23, 14, 59, 0, DateTimeKind.Utc); index = 1; List list120 = new List(index); CollectionsMarshal.SetCount(list120, index); diff --git a/Questionable/Questionable.Controller.Steps.Interactions/Interact.cs b/Questionable/Questionable.Controller.Steps.Interactions/Interact.cs index a7c2104..40fa3db 100644 --- a/Questionable/Questionable.Controller.Steps.Interactions/Interact.cs +++ b/Questionable/Questionable.Controller.Steps.Interactions/Interact.cs @@ -235,7 +235,7 @@ internal static class Interact if (taxiStandId.HasValue) { byte valueOrDefault2 = taxiStandId.GetValueOrDefault(); - if (UIState.Instance()->IsChocoboTaxiStandUnlocked(valueOrDefault2)) + if (UIState.Instance()->IsChocoboTaxiStandUnlocked((uint)(valueOrDefault2 + 1179648))) { return ETaskResult.TaskComplete; } diff --git a/Questionable/Questionable.Controller.Steps.Shared/SkipCondition.cs b/Questionable/Questionable.Controller.Steps.Shared/SkipCondition.cs index 44efb20..cfc4413 100644 --- a/Questionable/Questionable.Controller.Steps.Shared/SkipCondition.cs +++ b/Questionable/Questionable.Controller.Steps.Shared/SkipCondition.cs @@ -302,15 +302,18 @@ internal static class SkipCondition private bool CheckAetherCurrentCondition(QuestStep step) { - if (step != null && step.DataId.HasValue && step.InteractionType == EInteractionType.AttuneAetherCurrent && gameFunctions.IsAetherCurrentUnlocked(step.DataId.Value)) + if (step.InteractionType == EInteractionType.AttuneAetherCurrent) { - logger.LogInformation("Skipping step, as current is unlocked"); - return true; - } - if (step != null && step.InteractionType == EInteractionType.AttuneAetherCurrent && configuration.Advanced.SkipAetherCurrents) - { - logger.LogInformation("Skipping step, as aether currents should be skipped"); - return true; + if (configuration.Advanced.SkipAetherCurrents) + { + logger.LogInformation("Skipping step, as aether currents should be skipped"); + return true; + } + if (step.DataId.HasValue && gameFunctions.IsAetherCurrentUnlocked(step.DataId.Value)) + { + logger.LogInformation("Skipping step, as current is unlocked"); + return true; + } } return false; } @@ -435,7 +438,7 @@ internal static class SkipCondition if (taxiStandId.HasValue) { byte valueOrDefault = taxiStandId.GetValueOrDefault(); - if (ptr->IsChocoboTaxiStandUnlocked(valueOrDefault)) + if (ptr->IsChocoboTaxiStandUnlocked((uint)(valueOrDefault + 1179648))) { logger.LogInformation("Skipping step, as taxi stand {TaxiStandId} is unlocked", valueOrDefault); return true; diff --git a/Questionable/Questionable.Controller/CommandHandler.cs b/Questionable/Questionable.Controller/CommandHandler.cs index bc1afd0..0101485 100644 --- a/Questionable/Questionable.Controller/CommandHandler.cs +++ b/Questionable/Questionable.Controller/CommandHandler.cs @@ -215,18 +215,40 @@ internal sealed class CommandHandler : IDisposable List list3 = new List(); ExcelSheet excelSheet = _dataManager.GetExcelSheet(); UIState* ptr = UIState.Instance(); - for (byte b2 = 0; b2 < ptr->UnlockedChocoboTaxiStandsBitmask.Length * 8; b2++) + if (ptr == null) { - if (ptr->IsChocoboTaxiStandUnlocked(b2)) + _chatGui.PrintError("UIState is null", "Questionable", 576); + break; + } + 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"; + } + list3.Add($"{value} (ID: {i}, Row: 0x{num:X})"); + } + } + catch { - list3.Add($"{excelSheet.GetRow((uint)(b2 + 1179648)).PlaceName} ({b2})"); } } - _chatGui.Print("Unlocked taxi stands:", "Questionable", 576); + _chatGui.Print($"Unlocked taxi stands ({list3.Count}):", "Questionable", 576); + if (list3.Count == 0) + { + _chatGui.Print(" (No unlocked taxi stands found)", "Questionable", 576); + break; + } { foreach (string item in list3) { - _chatGui.Print("- " + item, "Questionable", 576); + _chatGui.Print(" - " + item, "Questionable", 576); } break; } @@ -237,13 +259,23 @@ internal sealed class CommandHandler : IDisposable for (byte b = 0; b < 4; b++) { GameMain.Festival festival = GameMain.Instance()->ActiveFestivals[b]; - if (festival.Id != 0) + if (festival.Id == 0) { - list.Add($"{festival.Id}({festival.Phase})"); + list.Add($"Slot {b}: None"); + } + else + { + list.Add($"Slot {b}: {festival.Id}({festival.Phase})"); } } - _chatGui.Print("Active festivals: " + string.Join(", ", list), "Questionable", 576); - break; + _chatGui.Print("Festival slots:", "Questionable", 576); + { + foreach (string item2 in list) + { + _chatGui.Print(" " + item2, "Questionable", 576); + } + break; + } } } } diff --git a/Questionable/Questionable.Functions/GameFunctions.cs b/Questionable/Questionable.Functions/GameFunctions.cs index ea06f02..c33a64e 100644 --- a/Questionable/Questionable.Functions/GameFunctions.cs +++ b/Questionable/Questionable.Functions/GameFunctions.cs @@ -534,7 +534,7 @@ internal sealed class GameFunctions return Array.Empty(); } List list = new List(); - for (uint num = 0u; num < ptr->UnlockLinkBitmask.Length * 8; num++) + for (uint num = 0u; num < ptr->UnlockLinksBitArray.ByteLength * 8; num++) { if (ptr->IsUnlockLinkUnlocked(num)) { diff --git a/Questionable/Questionable.csproj b/Questionable/Questionable.csproj index d534432..00d3a38 100644 --- a/Questionable/Questionable.csproj +++ b/Questionable/Questionable.csproj @@ -56,6 +56,9 @@ ..\..\JsonSchema.Net.dll + + C:\Users\Aly\AppData\Roaming\XIVLauncher\addon\Hooks\dev\InteropGenerator.Runtime.dll + ..\..\NotificationMasterAPI.dll