Skip to content

Commit 60e6c80

Browse files
authored
Merge pull request NightmareXIV#150 from zbee/HEAD
General `GameHelpers.Content` update
2 parents 67b7caa + 4f6010d commit 60e6c80

2 files changed

Lines changed: 13 additions & 4 deletions

File tree

ECommons/GameHelpers/Content.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public static class Content
8383
/// </summary>
8484
/// <seealso cref="TerritoryHelper.GetTerritoryName" />
8585
private static string TerritoryNameResult =>
86-
TerritoryHelper.GetTerritoryName(TerritoryID);
86+
TerritoryHelper.GetTerritoryName(TerritoryID, Language.English);
8787

8888
/// <summary>
8989
/// Whether the TerritoryName came out successfully from the builder.
@@ -143,6 +143,12 @@ public static TerritoryIntendedUseEnum? TerritoryIntendedUse
143143
public static ContentFinderCondition? ContentFinderConditionRow =>
144144
TerritoryTypeRow?.ContentFinderCondition.ValueNullable;
145145

146+
/// <summary>
147+
/// The Row ID of the current <see cref="ContentFinderCondition" />.
148+
/// </summary>
149+
public static uint? ContentFinderConditionRowId =>
150+
ContentFinderConditionRow?.RowId;
151+
146152
/// <summary>
147153
/// The content name of the current territory the player is in.
148154
/// </summary>
@@ -252,7 +258,7 @@ public static SheetContentType? ContentTypeRow
252258
/// <summary>
253259
/// The Row ID of the current <see cref="SheetContentType" />.
254260
/// </summary>
255-
private static uint? ContentTypeRowId =>
261+
public static uint? ContentTypeRowId =>
256262
ContentTypeRow?.RowId;
257263

258264
/// <summary>
@@ -327,6 +333,7 @@ _ when
327333
(ContentName?.Contains("Delubrum") ?? false) ||
328334
(ContentName?.Contains("Lacus") ?? false) ||
329335
(ContentName?.Contains("Dalriada") ?? false) ||
336+
(ContentName?.Contains("Forked Tower") ?? false) ||
330337
MapID is >= 520 and <= 527 =>
331338
GameHelpers.ContentType.FieldRaid,
332339

@@ -372,6 +379,7 @@ private static ContentDifficulty? DetermineContentDifficulty
372379
"Hard" => GameHelpers.ContentDifficulty.Hard,
373380
"Extreme" => GameHelpers.ContentDifficulty.Extreme,
374381
"Savage" => GameHelpers.ContentDifficulty.Savage,
382+
"Chaotic" => GameHelpers.ContentDifficulty.Chaotic,
375383
_ => @default,
376384
},
377385

ECommons/TerritoryName.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using ECommons.DalamudServices;
2+
using Lumina.Data;
23
using Lumina.Excel.Sheets;
34
using System;
45
using System.Collections.Generic;
@@ -9,13 +10,13 @@ public static class TerritoryName
910
{
1011
private static Dictionary<uint, string> Cache = [];
1112

12-
public static string GetTerritoryName(uint id)
13+
public static string GetTerritoryName(uint id, Language? lang = null)
1314
{
1415
if(Cache.TryGetValue(id, out var val))
1516
{
1617
return val;
1718
}
18-
var data = Svc.Data.GetExcelSheet<TerritoryType>()!.GetRowOrDefault(id);
19+
var data = Svc.Data.Excel.GetSheet<TerritoryType>(lang)!.GetRowOrDefault(id);
1920
if(data != null)
2021
{
2122
var zoneName = data.Value.PlaceName.ValueNullable?.Name.ToString() ?? "";

0 commit comments

Comments
 (0)