Skip to content
Browse files

Core/SAI: Fix assertion in SMART_ACTION_CALL_RANDOM_RANGE_TIMED_ACTIO…

…NLIST

Fix assertion triggered in SMART_ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST if max entry is less than min entry
  • Loading branch information...
1 parent 2974057 commit 7a188c8685aa0f2fccba636d66ba736b13ea604f @jackpoz jackpoz committed Feb 9, 2014
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
View
7 src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
@@ -887,6 +887,12 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
return false;
break;
}
+ case SMART_ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST:
+ {
+ if (!IsMinMaxValid(e, e.action.randTimedActionList.entry1, e.action.randTimedActionList.entry2))
+ return false;
+ break;
+ }
case SMART_ACTION_SET_POWER:
case SMART_ACTION_ADD_POWER:
case SMART_ACTION_REMOVE_POWER:
@@ -986,7 +992,6 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
case SMART_ACTION_SIMPLE_TALK:
case SMART_ACTION_CROSS_CAST:
case SMART_ACTION_CALL_RANDOM_TIMED_ACTIONLIST:
- case SMART_ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST:
case SMART_ACTION_RANDOM_MOVE:
case SMART_ACTION_SET_UNIT_FIELD_BYTES_1:
case SMART_ACTION_REMOVE_UNIT_FIELD_BYTES_1:

0 comments on commit 7a188c8

Please sign in to comment.
Something went wrong with that request. Please try again.