From d3ce9bbd1d36834aeaaad82af21a242e26bf5f5f Mon Sep 17 00:00:00 2001 From: kalilistic <35899782+kalilistic@users.noreply.github.com> Date: Sat, 21 Oct 2023 15:00:00 -0400 Subject: [PATCH] feat: add IsTestDC func --- .../Extensions/DataManagerExtensions.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Dalamud.DrunkenToad/Extensions/DataManagerExtensions.cs b/Dalamud.DrunkenToad/Extensions/DataManagerExtensions.cs index 7d79db1..abebd7d 100644 --- a/Dalamud.DrunkenToad/Extensions/DataManagerExtensions.cs +++ b/Dalamud.DrunkenToad/Extensions/DataManagerExtensions.cs @@ -169,6 +169,18 @@ public static uint WorldId(this IDataManager value, string worldName) /// world name. public static string WorldName(this IDataManager value, uint worldId) => value.GetExcelSheet()?.GetRow(worldId)?.Name.ToString() ?? string.Empty; + /// + /// Get indicator whether world is a test data center. + /// + /// data manager. + /// world id. + /// indicator whether world is a test data center. + public static bool IsTestDC(this IDataManager value, uint worldId) + { + var world = value.GetExcelSheet()?.GetRow(worldId); + return world?.DataCenter?.Value?.RowId == 12; + } + private static uint GetContentId(IDataManager value, ushort territoryType) => value.GetExcelSheet() ! .FirstOrDefault(condition => condition.TerritoryType.Row == territoryType)?.RowId ??