aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSubv2112 <s.v.h21@hotmail.com>2012-01-06 22:24:11 -0500
committerSubv2112 <s.v.h21@hotmail.com>2012-01-06 22:24:11 -0500
commit15d876347892e372276f3941ef755f61d8d1b77f (patch)
tree3dd4b664ec033d9fa073b55cfcd820236c4c2027
parent7f977c28b64848c9fd10df76a09edb87781b6b1d (diff)
Core/SAI: Fixed the crash with using SMART_ACTION_ATTACK_START inside a TimedActionList, closes #4650
Signed-off-by: Subv2112 <s.v.h21@hotmail.com>
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.cpp17
-rw-r--r--src/server/game/AI/SmartScripts/SmartScriptMgr.h2
2 files changed, 1 insertions, 18 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp
index a2e70e9cbf2..c0ef31d2468 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScript.cpp
@@ -78,22 +78,6 @@ void SmartScript::OnReset()
void SmartScript::ProcessEventsFor(SMART_EVENT e, Unit* unit, uint32 var0, uint32 var1, bool bvar, const SpellInfo* spell, GameObject* gob)
{
- if (e == SMART_EVENT_AGGRO)
- {
- if (!mResumeActionList)
- mTimedActionList.clear();//clear action list if it is not resumable
- else
- {
- for (SmartAIEventList::iterator itr = mTimedActionList.begin(); itr != mTimedActionList.end(); ++itr)
- {
- if (itr->enableTimed)
- {
- InitTimer((*itr));//re-init the currently enabled timer, so it restarts the timer when resumed
- break;
- }
- }
- }
- }
for (SmartAIEventList::iterator i = mEvents.begin(); i != mEvents.end(); ++i)
{
SMART_EVENT eventType = SMART_EVENT((*i).GetEventType());
@@ -3017,7 +3001,6 @@ void SmartScript::SetScript9(SmartScriptHolder& e, uint32 entry)
i->event.type = SMART_EVENT_UPDATE_IC;
else if (e.action.timedActionList.timerType > 1)
i->event.type = SMART_EVENT_UPDATE;
- mResumeActionList = e.action.timedActionList.dontResume ? false : true;
InitTimer((*i));
}
}
diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h
index ec4355111b9..f44855259d4 100644
--- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h
+++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h
@@ -824,7 +824,7 @@ struct SmartAction
struct
{
uint32 id;
- uint32 dontResume;
+ uint32 unused;
uint32 timerType;
} timedActionList;