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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user