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

Commit

Permalink
fix: add a new try saying for TTT.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Jul 12, 2023
1 parent 27324a3 commit 4f23d32
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
4 changes: 3 additions & 1 deletion Resources/AnimationLockTime.json
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,13 @@
"7510": 0.1,
"7511": 0.1,
"7513": 0.6,
"7514": 0.6,
"7514": 0.1,
"7517": 0.6,
"7518": 0.6,
"7519": 0.6,
"7520": 0.6,
"7521": 0.6,
"7523": 0.6,
"7524": 0.1,
"7525": 0.6,
"7526": 0.6,
Expand Down Expand Up @@ -351,6 +352,7 @@
"16525": 0.1,
"16526": 0.6,
"16527": 0.6,
"16530": 0.6,
"16531": 0.6,
"16532": 0.6,
"16533": 0.1,
Expand Down
16 changes: 13 additions & 3 deletions RotationSolver/SpeechHelper.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using Dalamud.Logging;
using Dalamud.Game.Text.SeStringHandling;
using Dalamud.Game.Text.SeStringHandling.Payloads;
using Dalamud.Logging;
using Dalamud.Plugin;
using ECommons.DalamudServices;
using ECommons.Reflection;
Expand All @@ -13,6 +15,7 @@ internal static class SpeechHelper
static object _manager = null;
static MethodInfo _stop = null;
static bool _showed = false;

internal static void Speak(string text)
{
if(_textToTalk == null)
Expand All @@ -33,11 +36,18 @@ internal static void Speak(string text)
try
{
_stop?.Invoke(_manager, Array.Empty<object>());
_say?.Invoke(_textToTalk, new object[] { null, text, 1 });
try
{
_say?.Invoke(_textToTalk, new object[] { null, text, 1 });
}
catch
{
_say?.Invoke(_textToTalk, new object[] { null, new SeString(new TextPayload("Rotation Solver")) , text, 1 });
}
}
catch (Exception ex)
{
PluginLog.Warning(ex, "something wrong with TTT");
PluginLog.Warning(ex, "Something wrong with TTT.");
}
}
}

0 comments on commit 4f23d32

Please sign in to comment.