Skip to content

Commit

Permalink
yet another fix attempt for #26
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaksuhn committed Aug 16, 2024
1 parent b4a72ff commit e460129
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Automaton/Features/HuntRelayHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -243,15 +243,14 @@ private void HandleRelayLink(uint _, SeString link)

TaskManager.EnqueueDelay(500);
if (Config.DryRun)
TaskManager.Enqueue(() => Svc.Chat.Print(new XivChatEntry() { Type = (XivChatType)payload.OriginChannel, Message = $"[DRY RUN] {relay.BuiltString}" }));
TaskManager.Enqueue(() => Svc.Chat.Print(new XivChatEntry() { Type = (XivChatType)payload.OriginChannel, Message = new SeStringBuilder().AddText("[DRY RUN] ").Append(relay.BuiltString).BuiltString }));
else
#pragma warning disable CS0618 // Type or member is obsolete
// enqueue player not being null to queue up messages if you're travelling between zones
TaskManager.Enqueue(() =>
{
if (Player.Available)
if (Player.Available) // messages can't be set when travelling between zones where your player goes null
{
Chat.Instance.SendMessageUnsafe(Encoding.UTF8.GetBytes($"/{command} {relay.BuiltString}"));
Chat.Instance.SendMessageUnsafe([.. Encoding.UTF8.GetBytes($"/{command} "), .. relay.Build().Encode()]);
return true;
}
else return false;
Expand Down

0 comments on commit e460129

Please sign in to comment.