diff --git a/ZodiacBuddy/BonusLight/BonusLightDuty.cs b/ZodiacBuddy/BonusLight/BonusLightDuty.cs index e2697e8..ee95c8f 100644 --- a/ZodiacBuddy/BonusLight/BonusLightDuty.cs +++ b/ZodiacBuddy/BonusLight/BonusLightDuty.cs @@ -18,7 +18,7 @@ public class BonusLightDuty { 292, new( 292, 16) }, // the Bowl of Embers (Hard) { 294, new( 294, 16) }, // the Howling Eye (Hard) { 293, new( 293, 16) }, // the Navel (Hard) - { 207, new( 207, 16) }, // Thornmarch (Hard) + { 1067, new(1067, 16) }, // Thornmarch (Hard) { 281, new( 281, 16) }, // the Whorleater (Hard) { 374, new( 374, 16) }, // the Striking Tree (Hard) { 377, new( 377, 16) }, // the Akh Afah Amphitheatre (Hard) @@ -79,10 +79,10 @@ public class BonusLightDuty { 361, new( 361, 48) }, // Hullbreaker Isle { 373, new( 373, 48) }, // the Tam–Tara Deepcroft (Hard) { 365, new( 365, 48) }, // the Stone Vigil (Hard) - { 371, new( 371, 48) }, // Snowcloak + { 1062, new(1062, 48) }, // Snowcloak { 387, new( 387, 48) }, // Sastasha (Hard) { 367, new( 367, 48) }, // the Sunken Temple of Qarn (Hard) - { 150, new( 150, 48) }, // the Keeper of the Lake + { 1063, new(1063, 48) }, // the Keeper of the Lake { 188, new( 188, 48) }, // the Wanderer's Palace (Hard) { 189, new( 189, 48) }, // Amdapor Keep (Hard) @@ -104,7 +104,7 @@ private BonusLightDuty(uint territoryId, uint defaultLightIntensity) .GetRow(territoryId)! .ContentFinderCondition.Value!.Name .ToDalamudString() - .ToString()!; + .ToString(); } /// @@ -133,4 +133,10 @@ public static BonusLightDuty GetValue(uint territoryID) /// True if the duty was found, otherwise false. public static bool TryGetValue(uint territoryID, out BonusLightDuty? duty) => Dataset.TryGetValue(territoryID, out duty); + + /// + /// Gets BonusLightDuty list. + /// + /// Dataset of the BonusLightDuty. + public static Dictionary GetDataset() => Dataset; } diff --git a/ZodiacBuddy/ConfigWindow.cs b/ZodiacBuddy/ConfigWindow.cs index 0e4a027..bc0762c 100644 --- a/ZodiacBuddy/ConfigWindow.cs +++ b/ZodiacBuddy/ConfigWindow.cs @@ -46,6 +46,9 @@ public override void Draw() if (ImGui.CollapsingHeader("Brave")) this.DrawBrave(); + + if (Service.Interface.IsDevMenuOpen && ImGui.CollapsingHeader("Debug")) + this.Debug(); } private void DrawGeneral() @@ -243,5 +246,11 @@ private void DrawBrave() ImGui.Spacing(); } + + private void Debug() + { + if (ImGui.Button("Check duties territory")) + DebugTools.CheckBonusLightDutyTerritories(); + } } } diff --git a/ZodiacBuddy/DebugTools.cs b/ZodiacBuddy/DebugTools.cs new file mode 100644 index 0000000..b74e16b --- /dev/null +++ b/ZodiacBuddy/DebugTools.cs @@ -0,0 +1,37 @@ +using Dalamud.Game.Text; +using Dalamud.Game.Text.SeStringHandling; +using ZodiacBuddy.BonusLight; + +namespace ZodiacBuddy +{ + /// + /// Static class used to store debug and check functions for dev. + /// + public static class DebugTools + { + /// + /// Check that all the territory id have a name in Lumina. + ///

+ /// If a territory doesn't have a name, it's id have probably changed and a message is display in chat. + ///

+ public static void CheckBonusLightDutyTerritories() + { + foreach (var bonusLightDuty in BonusLightDuty.GetDataset()) + { + if (string.IsNullOrWhiteSpace(bonusLightDuty.Value.DutyName)) + { + var sb = new SeStringBuilder() + .AddUiForeground(45) + .AddText("[ZodiacBuddy] ") + .AddUiForegroundOff() + .Append($"Invalid territory id {bonusLightDuty.Key}"); + Service.ChatGui.Print(new XivChatEntry + { + Type = XivChatType.Echo, + Message = sb.BuiltString, + }); + } + } + } + } +} \ No newline at end of file