Core/SAI: Allow SMART_EVENT_HEALTH_PCT to be triggered out of combat

Port From (https://github.com/TrinityCore/TrinityCore/commit/1248bdffcb13f846fa42c6aee77cea685c756e51)
This commit is contained in:
Hondacrx
2025-08-10 17:09:51 -04:00
parent f27087d61b
commit b788b0eff2
+2 -2
View File
@@ -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;