Implement #10 with fixed payload byte[]
This commit is contained in:
@@ -654,7 +654,10 @@ public sealed class ChatLogWindow : Window, IUiComponent {
|
||||
HandleKeybinds(true);
|
||||
}
|
||||
|
||||
if (!Activate && !ImGui.IsItemActive()) {
|
||||
// If we're currently using a temporary channel, switch back to the
|
||||
// original channel when the input loses focus *unless* the
|
||||
// auto-translate popup is open.
|
||||
if (_tempChannel != null && !Activate && !ImGui.IsItemActive() && _autoCompleteInfo == null) {
|
||||
if (_tempChannel is InputChannel.Tell) {
|
||||
_tellTarget = null;
|
||||
}
|
||||
@@ -742,7 +745,9 @@ public sealed class ChatLogWindow : Window, IUiComponent {
|
||||
reason = TellReason.Friend;
|
||||
}
|
||||
|
||||
Plugin.Functions.Chat.SendTell(reason, target.ContentId, target.Name, (ushort) world.RowId, trimmed);
|
||||
var tellBytes = Encoding.UTF8.GetBytes(trimmed);
|
||||
AutoTranslate.ReplaceWithPayload(Plugin.DataManager, ref tellBytes);
|
||||
Plugin.Functions.Chat.SendTell(reason, target.ContentId, target.Name, (ushort) world.RowId, tellBytes);
|
||||
}
|
||||
|
||||
if (_tempChannel is InputChannel.Tell) {
|
||||
|
||||
Reference in New Issue
Block a user