From da6faec79b16877353daeee3b49243d6268163f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=8B=E6=B0=B4?= <1123993881@qq.com> Date: Thu, 29 Jun 2023 08:37:40 +0800 Subject: [PATCH] fix: less bug report in dalamud log. --- Resources/AnimationLockTime.json | 3 ++- Resources/HostileCastingArea.json | 2 ++ RotationSolver/Updaters/MajorUpdater.cs | 14 ++++++++++++-- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/Resources/AnimationLockTime.json b/Resources/AnimationLockTime.json index 6803277c8..77aa73786 100644 --- a/Resources/AnimationLockTime.json +++ b/Resources/AnimationLockTime.json @@ -87,6 +87,7 @@ "2255": 0.6, "2258": 0.6, "2259": 0.35, + "2262": 0.8, "2263": 0.35, "2264": 0.6, "2267": 0.6, @@ -144,7 +145,7 @@ "3612": 0.6, "3613": 0.6, "3614": 0.6, - "3615": 0.1, + "3615": 0.6, "4262": 0.6, "4401": 0.6, "4402": 0.6, diff --git a/Resources/HostileCastingArea.json b/Resources/HostileCastingArea.json index a47de571c..7d1dca90a 100644 --- a/Resources/HostileCastingArea.json +++ b/Resources/HostileCastingArea.json @@ -54,6 +54,8 @@ 8039, 8367, 8581, + 9414, + 9416, 9523, 9660, 9665, diff --git a/RotationSolver/Updaters/MajorUpdater.cs b/RotationSolver/Updaters/MajorUpdater.cs index 52935400c..81e66cf46 100644 --- a/RotationSolver/Updaters/MajorUpdater.cs +++ b/RotationSolver/Updaters/MajorUpdater.cs @@ -26,6 +26,7 @@ internal static class MajorUpdater #endif static bool _showed; + static Exception _threadException; //static int count = 0; private static void FrameworkUpdate(Framework framework) @@ -89,7 +90,11 @@ private static void FrameworkUpdate(Framework framework) } catch (Exception ex) { - PluginLog.Error(ex, "Main Thread Exception"); + if(_threadException != ex) + { + _threadException = ex; + PluginLog.Error(ex, "Main Thread Exception"); + } } if (Service.Config.UseWorkTask) @@ -118,6 +123,7 @@ public static void Enable() } static bool _work; + static Exception _innerException; private static void UpdateWork() { if (!IsValid) @@ -150,7 +156,11 @@ private static void UpdateWork() } catch (Exception ex) { - PluginLog.Error(ex, "Inner Worker Exception"); + if(_innerException != ex) + { + _innerException = ex; + PluginLog.Error(ex, "Inner Worker Exception"); + } } _work = false;