- Potential fix for tells getting stuck

- Allow debugger use outside of debug builds
This commit is contained in:
Infi
2024-12-23 04:48:40 +01:00
parent 70971d7b8a
commit f6dd0359e7
5 changed files with 10 additions and 8 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Version>1.29.15</Version>
<Version>1.29.16</Version>
<TargetFramework>net8.0-windows</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
+4 -1
View File
@@ -211,7 +211,10 @@ internal sealed unsafe class Chat : IDisposable
// We already called this function once, so we skip the duplicated call
// Also return the original value here so that vanilla chat receives all information
if (Plugin.ChatLogWindow.TellSpecial)
{
Plugin.Log.Information("Return early to prevent duplicated call...");
return ChatLogRefreshHook!.Original(log, eventId, value);
}
Plugin.ChatLogWindow.Activated(new ChatActivatedArgs(new ChannelSwitchInfo(null)) { AddIfNotPresent = addIfNotPresent, });
}
@@ -313,7 +316,7 @@ internal sealed unsafe class Chat : IDisposable
{
TellReason = (TellReason) reason,
TellTarget = target,
TellSpecial = true,
TellSpecial = Sheets.IsInForay(), // Handle Eureka/Bozja special
});
}
catch (Exception ex)
+1 -1
View File
@@ -543,7 +543,7 @@ public sealed class PayloadHandler
if (ImGui.Selectable(Language.Context_SendTell))
{
// Eureka and Bozja need special handling as tells work different
if (Sheets.TerritorySheet.GetRow(Plugin.ClientState.TerritoryType).TerritoryIntendedUse.RowId != 41)
if (!Sheets.IsInForay())
{
LogWindow.Chat = $"/tell {player.PlayerName}";
if (world.Value.IsPublic)
+3
View File
@@ -27,4 +27,7 @@ public static class Sheets
TextCommandSheet = Plugin.DataManager.GetExcelSheet<TextCommand>();
EventItemHelpSheet = Plugin.DataManager.GetExcelSheet<EventItemHelp>();
}
public static bool IsInForay() => TerritorySheet.TryGetRow(Plugin.ClientState.TerritoryType, out var row) &&
row.TerritoryIntendedUse.RowId == 41;
}
+1 -5
View File
@@ -14,7 +14,7 @@ public class DebuggerWindow : Window
private readonly Plugin Plugin;
private readonly ChatLogWindow ChatLogWindow;
public DebuggerWindow(Plugin plugin) : base($"Debugger###chat2-debugger")
public DebuggerWindow(Plugin plugin) : base("Debugger###chat2-debugger")
{
Plugin = plugin;
ChatLogWindow = plugin.ChatLogWindow;
@@ -28,16 +28,12 @@ public class DebuggerWindow : Window
RespectCloseHotkey = false;
DisableWindowSounds = true;
#if DEBUG
Plugin.Commands.Register("/chat2Debugger", showInHelp: false).Execute += Toggle;
#endif
}
public void Dispose()
{
#if DEBUG
Plugin.Commands.Register("/chat2Debugger", showInHelp: false).Execute -= Toggle;
#endif
}
private void Toggle(string _, string __) => Toggle();