diff --git a/XIVComboVX/ChatUtil.cs b/XIVComboVX/ChatUtil.cs index a0310a05..5e8ed642 100644 --- a/XIVComboVX/ChatUtil.cs +++ b/XIVComboVX/ChatUtil.cs @@ -28,7 +28,7 @@ internal ChatUtil() { [SuppressMessage("Performance", "CA1822:Mark members as static", Justification = "Convention")] internal void print(XivChatType type, params Payload[] payloads) { if (payloads.Length > 0) { - Service.ChatGui.PrintChat(new XivChatEntry() { + Service.ChatGui.Print(new XivChatEntry() { Type = type, Message = new SeString(payloads), }); @@ -41,7 +41,7 @@ private void onClickChatLink(uint id, SeString source) { Service.Plugin.onPluginCommand("", ""); break; default: - Service.ChatGui.PrintChat(new XivChatEntry() { + Service.ChatGui.Print(new XivChatEntry() { Type = XivChatType.SystemError, Message = new SeString( new TextPayload($"An internal error has occured: no handler is registered for id {id}.") diff --git a/XIVComboVX/Config/ComboDetailSetting.cs b/XIVComboVX/Config/ComboDetailSetting.cs index cb764045..1ec40704 100644 --- a/XIVComboVX/Config/ComboDetailSetting.cs +++ b/XIVComboVX/Config/ComboDetailSetting.cs @@ -68,22 +68,22 @@ internal ComboDetailSetting(PropertyInfo prop, ComboDetailSettingAttribute attr) _ => 0, }; if (attr.Min < typeMin) { - PluginLog.Warning($"{this.Combo}:{this.Property.Name} has minimum value {attr.Min} below {this.Type.Name}.MinValue, bounding to {typeMin}"); + Service.Log.Warning($"{this.Combo}:{this.Property.Name} has minimum value {attr.Min} below {this.Type.Name}.MinValue, bounding to {typeMin}"); this.Min = typeMin; } else if (attr.Min > typeMax) { - PluginLog.Warning($"{this.Combo}:{this.Property.Name} has minimum value {attr.Min} above {this.Type.Name}.MaxValue, bounding to {typeMax}"); + Service.Log.Warning($"{this.Combo}:{this.Property.Name} has minimum value {attr.Min} above {this.Type.Name}.MaxValue, bounding to {typeMax}"); this.Min = typeMax; } else { this.Min = attr.Min; } if (attr.Max > typeMax) { - PluginLog.Warning($"{this.Combo}:{this.Property.Name} has maximum value {attr.Max} above {this.Type.Name}.MaxValue, bounding to {typeMax}"); + Service.Log.Warning($"{this.Combo}:{this.Property.Name} has maximum value {attr.Max} above {this.Type.Name}.MaxValue, bounding to {typeMax}"); this.Max = typeMax; } else if (attr.Max < typeMin) { - PluginLog.Warning($"{this.Combo}:{this.Property.Name} has maximum value {attr.Max} below {this.Type.Name}.MinValue, bounding to {typeMin}"); + Service.Log.Warning($"{this.Combo}:{this.Property.Name} has maximum value {attr.Max} below {this.Type.Name}.MinValue, bounding to {typeMin}"); this.Max = typeMin; } else { diff --git a/XIVComboVX/Config/ConfigWindow.cs b/XIVComboVX/Config/ConfigWindow.cs index b77ac009..61c8e3aa 100644 --- a/XIVComboVX/Config/ConfigWindow.cs +++ b/XIVComboVX/Config/ConfigWindow.cs @@ -104,7 +104,7 @@ public ConfigWindow() : base($"Custom Combo Setup - {Service.Plugin.ShortPluginS this.presetOrdinals[preset] = ++ord; - PluginLog.Information($"Indexed {preset} as {ord}"); + Service.Log.Information($"Indexed {preset} as {ord}"); // if this preset has children, iterate and index them immediately because they'll be grouped under it in the config window if (this.parentToChildrenPresets.TryGetValue(preset, out List<(CustomComboPreset Preset, CustomComboInfoAttribute Info)>? children) && children?.Count > 0) { @@ -122,7 +122,7 @@ public ConfigWindow() : base($"Custom Combo Setup - {Service.Plugin.ShortPluginS if (!this.presetOrdinals.ContainsKey(next)) this.presetOrdinals[next] = ++ord; - PluginLog.Information($"Indexed {next} as {ord}"); + Service.Log.Information($"Indexed {next} as {ord}"); // if the current preset being indexed has children, they need to be added to the FRONT of the queue (but still in the order they're presented) if (this.parentToChildrenPresets.TryGetValue(next, out List<(CustomComboPreset Preset, CustomComboInfoAttribute Info)>? subchildren)) { @@ -269,7 +269,7 @@ public override void Draw() { ImGui.EndTooltip(); } if (clickDebug) { - Service.Logger.EnableNextTick(); + Service.TickLogger.EnableNextTick(); } ImGui.EndMenu(); @@ -473,7 +473,7 @@ private void drawPreset(CustomComboPreset preset, CustomComboInfoAttribute info) default: throw new FormatException($"Invalid detail type {detail.ImGuiType}"); } - Service.Logger.debug( + Service.TickLogger.debug( $"{detail.Label} ({detail.Type.Name}/{detail.ImGuiType}) {detail.Min} <= [{detail.Val}] <= {detail.Max} ({range})" ); bool changed = useSlider diff --git a/XIVComboVX/Config/UpdateAlerter.cs b/XIVComboVX/Config/UpdateAlerter.cs index 6a0ab80c..47e9071e 100644 --- a/XIVComboVX/Config/UpdateAlerter.cs +++ b/XIVComboVX/Config/UpdateAlerter.cs @@ -45,19 +45,19 @@ internal UpdateAlerter(Version to, bool isFresh) { } internal void checkMessage() { - PluginLog.Information("Checking whether to display update message"); + Service.Log.Information("Checking whether to display update message"); if (this.disposed) { this.unregister(); - PluginLog.Information("Update alerter already disposed"); + Service.Log.Information("Update alerter already disposed"); return; } if (this.seenUpdateMessage) { this.unregister(); - PluginLog.Information("Message already displayed, unregistering"); + Service.Log.Information("Message already displayed, unregistering"); return; } - PluginLog.Information($"Checks passed, delaying message by {messageDelayMs}ms - may be reset if message is triggered again within that time"); + Service.Log.Information($"Checks passed, delaying message by {messageDelayMs}ms - may be reset if message is triggered again within that time"); this.aborter = new(); @@ -73,7 +73,7 @@ internal void displayMessage() { this.seenUpdateMessage = true; this.unregister(); - PluginLog.Information("Displaying update alert in game chat"); + Service.Log.Information("Displaying update alert in game chat"); List parts = new(); if (!(Plugin.Debug && Service.Interface.IsDev)) { @@ -98,13 +98,13 @@ internal void displayMessage() { } internal void register() { - PluginLog.Information("Registering update alerter"); + Service.Log.Information("Registering update alerter"); Service.ChatGui.ChatMessage += this.onChatMessage; Service.Client.Login += this.onLogin; } internal void unregister() { - PluginLog.Information("Unregistering update alerter"); + Service.Log.Information("Unregistering update alerter"); Service.ChatGui.ChatMessage -= this.onChatMessage; Service.Client.Login -= this.onLogin; } @@ -113,7 +113,7 @@ private void onChatMessage(XivChatType type, uint senderId, ref SeString sender, if (type is XivChatType.Urgent or XivChatType.Notice or XivChatType.SystemMessage) this.checkMessage(); } - private async void onLogin(object? sender, EventArgs e) { + private async void onLogin() { do { await Task.Delay(loginDelayMs); } while (!Service.Client.IsLoggedIn || Service.Client.LocalContentId == 0 || Service.Client.LocalPlayer is null); diff --git a/XIVComboVX/CustomCombo.cs b/XIVComboVX/CustomCombo.cs index 4431ef2e..8442a401 100644 --- a/XIVComboVX/CustomCombo.cs +++ b/XIVComboVX/CustomCombo.cs @@ -70,20 +70,20 @@ public bool TryInvoke(uint actionID, uint lastComboActionId, float comboTime, by if (comboTime <= 0) lastComboActionId = 0; - Service.Logger.debug($"{this.ModuleName}.Invoke({actionID}, {lastComboActionId}, {comboTime}, {level})"); + Service.TickLogger.debug($"{this.ModuleName}.Invoke({actionID}, {lastComboActionId}, {comboTime}, {level})"); try { uint resultingActionID = this.Invoke(actionID, lastComboActionId, comboTime, level); if (resultingActionID == 0 || actionID == resultingActionID) { - Service.Logger.debug("NO REPLACEMENT"); + Service.TickLogger.debug("NO REPLACEMENT"); return false; } - Service.Logger.debug($"Became #{resultingActionID}"); + Service.TickLogger.debug($"Became #{resultingActionID}"); newActionID = resultingActionID; return true; } catch (Exception ex) { - Service.Logger.error($"Error in {this.ModuleName}.Invoke({actionID}, {lastComboActionId}, {comboTime}, {level})", ex); + Service.TickLogger.error($"Error in {this.ModuleName}.Invoke({actionID}, {lastComboActionId}, {comboTime}, {level})", ex); return false; } } @@ -91,11 +91,11 @@ public bool TryInvoke(uint actionID, uint lastComboActionId, float comboTime, by protected internal static bool IsEnabled(CustomComboPreset preset) { if ((int)preset < 100) { - Service.Logger.debug($"Bypassing is-enabled check for preset #{(int)preset}"); + Service.TickLogger.debug($"Bypassing is-enabled check for preset #{(int)preset}"); return true; } bool enabled = Service.Configuration.IsEnabled(preset); - Service.Logger.debug($"Checking status of preset #{(int)preset} - {enabled}"); + Service.TickLogger.debug($"Checking status of preset #{(int)preset} - {enabled}"); return enabled; } @@ -149,7 +149,7 @@ protected static uint PickByCooldown(uint preference, params uint[] actions) { // And they've got a TTS-style voice just constantly repeating "PAIN. PAIN. PAIN. PAIN. PAIN." from it? // Yeah. - Service.Logger.debug($"CDCMP: {a.ActionID}, {b.ActionID}: {choice.ActionID}\n{a.Data.DebugLabel}\n{b.Data.DebugLabel}"); + Service.TickLogger.debug($"CDCMP: {a.ActionID}, {b.ActionID}: {choice.ActionID}\n{a.Data.DebugLabel}\n{b.Data.DebugLabel}"); return choice; } @@ -157,7 +157,7 @@ protected static uint PickByCooldown(uint preference, params uint[] actions) { .Select(Selector) .Aggregate((a1, a2) => Compare(preference, a1, a2)) .ActionID; - Service.Logger.debug($"Final selection: {id}"); + Service.TickLogger.debug($"Final selection: {id}"); return id; } diff --git a/XIVComboVX/GameData/ComboDataCache.cs b/XIVComboVX/GameData/ComboDataCache.cs index b30cd2e1..99b5e33a 100644 --- a/XIVComboVX/GameData/ComboDataCache.cs +++ b/XIVComboVX/GameData/ComboDataCache.cs @@ -8,6 +8,7 @@ namespace PrincessRTFM.XIVComboVX.GameData; using Dalamud.Game.ClientState.Objects.SubKinds; using Dalamud.Game.ClientState.Objects.Types; using Dalamud.Game.ClientState.Statuses; +using Dalamud.Plugin.Services; using XIVComboVX.Combos; @@ -36,7 +37,7 @@ protected override void Dispose(bool disposing) { this.jobGaugeCache?.Clear(); } - protected override unsafe void InvalidateCache(Framework framework) { + protected override unsafe void InvalidateCache(IFramework framework) { this.statusCache.Clear(); this.cooldownCache.Clear(); this.canInterruptTarget = null; @@ -106,7 +107,7 @@ public unsafe CooldownData GetCooldown(uint actionID) { cooldownPtr->ActionID = actionID; CooldownData cd = this.cooldownCache[actionID] = *(CooldownData*)cooldownPtr; - Service.Logger.debug($"Retrieved cooldown data for action #{actionID}: {cd.DebugLabel}"); + Service.TickLogger.debug($"Retrieved cooldown data for action #{actionID}: {cd.DebugLabel}"); return cd; } diff --git a/XIVComboVX/GameData/GameState.cs b/XIVComboVX/GameData/GameState.cs index f0c1cd33..1cf8e4eb 100644 --- a/XIVComboVX/GameData/GameState.cs +++ b/XIVComboVX/GameData/GameState.cs @@ -32,7 +32,7 @@ internal GameState() { Service.Client.Logout += this.clearCacheOnLogout; } - private void clearCacheOnLogout(object? sender, EventArgs args) => this.chatLogPointer = null; + private void clearCacheOnLogout() => this.chatLogPointer = null; public void Dispose() { if (this.disposed) diff --git a/XIVComboVX/GameData/IconReplacer.cs b/XIVComboVX/GameData/IconReplacer.cs index b0b503b7..092c0206 100644 --- a/XIVComboVX/GameData/IconReplacer.cs +++ b/XIVComboVX/GameData/IconReplacer.cs @@ -24,19 +24,19 @@ internal class IconReplacer: IDisposable { private readonly List customCombos; public IconReplacer() { - PluginLog.Information("Loading registered combos"); + Service.Log.Information("Loading registered combos"); this.customCombos = Assembly.GetAssembly(this.GetType())!.GetTypes() .Where(t => !t.IsAbstract && (t.BaseType == typeof(CustomCombo) || t.BaseType?.BaseType == typeof(CustomCombo))) - .Select(t => Activator.CreateInstance(t)) + .Select(Activator.CreateInstance) .Cast() .ToList(); - PluginLog.Information($"Loaded {this.customCombos.Count} replacers"); + Service.Log.Information($"Loaded {this.customCombos.Count} replacers"); #if DEBUG - PluginLog.Information(string.Join(", ", this.customCombos.Select(combo => combo.GetType().Name))); + Service.Log.Information(string.Join(", ", this.customCombos.Select(combo => combo.GetType().Name))); #endif - this.getIconHook = Hook.FromAddress(Service.Address.GetAdjustedActionId, this.getIconDetour); - this.isIconReplaceableHook = Hook.FromAddress(Service.Address.IsActionIdReplaceable, this.isIconReplaceableDetour); + this.getIconHook = Service.Interop.HookFromAddress(Service.Address.GetAdjustedActionId, this.getIconDetour); + this.isIconReplaceableHook = Service.Interop.HookFromAddress(Service.Address.IsActionIdReplaceable, this.isIconReplaceableDetour); this.getIconHook.Enable(); this.isIconReplaceableHook.Enable(); @@ -81,7 +81,7 @@ private unsafe uint getIconDetour(IntPtr actionManager, uint actionID) { return this.OriginalHook(actionID); } catch (Exception ex) { - Service.Logger.error("Don't crash the game", ex); + Service.TickLogger.error("Don't crash the game", ex); return this.getIconHook.Original(actionManager, actionID); } } diff --git a/XIVComboVX/GameData/PluginAddressResolver.cs b/XIVComboVX/GameData/PluginAddressResolver.cs index f22dc322..d8ffaa84 100644 --- a/XIVComboVX/GameData/PluginAddressResolver.cs +++ b/XIVComboVX/GameData/PluginAddressResolver.cs @@ -6,7 +6,7 @@ namespace PrincessRTFM.XIVComboVX.GameData; using Dalamud.Game; using Dalamud.Logging; -internal class PluginAddressResolver: BaseAddressResolver { +internal class PluginAddressResolver { private const string addrFmtSpec = "X16"; public Exception? LoadFailReason { get; private set; } @@ -25,16 +25,16 @@ internal class PluginAddressResolver: BaseAddressResolver { public string IsActionIdReplaceableAddr => this.IsActionIdReplaceable.ToInt64().ToString(addrFmtSpec); - protected override void Setup64Bit(SigScanner scanner) { + internal void setup() { try { - PluginLog.Information("Scanning for ComboTimer signature"); - this.ComboTimer = scanner.GetStaticAddressFromSig("F3 0F 11 05 ?? ?? ?? ?? 48 83 C7 08"); + Service.Log.Information("Scanning for ComboTimer signature"); + this.ComboTimer = Service.SigScanner.GetStaticAddressFromSig("F3 0F 11 05 ?? ?? ?? ?? 48 83 C7 08"); - PluginLog.Information("Scanning for GetAdjustedActionId signature"); - this.GetAdjustedActionId = scanner.ScanText("E8 ?? ?? ?? ?? 89 03 8B 03"); // Client::Game::ActionManager.GetAdjustedActionId + Service.Log.Information("Scanning for GetAdjustedActionId signature"); + this.GetAdjustedActionId = Service.SigScanner.ScanText("E8 ?? ?? ?? ?? 89 03 8B 03"); // Client::Game::ActionManager.GetAdjustedActionId - PluginLog.Information("Scanning for IsActionIdReplaceable signature"); - this.IsActionIdReplaceable = scanner.ScanText("E8 ?? ?? ?? ?? 84 C0 74 4C 8B D3"); + Service.Log.Information("Scanning for IsActionIdReplaceable signature"); + this.IsActionIdReplaceable = Service.SigScanner.ScanText("E8 ?? ?? ?? ?? 84 C0 74 4C 8B D3"); } catch (Exception ex) { this.LoadFailReason = ex; @@ -51,15 +51,15 @@ protected override void Setup64Bit(SigScanner scanner) { msg.Append("IsActionIdReplaceable"); msg.AppendLine(":"); msg.Append(ex.ToString()); - PluginLog.Fatal(msg.ToString()); + Service.Log.Fatal(msg.ToString()); return; } - PluginLog.Information("Address resolution successful"); + Service.Log.Information("Address resolution successful"); - PluginLog.Information($"GetAdjustedActionId 0x{this.GetAdjustedActionIdAddr}"); - PluginLog.Information($"IsIconReplaceable 0x{this.IsActionIdReplaceableAddr}"); - PluginLog.Information($"ComboTimer 0x{this.ComboTimerAddr}"); - PluginLog.Information($"LastComboMove 0x{this.LastComboMoveAddr}"); + Service.Log.Information($"GetAdjustedActionId 0x{this.GetAdjustedActionIdAddr}"); + Service.Log.Information($"IsIconReplaceable 0x{this.IsActionIdReplaceableAddr}"); + Service.Log.Information($"ComboTimer 0x{this.ComboTimerAddr}"); + Service.Log.Information($"LastComboMove 0x{this.LastComboMoveAddr}"); } } diff --git a/XIVComboVX/Ipc.cs b/XIVComboVX/Ipc.cs index 82f5972a..f2719678 100644 --- a/XIVComboVX/Ipc.cs +++ b/XIVComboVX/Ipc.cs @@ -60,7 +60,7 @@ private async void registrationLoop() { this.addTips(tippyTip); } catch (IpcError ex) { - Service.Logger.error("Failed to register tip for Tippy's pool", ex); + Service.TickLogger.error("Failed to register tip for Tippy's pool", ex); this.tippyRegistrationQueue.Clear(); } } @@ -97,7 +97,7 @@ internal bool showTippyMessage(string message) { return false; } catch (IpcError ex) { - Service.Logger.error("Failed to register priority message for Tippy", ex); + Service.TickLogger.error("Failed to register priority message for Tippy", ex); return false; } } diff --git a/XIVComboVX/LogUtil.cs b/XIVComboVX/LogUtil.cs index f3af1f6b..c577a595 100644 --- a/XIVComboVX/LogUtil.cs +++ b/XIVComboVX/LogUtil.cs @@ -2,10 +2,9 @@ namespace PrincessRTFM.XIVComboVX; using System; using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; -using Dalamud.Game; using Dalamud.Logging; +using Dalamud.Plugin.Services; internal class LogUtil: IDisposable { public const string STACK_TRACE_MSG = "autogenerated stack trace exception"; @@ -20,39 +19,39 @@ internal LogUtil() { public void EnableNextTick() { this.EnabledNextTick = true; - PluginLog.Information("Enabled logging snapshot for next tick"); + Service.Log.Information("Enabled logging snapshot for next tick"); } - private void onTick(Framework framework) { + private void onTick(IFramework framework) { if (this.Enabled) - PluginLog.Information("Logging snapshot complete"); + Service.Log.Information("Logging snapshot complete"); if (this.EnabledNextTick) - PluginLog.Information("Beginning logging snapshot"); + Service.Log.Information("Beginning logging snapshot"); this.Enabled = this.EnabledNextTick; this.EnabledNextTick = false; } internal void fatal(string msg, Exception? cause = null) { if (this.Enabled) - PluginLog.Fatal($"{msg}\n{cause ?? new Exception(STACK_TRACE_MSG)}"); + Service.Log.Fatal($"{msg}\n{cause ?? new Exception(STACK_TRACE_MSG)}"); } internal void error(string msg, Exception? cause = null) { if (this.Enabled) - PluginLog.Error($"{msg}\n{cause ?? new Exception(STACK_TRACE_MSG)}"); + Service.Log.Error($"{msg}\n{cause ?? new Exception(STACK_TRACE_MSG)}"); } internal void warning(string msg, Exception? cause = null) { if (this.Enabled) - PluginLog.Warning($"{msg}\n{cause ?? new Exception(STACK_TRACE_MSG)}"); + Service.Log.Warning($"{msg}\n{cause ?? new Exception(STACK_TRACE_MSG)}"); } [Conditional("DEBUG")] internal void debug(string msg) { if (this.Enabled) - PluginLog.Information(msg); + Service.Log.Information(msg); } [Conditional("DEBUG")] internal void trace(string msg) { if (this.Enabled) { - PluginLog.Information( + Service.Log.Information( #if TRACE $"{msg}\n{new StackTrace(true)}" #else diff --git a/XIVComboVX/ManagedCache.cs b/XIVComboVX/ManagedCache.cs index cd7e6ab5..3cfdada8 100644 --- a/XIVComboVX/ManagedCache.cs +++ b/XIVComboVX/ManagedCache.cs @@ -2,7 +2,7 @@ namespace PrincessRTFM.XIVComboVX; using System; -using Dalamud.Game; +using Dalamud.Plugin.Services; internal abstract class ManagedCache: IDisposable { #region IDisposable @@ -27,5 +27,5 @@ protected ManagedCache() { Service.Framework.Update += this.InvalidateCache; } - protected abstract void InvalidateCache(Framework framework); + protected abstract void InvalidateCache(IFramework framework); } diff --git a/XIVComboVX/Plugin.cs b/XIVComboVX/Plugin.cs index fe5e048e..225629b2 100644 --- a/XIVComboVX/Plugin.cs +++ b/XIVComboVX/Plugin.cs @@ -48,14 +48,14 @@ public Plugin(DalamudPluginInterface pluginInterface) { pluginInterface.Create(); Service.Plugin = this; - Service.Logger = new(); + Service.TickLogger = new(); Service.Configuration = pluginInterface.GetPluginConfig() as PluginConfiguration ?? new(true); Service.Address = new(); Service.Configuration.Active = true; Service.Configuration.UpgradeIfNeeded(); - Service.Address.Setup(); + Service.Address.setup(); if (Service.Address.LoadSuccessful) { Service.DataCache = new(); @@ -93,7 +93,7 @@ public Plugin(DalamudPluginInterface pluginInterface) { $"I see you're using {this.Name}. Have you tried being good at the game instead?" ); - PluginLog.Information($"{this.FullPluginSignature} initialised {(Service.Address.LoadSuccessful ? "" : "un")}successfully"); + Service.Log.Information($"{this.FullPluginSignature} initialised {(Service.Address.LoadSuccessful ? "" : "un")}successfully"); if (Service.Configuration.IsFirstRun || !Service.Configuration.LastVersion.Equals(Version)) { Service.UpdateAlert = new(Version, Service.Configuration.IsFirstRun); @@ -127,7 +127,7 @@ public Plugin(DalamudPluginInterface pluginInterface) { msg.AddUiGlowOff(); msg.AddUiForegroundOff(); msg.AddText($" and replace {(deprecated == 1 ? "it" : "them")} with the recommended alternatives."); - Service.ChatGui.PrintChat(new XivChatEntry() { + Service.ChatGui.Print(new XivChatEntry() { Type = XivChatType.ErrorMessage, Message = msg.Build(), }); @@ -162,7 +162,7 @@ private void dispose(bool disposing) { Service.ChatUtils?.Dispose(); Service.GameState?.Dispose(); Service.Ipc?.Dispose(); - Service.Logger?.Dispose(); + Service.TickLogger?.Dispose(); } } @@ -173,7 +173,7 @@ internal void toggleConfigUi() { this.configWindow.IsOpen = !this.configWindow.IsOpen; } else { - PluginLog.Error("Cannot toggle configuration window, reference does not exist"); + Service.Log.Error("Cannot toggle configuration window, reference does not exist"); } } @@ -230,7 +230,7 @@ internal void onPluginCommand(string command, string arguments) { } break; case "debug": { - Service.Logger.EnableNextTick(); + Service.TickLogger.EnableNextTick(); Service.ChatGui.Print("Enabled debug message snapshot"); } break; diff --git a/XIVComboVX/Service.cs b/XIVComboVX/Service.cs index 3963aed3..d5fc2a4f 100644 --- a/XIVComboVX/Service.cs +++ b/XIVComboVX/Service.cs @@ -1,9 +1,7 @@ namespace PrincessRTFM.XIVComboVX; using Dalamud.Game; -using Dalamud.Game.ClientState.Conditions; using Dalamud.Game.ClientState.Objects; -using Dalamud.Game.Gui; using Dalamud.IoC; using Dalamud.Plugin; using Dalamud.Plugin.Services; @@ -22,7 +20,7 @@ internal class Service { public static ComboDataCache DataCache { get; set; } = null!; - public static LogUtil Logger { get; set; } = null!; + public static LogUtil TickLogger { get; set; } = null!; public static GameState GameState { get; set; } = null!; @@ -32,37 +30,19 @@ internal class Service { public static Ipc Ipc { get; set; } = null!; - [PluginService] - public static DalamudPluginInterface Interface { get; private set; } = null!; - - [PluginService] - public static IBuddyList BuddyList { get; private set; } = null!; - - [PluginService] - public static ChatGui ChatGui { get; private set; } = null!; - - [PluginService] - public static IClientState Client { get; private set; } = null!; - - [PluginService] - public static ICommandManager Commands { get; private set; } = null!; - - [PluginService] - public static Condition Conditions { get; private set; } = null!; - - [PluginService] - public static IDataManager GameData { get; private set; } = null!; - - [PluginService] - public static Framework Framework { get; private set; } = null!; - - [PluginService] - public static IJobGauges JobGauge { get; private set; } = null!; - - [PluginService] - public static ITargetManager Targets { get; private set; } = null!; - - [PluginService] - public static IGameGui GameGui { get; private set; } = null!; + [PluginService] public static IPluginLog Log { get; private set; } = null!; + [PluginService] public static DalamudPluginInterface Interface { get; private set; } = null!; + [PluginService] public static ISigScanner SigScanner { get; private set; } = null!; + [PluginService] public static IBuddyList BuddyList { get; private set; } = null!; + [PluginService] public static IChatGui ChatGui { get; private set; } = null!; + [PluginService] public static IClientState Client { get; private set; } = null!; + [PluginService] public static ICommandManager Commands { get; private set; } = null!; + [PluginService] public static ICondition Conditions { get; private set; } = null!; + [PluginService] public static IDataManager GameData { get; private set; } = null!; + [PluginService] public static IFramework Framework { get; private set; } = null!; + [PluginService] public static IJobGauges JobGauge { get; private set; } = null!; + [PluginService] public static ITargetManager Targets { get; private set; } = null!; + [PluginService] public static IGameGui GameGui { get; private set; } = null!; + [PluginService] public static IGameInteropProvider Interop { get; private set; } = null!; } diff --git a/XIVComboVX/XIVComboVX.csproj b/XIVComboVX/XIVComboVX.csproj index 7794720a..987bae96 100644 --- a/XIVComboVX/XIVComboVX.csproj +++ b/XIVComboVX/XIVComboVX.csproj @@ -3,7 +3,7 @@ XIVComboVX attick, daemitus, VariableVixen - 9.10.2 + 9.11.0 This plugin condenses various abilities onto single buttons. https://github.com/PrincessRTFM/XIVComboPlugin Copyleft attick 2020 baybeeee