From 801df0ea43e2f92d011a29e5ff71a88c178252cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=8B=E6=B0=B4?= <1123993881@qq.com> Date: Sun, 10 Sep 2023 21:38:37 +0800 Subject: [PATCH] fix: release version fix. --- RotationSolver/Updaters/SocialUpdater.cs | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/RotationSolver/Updaters/SocialUpdater.cs b/RotationSolver/Updaters/SocialUpdater.cs index 15150282b..015cc5296 100644 --- a/RotationSolver/Updaters/SocialUpdater.cs +++ b/RotationSolver/Updaters/SocialUpdater.cs @@ -181,7 +181,7 @@ private static async void SayHelloToAuthor() #if DEBUG #else - Svc.Targets.Target = c; + Svc.Targets.Target = entity.player; Chat.Instance.SendMessage($"/{_macroToAuthor[new Random().Next(_macroToAuthor.Count)]} "); #endif Svc.Chat.PrintChat(new Dalamud.Game.Text.XivChatEntry() @@ -218,9 +218,22 @@ internal static string EncryptString(PlayerCharacter player) internal abstract class ChatEntity : IDisposable { - protected readonly PlayerCharacter player; + public readonly PlayerCharacter player; - public bool CanTarget => player.IsTargetable(); + public bool CanTarget + { + get + { + try + { + return player.IsTargetable(); + } + catch + { + return false; + } + } + } protected SeString Character => new SeString(new IconPayload(BitmapFontIcon.Mentor), new UIForegroundPayload(31),