Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
fix: update watcher.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed May 24, 2023
1 parent 537c7cc commit 76816e0
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 307 deletions.
19 changes: 0 additions & 19 deletions RotationSolver.Basic/Data/ActionEffect.cs

This file was deleted.

48 changes: 0 additions & 48 deletions RotationSolver.Basic/Data/ActionEffectHeader.cs

This file was deleted.

111 changes: 0 additions & 111 deletions RotationSolver.Basic/Data/ActionEffectSet.cs

This file was deleted.

58 changes: 0 additions & 58 deletions RotationSolver.Basic/Data/ActionEffectType.cs

This file was deleted.

4 changes: 2 additions & 2 deletions RotationSolver.Basic/DataCenter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ public static class DataCenter
internal static DateTime EffectEndTime { private get; set; } = DateTime.Now;

internal static bool InEffectTime => DateTime.Now >= EffectTime && DateTime.Now <= EffectEndTime;
internal static Dictionary<uint, ushort> HealHP { get; set; } = new Dictionary<uint, ushort>();
internal static Dictionary<uint, ushort> ApplyStatus { private get; set; } = new Dictionary<uint, ushort>();
internal static Dictionary<ulong, uint> HealHP { get; set; } = new Dictionary<ulong, uint>();
internal static Dictionary<ulong, uint> ApplyStatus { private get; set; } = new Dictionary<ulong, uint>();
internal static uint MPGain { get; set; }
internal static bool HasApplyStatus(uint id, StatusID[] ids)
{
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver.Basic/Rotations/CustomRotation_OtherInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public abstract partial class CustomRotation
protected static float WeaponElapsed => DataCenter.WeaponElapsed;
#endregion

protected static ClientLanguage Language => Service.Language;
protected static ClientLanguage Language => Svc.ClientState.ClientLanguage;
protected static TerritoryContentType TerritoryContentType => DataCenter.TerritoryContentType;

protected static float Ping => DataCenter.Ping;
Expand Down
5 changes: 0 additions & 5 deletions RotationSolver.Basic/Service.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ public static class Service

public static float CountDownTime => Countdown.TimeRemaining;


public static PluginConfiguration Config { get; set; }
public static PluginConfiguration Default { get; } = new PluginConfiguration();

Expand All @@ -31,7 +30,6 @@ public static ActionID GetAdjustedActionId(ActionID id)
public static unsafe uint GetAdjustedActionId(uint id)
=> ActionManager.Instance()->GetAdjustedActionId(id);


public unsafe static IEnumerable<IntPtr> GetAddons<T>() where T : struct
{
if(typeof(T).GetCustomAttribute<Addon>() is not Addon on) return Array.Empty<nint>();
Expand All @@ -45,7 +43,4 @@ public unsafe static IEnumerable<IntPtr> GetAddons<T>() where T : struct

internal static TextureWrap GetTextureIcon(uint id) => Svc.Data.GetImGuiTextureIcon(id);
internal static TextureWrap GetTexture(string path) => Svc.Data.GetImGuiTexture(path);

public static ClientLanguage Language => Svc.ClientState.ClientLanguage;

}
4 changes: 3 additions & 1 deletion RotationSolver/RotationSolverPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ public RotationSolverPlugin(DalamudPluginInterface pluginInterface)
Svc.PluginInterface.UiBuilder.Draw += OverlayWindow.Draw;

MajorUpdater.Enable();
Watcher.Enable();
OtherConfiguration.Init();
_dis.Add(new Watcher());
_dis.Add(new MovingController());
_dis.Add(new LocalizationManager());
#if DEBUG
Expand Down Expand Up @@ -91,6 +91,8 @@ internal static void ChangeUITranslation()
public void Dispose()
{
RSCommands.Disable();
Watcher.Disable();

Svc.PluginInterface.UiBuilder.OpenConfigUi -= OnOpenConfigUi;
Svc.PluginInterface.UiBuilder.Draw -= windowSystem.Draw;
Svc.PluginInterface.UiBuilder.Draw -= OverlayWindow.Draw;
Expand Down
Loading

0 comments on commit 76816e0

Please sign in to comment.