aboutsummaryrefslogtreecommitdiff
path: root/src/game/CreatureEventAI.cpp
diff options
context:
space:
mode:
author_manuel_ <none@none>2010-01-08 14:40:55 -0300
committer_manuel_ <none@none>2010-01-08 14:40:55 -0300
commitdcf4883b51e943f2b514166e278fe5fba94e663b (patch)
treea68683a728d032177a280870c882ac0cce17ac77 /src/game/CreatureEventAI.cpp
parentd4228470e40befca19ff45ae1f1a550145b9beeb (diff)
Implemented new event for EventAI, EVENT_T_RESET.
--HG-- branch : trunk
Diffstat (limited to 'src/game/CreatureEventAI.cpp')
-rw-r--r--src/game/CreatureEventAI.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/game/CreatureEventAI.cpp b/src/game/CreatureEventAI.cpp
index d069f7f4348..3bef84e87b4 100644
--- a/src/game/CreatureEventAI.cpp
+++ b/src/game/CreatureEventAI.cpp
@@ -186,6 +186,7 @@ bool CreatureEventAI::ProcessEvent(CreatureEventAIHolder& pHolder, Unit* pAction
//Repeat Timers
pHolder.UpdateRepeatTimer(m_creature,event.ooc_los.repeatMin,event.ooc_los.repeatMax);
break;
+ case EVENT_T_RESET:
case EVENT_T_SPAWNED:
break;
case EVENT_T_TARGET_HP:
@@ -835,6 +836,14 @@ void CreatureEventAI::Reset()
if (bEmptyList)
return;
+
+ for (std::list<CreatureEventAIHolder>::iterator i = CreatureEventAIList.begin(); i != CreatureEventAIList.end(); ++i)
+ {
+ if ((*i).Event.event_type == EVENT_T_RESET)
+ ProcessEvent(*i);
+ }
+
+
//Reset all events to enabled
for (std::list<CreatureEventAIHolder>::iterator i = CreatureEventAIList.begin(); i != CreatureEventAIList.end(); ++i)
{