From 4dc28e94204ca006b7f3593aba7fa058d427070e Mon Sep 17 00:00:00 2001 From: Subv Date: Sun, 7 Oct 2012 19:31:13 -0500 Subject: Core/SAI: Fixes crashes when using SMART_EVENT_[IC/OOC]_LOS It should also fix some wrong behaviors in scripts that use these events. --- src/server/game/AI/SmartScripts/SmartScript.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index f37ae4fa60e..49023b2d5b5 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -2821,9 +2821,10 @@ void SmartScript::InitTimer(SmartScriptHolder& e) case SMART_EVENT_UPDATE: case SMART_EVENT_UPDATE_IC: case SMART_EVENT_UPDATE_OOC: - case SMART_EVENT_OOC_LOS: - case SMART_EVENT_IC_LOS: RecalcTimer(e, e.event.minMaxRepeat.min, e.event.minMaxRepeat.max); + case SMART_EVENT_IC_LOS: + case SMART_EVENT_OOC_LOS: + RecalcTimer(e, e.event.los.cooldownMin, e.event.los.cooldownMax); break; default: e.active = true; -- cgit v1.2.3