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

Commit

Permalink
fix: fixed the rotation choice on the main thread. Add a try catch to…
Browse files Browse the repository at this point in the history
… make sure it works.
  • Loading branch information
ArchiDog1998 committed Mar 18, 2023
1 parent f365bae commit db291d8
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 24 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using FFXIVClientStructs.FFXIV.Client.Game;
using RotationSolver.Basic;
using RotationSolver.Basic.Helpers;
using System;


namespace RotationSolver.Actions.BaseAction;

Expand Down
5 changes: 5 additions & 0 deletions RotationSolver/RotationHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ public static bool IsDefault(this ICustomRotation rotation)

public static bool IsAllowed(this ICustomRotation rotation, out string name)
{
if (rotation == null)
{
name = "Unknown";
return false;
}
name = rotation.GetType().Assembly.GetName().Name;
return _allowedAssembly.Contains(name);
}
Expand Down
25 changes: 8 additions & 17 deletions RotationSolver/UI/ControlWindow.cs
Original file line number Diff line number Diff line change
@@ -1,25 +1,16 @@
using Dalamud.Interface.Windowing;
using Dalamud.Interface.Colors;
using Dalamud.Interface.Windowing;
using FFXIVClientStructs.FFXIV.Client.Game;
using ImGuiNET;
using ImGuiScene;
using RotationSolver.Basic;
using RotationSolver.Updaters;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Sockets;
using System.Numerics;
using System.Text;
using System.Threading.Tasks;
using RotationSolver.Basic.Data;
using RotationSolver.Basic.Actions;
using RotationSolver.Commands;
using RotationSolver.Basic.Data;
using RotationSolver.Basic.Helpers;
using FFXIVClientStructs.FFXIV.Client.Game;
using Dalamud.Interface.Colors;
using RotationSolver.Commands;
using RotationSolver.Localization;
using Lumina.Excel.GeneratedSheets;
using ImGuiScene;
using static System.Net.Mime.MediaTypeNames;
using static FFXIVClientStructs.FFXIV.Client.Game.QuestManager.QuestListArray;
using RotationSolver.Updaters;
using System.Numerics;

namespace RotationSolver.UI;

Expand Down
17 changes: 12 additions & 5 deletions RotationSolver/Updaters/MajorUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,20 @@ private static void FrameworkUpdate(Framework framework)
// }
//#endif

SocialUpdater.UpdateSocial();
PreviewUpdater.UpdatePreview();
ActionUpdater.UpdateWeaponTime();
try
{
SocialUpdater.UpdateSocial();
PreviewUpdater.UpdatePreview();
ActionUpdater.UpdateWeaponTime();

ActionUpdater.DoAction();
ActionUpdater.DoAction();

MacroUpdater.UpdateMacro();
MacroUpdater.UpdateMacro();
}
catch (Exception ex)
{
PluginLog.Error(ex, "Main Thread Exception");
}

if (Service.Config.UseWorkTask)
{
Expand Down

0 comments on commit db291d8

Please sign in to comment.