refactor: pull CharaMakeName into constant
This commit is contained in:
parent
f5ac3c419f
commit
1248814bf7
|
@ -30,7 +30,7 @@ namespace NominaOcculta {
|
|||
|
||||
this._numRaces = this.Plugin.DataManager.GetExcelSheet<Race>()!.Count(row => row.RowId != 0);
|
||||
|
||||
this.Plugin.Functions.LoadSheet("CharaMakeName");
|
||||
this.Plugin.Functions.LoadSheet(Util.SheetName);
|
||||
this.Plugin.ClientState.Login += this.OnLogin;
|
||||
|
||||
for (var race = (byte) 1; race <= this._numRaces; race++) {
|
||||
|
@ -53,7 +53,7 @@ namespace NominaOcculta {
|
|||
// The game unloads the CharaMakeName sheet after logging in.
|
||||
// We need this sheet to generate names, so we load it again.
|
||||
if (this._loadSheetWatch.IsRunning && this._loadSheetWatch.Elapsed > TimeSpan.FromSeconds(3)) {
|
||||
this.Plugin.Functions.LoadSheet("CharaMakeName");
|
||||
this.Plugin.Functions.LoadSheet(Util.SheetName);
|
||||
this._loadSheetWatch.Reset();
|
||||
}
|
||||
|
||||
|
|
|
@ -6,6 +6,8 @@ using Dalamud.Game.Text.SeStringHandling.Payloads;
|
|||
|
||||
namespace NominaOcculta {
|
||||
internal static class Util {
|
||||
internal const string SheetName = "CharaMakeName";
|
||||
|
||||
internal static bool ContainsPlayerName(this SeString text, string name) {
|
||||
foreach (var payload in text.Payloads) {
|
||||
switch (payload) {
|
||||
|
|
Loading…
Reference in New Issue