Fix ChatService dispose + Add chat configuration

This commit is contained in:
Loporrit
2024-11-26 01:03:58 +00:00
parent a4f78e7835
commit dc9a7f4363
10 changed files with 432 additions and 47 deletions

View File

@@ -70,6 +70,12 @@ public class DalamudUtilService : IHostedService, IMediatorSubscriber
.Where(w => w.Name.ByteLength > 0 && w.DataCenter.RowId != 0 && (w.IsPublic || char.IsUpper((char)w.Name.Data.Span[0])))
.ToDictionary(w => (ushort)w.RowId, w => w.Name.ToString());
});
UiColors = new(() =>
{
return gameData.GetExcelSheet<Lumina.Excel.Sheets.UIColor>(Dalamud.Game.ClientLanguage.English)!
.Where(x => x.RowId != 0 && !(x.RowId >= 500 && (x.UIForeground & 0xFFFFFF00) == 0))
.ToDictionary(x => (int)x.RowId);
});
mediator.Subscribe<TargetPairMessage>(this, async (msg) =>
{
if (clientState.IsPvP) return;
@@ -99,6 +105,7 @@ public class DalamudUtilService : IHostedService, IMediatorSubscriber
public bool IsInCombat { get; private set; } = false;
public Lazy<Dictionary<ushort, string>> WorldData { get; private set; }
public Lazy<Dictionary<int, Lumina.Excel.Sheets.UIColor>> UiColors { get; private set; }
public MareMediator Mediator { get; }