Skip to content

Commit

Permalink
chore(Core/SmartAI): Add min/max timer error check for NEAR_PLAYERS (a…
Browse files Browse the repository at this point in the history
…zerothcore#16661)

Update SmartScriptMgr.cpp
  • Loading branch information
Gultask authored Jul 2, 2023
1 parent 5a186a6 commit 9d7e472
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 9d7e472

Please sign in to comment.