Fix tell reply not working
This commit is contained in:
@@ -20,6 +20,7 @@ using FFXIVClientStructs.FFXIV.Client.UI.Info;
|
|||||||
using FFXIVClientStructs.FFXIV.Client.UI.Misc;
|
using FFXIVClientStructs.FFXIV.Client.UI.Misc;
|
||||||
using FFXIVClientStructs.FFXIV.Client.UI.Shell;
|
using FFXIVClientStructs.FFXIV.Client.UI.Shell;
|
||||||
using FFXIVClientStructs.FFXIV.Component.GUI;
|
using FFXIVClientStructs.FFXIV.Component.GUI;
|
||||||
|
using Lumina.Text.ReadOnly;
|
||||||
|
|
||||||
using ValueType = FFXIVClientStructs.FFXIV.Component.GUI.ValueType;
|
using ValueType = FFXIVClientStructs.FFXIV.Component.GUI.ValueType;
|
||||||
|
|
||||||
@@ -593,15 +594,13 @@ internal sealed unsafe class Chat : IDisposable
|
|||||||
|
|
||||||
internal TellHistoryInfo? GetTellHistoryInfo(int index)
|
internal TellHistoryInfo? GetTellHistoryInfo(int index)
|
||||||
{
|
{
|
||||||
var ptr = AcquaintanceModule.Instance()->GetTellHistory(index);
|
var acquaintance = AcquaintanceModule.Instance()->GetTellHistory(index);
|
||||||
|
if (acquaintance->ContentId == 0)
|
||||||
// TODO does this check work?
|
|
||||||
if (ptr->ContentId == 0)
|
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
var name = MemoryHelper.ReadStringNullTerminated(*(nint*) ptr);
|
var name = new ReadOnlySeStringSpan(acquaintance->Name.AsSpan()).ExtractText();
|
||||||
var world = *(ushort*) (ptr + 0xD0);
|
var world = acquaintance->WorldId;
|
||||||
var contentId = *(ulong*) (ptr + 0xD8);
|
var contentId = acquaintance->ContentId;
|
||||||
|
|
||||||
return new TellHistoryInfo(name, world, contentId);
|
return new TellHistoryInfo(name, world, contentId);
|
||||||
}
|
}
|
||||||
@@ -630,7 +629,7 @@ internal sealed unsafe class Chat : IDisposable
|
|||||||
uMessage->Dtor(true);
|
uMessage->Dtor(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal byte[] EncodeMessage(string str) {
|
private byte[] EncodeMessage(string str) {
|
||||||
using var input = new Utf8String(str);
|
using var input = new Utf8String(str);
|
||||||
using var ouput = new Utf8String();
|
using var ouput = new Utf8String();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user