Skip to content

Commit

Permalink
die
Browse files Browse the repository at this point in the history
  • Loading branch information
xanunderscore committed Feb 21, 2025
1 parent 4d34e38 commit f4ec20b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
3 changes: 2 additions & 1 deletion BossMod/Framework/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ public unsafe Plugin(IDalamudPluginInterface dalamud, ICommandManager commandMan
InteropGenerator.Runtime.Resolver.GetInstance.Resolve();

dalamud.Create<Service>();
Service.LogHandler = (string msg) => Service.Logger.Debug(msg);
Service.LogHandlerDebug = (string msg) => Service.Logger.Debug(msg);
Service.LogHandlerVerbose = (string msg) => Service.Logger.Verbose(msg);
Service.LuminaGameData = dataManager.GameData;
Service.WindowSystem = new("vbm");
//Service.Device = pluginInterface.UiBuilder.Device;
Expand Down
6 changes: 4 additions & 2 deletions BossMod/Framework/Service.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ public sealed class Service
#pragma warning restore CS8618

#pragma warning disable CA2211
public static Action<string>? LogHandler;
public static void Log(string msg) => LogHandler?.Invoke(msg);
public static Action<string>? LogHandlerDebug;
public static Action<string>? LogHandlerVerbose;
public static void Log(string msg) => LogHandlerDebug?.Invoke(msg);
public static void LogVerbose(string msg) => LogHandlerVerbose?.Invoke(msg);

public static Lumina.GameData? LuminaGameData;
public static Lumina.Excel.ExcelSheet<T>? LuminaSheet<T>() where T : struct, Lumina.Excel.IExcelRow<T> => LuminaGameData?.GetExcelSheet<T>(Lumina.Data.Language.English);
Expand Down
2 changes: 1 addition & 1 deletion BossMod/Framework/WorldStateGameSync.cs
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ private unsafe void UpdateActors()

if (obj != null && (obj->EntityId & 0xFF000000) == 0xFF000000)
{
Service.Log($"[WorldState] Skipping bad object #{i} with id {obj->EntityId:X}");
Service.LogVerbose($"[WorldState] Skipping bad object #{i} with id {obj->EntityId:X}");
obj = null;
}

Expand Down
3 changes: 2 additions & 1 deletion UIDev/UITest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ public static void Main(string[] args)

InitializeDalamudStyle();

Service.LogHandler = msg => Debug.WriteLine(msg);
Service.LogHandlerDebug = msg => Debug.WriteLine(msg);
Service.LogHandlerVerbose = msg => Debug.WriteLine(msg);
Service.LuminaGameData = new(FindGameDataPath());
//Service.LuminaGameData.Options.PanicOnSheetChecksumMismatch = false; // TODO: remove - temporary workaround until lumina is updated
Service.LuminaGameData.Options.RsvResolver = Service.LuminaRSV.TryGetValue;
Expand Down

0 comments on commit f4ec20b

Please sign in to comment.