fix (Core/Scripting): SMART_EVENT_NEAR_PLAYERS (#18514)

* FIX SMART_EVENT_NEAR_PLAYERS

* FIX SMART_EVENT_NEAR_PLAYERS (fix build)
This commit is contained in:
skelUA
2024-03-20 06:38:57 +02:00
committed by GitHub
parent 9c27c8939e
commit 0c964dadae

View File

@@ -4398,10 +4398,9 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
{
if (IsPlayer(target))
playerCount++;
if (playerCount >= e.event.nearPlayer.minCount)
ProcessAction(e, target->ToUnit());
}
if (playerCount >= e.event.nearPlayer.minCount)
ProcessAction(e, unit);
}
RecalcTimer(e, e.event.nearPlayer.repeatMin, e.event.nearPlayer.repeatMax);
break;