From 0c964dadae20751b37334d6c959e3d9492adba2d Mon Sep 17 00:00:00 2001 From: skelUA Date: Wed, 20 Mar 2024 06:38:57 +0200 Subject: [PATCH] fix (Core/Scripting): SMART_EVENT_NEAR_PLAYERS (#18514) * FIX SMART_EVENT_NEAR_PLAYERS * FIX SMART_EVENT_NEAR_PLAYERS (fix build) --- src/server/game/AI/SmartScripts/SmartScript.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 89142c7a0..89df09146 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -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;