-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from Hiroa/fix/35
Fix #35 and add debug tool to detect duty with new territory id
- Loading branch information
Showing
3 changed files
with
56 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using Dalamud.Game.Text; | ||
using Dalamud.Game.Text.SeStringHandling; | ||
using ZodiacBuddy.BonusLight; | ||
|
||
namespace ZodiacBuddy | ||
{ | ||
/// <summary> | ||
/// Static class used to store debug and check functions for dev. | ||
/// </summary> | ||
public static class DebugTools | ||
{ | ||
/// <summary> | ||
/// Check that all the territory id have a name in Lumina. | ||
/// <p/> | ||
/// If a territory doesn't have a name, it's id have probably changed and a message is display in chat. | ||
/// </summary> | ||
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, | ||
}); | ||
} | ||
} | ||
} | ||
} | ||
} |