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

Commit

Permalink
fix: logs for image loading.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed May 19, 2023
1 parent 3b416d9 commit b6f389c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
8 changes: 5 additions & 3 deletions RotationSolver.Basic/Data/IconSet.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Dalamud.Utility;
using Dalamud.Logging;
using Dalamud.Utility;
using ECommons.DalamudServices;
using ImGuiScene;
using System.Net;
Expand Down Expand Up @@ -105,8 +106,9 @@ private static TextureWrap TryLoadImage(byte[] bytes)
{
return Svc.PluginInterface.UiBuilder.LoadImage(bytes);
}
catch
catch(Exception e)
{
PluginLog.Warning(e, "Load image failed in RS!");
return null;
}
}
Expand All @@ -116,7 +118,7 @@ public static void Dispose()
{
item?.Dispose();
}
foreach (var item in _texturesPath.Values)
foreach (var item in _texturesPath.Values)
{
item?.Dispose();
}
Expand Down
11 changes: 9 additions & 2 deletions RotationSolver.Basic/DataCenter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,8 @@ public static float DPSTaken
public const float MinAnimationLock = 0.6f;
internal static unsafe void AddActionRec(Action act)
{
if (!Player.Available) return;

var id = (ActionID)act.RowId;

//Record
Expand All @@ -358,10 +360,15 @@ internal static unsafe void AddActionRec(Action act)
case ActionCate.Ability:
LastAction = LastAbility = id;

if (!act.IsRealGCD() && ActionManager.GetMaxCharges((uint)id, Player.Object?.Level ?? 1) < 2)
try
{
FetchTime = ActionManager.Instance()->GetRecastGroupDetail(act.CooldownGroup - 1)->Elapsed;
if (!act.IsRealGCD() && ActionManager.GetMaxCharges((uint)id, Player.Object?.Level ?? 1) < 2)
{
FetchTime = ActionManager.Instance()->GetRecastGroupDetail(act.CooldownGroup - 1)->Elapsed;
}
}
catch { }

break;
default:
return;
Expand Down

0 comments on commit b6f389c

Please sign in to comment.