Fix honorific

This commit is contained in:
Loporrit
2025-03-28 07:58:15 +00:00
parent 063eb5082a
commit 1fa5deede7
2 changed files with 8 additions and 4 deletions

View File

@@ -77,11 +77,14 @@ public sealed class IpcCallerHonorific : IIpcCaller
}).ConfigureAwait(false);
}
public string GetTitle()
public async Task<string> GetTitle()
{
if (!APIAvailable) return string.Empty;
string title = _honorificGetLocalCharacterTitle.InvokeFunc();
return string.IsNullOrEmpty(title) ? string.Empty : Convert.ToBase64String(Encoding.UTF8.GetBytes(title));
return await _dalamudUtil.RunOnFrameworkThread(() =>
{
string title = _honorificGetLocalCharacterTitle.InvokeFunc();
return string.IsNullOrEmpty(title) ? string.Empty : Convert.ToBase64String(Encoding.UTF8.GetBytes(title));
}).ConfigureAwait(false);
}
public async Task SetTitleAsync(IntPtr character, string honorificDataB64)