From cc98484ed74007033a960c697dd055fa7c67ac89 Mon Sep 17 00:00:00 2001 From: Jeann Sebold Date: Thu, 14 Mar 2024 15:02:03 -0300 Subject: [PATCH] fix --- src/ClassicUO.Client/Game/UI/Gumps/HealthBarGump.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ClassicUO.Client/Game/UI/Gumps/HealthBarGump.cs b/src/ClassicUO.Client/Game/UI/Gumps/HealthBarGump.cs index 1fcfbdf2c..502fc3573 100644 --- a/src/ClassicUO.Client/Game/UI/Gumps/HealthBarGump.cs +++ b/src/ClassicUO.Client/Game/UI/Gumps/HealthBarGump.cs @@ -280,8 +280,11 @@ protected override void OnMouseDown(int x, int y, MouseButtonType button) else { - TargetManager.LastTargetInfo.Serial = LocalEntity.Serial; - GameActions.Print(World.Player, $"Target: {LocalEntity.Name}"); + if (LocalEntity != null && LocalEntity.Serial != default) + { + TargetManager.LastTargetInfo.Serial = LocalEntity.Serial; + } + } // ## BEGIN - END ## // MISC Mouse.LastLeftButtonClickTime = 0;