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),