chore(Core/SmartAI): Add min/max timer error check for NEAR_PLAYERS (#16661)

Update SmartScriptMgr.cpp
This commit is contained in:
Gultask
2023-07-02 09:15:52 -03:00
committed by GitHub
parent 5a186a6d01
commit 9d7e472160

View File

@@ -1290,6 +1290,9 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
case SMART_EVENT_GO_EVENT_INFORM:
case SMART_EVENT_NEAR_PLAYERS:
case SMART_EVENT_NEAR_PLAYERS_NEGATION:
if (!IsMinMaxValid(e, e.event.nearPlayer.repeatMin, e.event.nearPlayer.repeatMax))
return false;
break;
case SMART_EVENT_NEAR_UNIT:
case SMART_EVENT_TIMED_EVENT_TRIGGERED:
case SMART_EVENT_INSTANCE_PLAYER_ENTER: