- Fix tells not working in Forays

This commit is contained in:
Infi
2025-06-09 09:50:14 +02:00
parent 3951c49e1a
commit f3783e9abf
4 changed files with 12 additions and 8 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
<Project Sdk="Dalamud.NET.Sdk/12.0.2"> <Project Sdk="Dalamud.NET.Sdk/12.0.2">
<PropertyGroup> <PropertyGroup>
<Version>1.30.3</Version> <Version>1.30.4</Version>
<TargetFramework>net9.0-windows</TargetFramework> <TargetFramework>net9.0-windows</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
+4
View File
@@ -439,6 +439,10 @@ internal sealed unsafe class Chat : IDisposable
if (!Plugin.CurrentTab.CurrentChannel.UseTempChannel) if (!Plugin.CurrentTab.CurrentChannel.UseTempChannel)
Plugin.CurrentTab.CurrentChannel.UseTempChannel = true; Plugin.CurrentTab.CurrentChannel.UseTempChannel = true;
// Send tell via CommandInner later and let the game handle it
// Only works because we use the SetTellTargetInForay function to set all required information
Plugin.ChatLogWindow.TellSpecial = true;
var utfName = Utf8String.FromString(name); var utfName = Utf8String.FromString(name);
var utfWorld = Utf8String.FromString(worldName); var utfWorld = Utf8String.FromString(worldName);
+4 -5
View File
@@ -574,11 +574,10 @@ public sealed class PayloadHandler
var name = new List<Chunk> { new TextChunk(ChunkSource.None, null, player.PlayerName) }; var name = new List<Chunk> { new TextChunk(ChunkSource.None, null, player.PlayerName) };
if (world.Value.IsPublic) if (world.Value.IsPublic)
{ {
name.AddRange(new Chunk[] name.AddRange([
{
new IconChunk(ChunkSource.None, null, BitmapFontIcon.CrossWorld), new IconChunk(ChunkSource.None, null, BitmapFontIcon.CrossWorld),
new TextChunk(ChunkSource.None, null, world.Value.Name.ExtractText()), new TextChunk(ChunkSource.None, null, world.Value.Name.ExtractText())
}); ]);
} }
LogWindow.DrawChunks(name, false); LogWindow.DrawChunks(name, false);
@@ -587,7 +586,7 @@ public sealed class PayloadHandler
var validContentId = chunk.Message?.ContentId is not (null or 0); var validContentId = chunk.Message?.ContentId is not (null or 0);
if (ImGui.Selectable(Language.Context_SendTell)) if (ImGui.Selectable(Language.Context_SendTell))
{ {
// Eureka and Bozja need special handling as tells work different // Eureka, Bozja and Occult need special handling as tells work different
if (!Sheets.IsInForay()) if (!Sheets.IsInForay())
{ {
LogWindow.Chat = $"/tell {player.PlayerName}"; LogWindow.Chat = $"/tell {player.PlayerName}";
+3 -2
View File
@@ -28,6 +28,7 @@ public static class Sheets
EventItemHelpSheet = Plugin.DataManager.GetExcelSheet<EventItemHelp>(); EventItemHelpSheet = Plugin.DataManager.GetExcelSheet<EventItemHelp>();
} }
public static bool IsInForay() => TerritorySheet.TryGetRow(Plugin.ClientState.TerritoryType, out var row) && public static bool IsInForay() =>
row.TerritoryIntendedUse.RowId == 41; TerritorySheet.TryGetRow(Plugin.ClientState.TerritoryType, out var row) &&
row.TerritoryIntendedUse.RowId is 41 or 61;
} }