From b788b0eff2e386a0079d88c08edc2caf2df13227 Mon Sep 17 00:00:00 2001 From: Hondacrx Date: Sun, 10 Aug 2025 17:09:51 -0400 Subject: [PATCH] Core/SAI: Allow SMART_EVENT_HEALTH_PCT to be triggered out of combat Port From (https://github.com/TrinityCore/TrinityCore/commit/1248bdffcb13f846fa42c6aee77cea685c756e51) --- Source/Game/AI/SmartScripts/SmartScript.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Game/AI/SmartScripts/SmartScript.cs b/Source/Game/AI/SmartScripts/SmartScript.cs index b33460178..e6e5625ce 100644 --- a/Source/Game/AI/SmartScripts/SmartScript.cs +++ b/Source/Game/AI/SmartScripts/SmartScript.cs @@ -3111,7 +3111,7 @@ namespace Game.AI break; case SmartEvents.HealthPct: { - if (_me == null || !_me.IsEngaged() || _me.GetMaxHealth() == 0) + if (_me == null || _me.IsInEvadeMode() || _me.GetMaxHealth() == 0) return; uint perc = (uint)_me.GetHealthPct(); if (perc > e.Event.minMaxRepeat.max || perc < e.Event.minMaxRepeat.min) @@ -3523,7 +3523,7 @@ namespace Game.AI } case SmartEvents.FriendlyHealthPCT: { - if (_me == null || !_me.IsEngaged()) + if (_me == null || _me.IsInEvadeMode()) return; Unit unitTarget = null;