aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorccrs <ccrs@users.noreply.github.com>2025-10-16 20:15:43 +0200
committerccrs <ccrs@users.noreply.github.com>2025-10-16 20:15:43 +0200
commit328f82da78a347943124388f50a607b2a69a00a4 (patch)
tree53b598c3a4486c79e79230984f9ca56cf459c4dc
parent39859e7852016b31a327ac34f01f2091ca329aa4 (diff)
Core/SAI: allow indefinite movement pause timers in SmartScripts
This allows pausing random movement generator permanently, for example, instead of using a big number to simulate it.
-rw-r--r--src/server/game/AI/SmartScripts/SmartScriptMgr.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
index 2a685a6be04..d86bf0d9ef5 100644
--- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
@@ -1878,9 +1878,9 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
}
break;
case SMART_ACTION_PAUSE_MOVEMENT:
- if (!e.action.pauseMovement.pauseTimer)
+ if (e.action.pauseMovement.pauseTimer < 0)
{
- TC_LOG_ERROR("sql.sql", "Entry {} SourceType {} Event {} Action {} does not specify pause duration", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
+ TC_LOG_ERROR("sql.sql", "Entry {} SourceType {} Event {} Action {} specifies invalid pause duration", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
return false;
}