diff options
| author | megamage <none@none> | 2009-04-17 15:36:10 -0500 |
|---|---|---|
| committer | megamage <none@none> | 2009-04-17 15:36:10 -0500 |
| commit | b9d8bdeddde70359c4a3b115ccb646abb59357cc (patch) | |
| tree | bf8572ad03523f0b86ad9d7ea72b481148d123ee /src/game | |
| parent | f0cbed1ad8376200bb450768d7b77198e6754113 (diff) | |
*Remove event_ai from script folder.
--HG--
branch : trunk
Diffstat (limited to 'src/game')
| -rw-r--r-- | src/game/CreatureEventAI.cpp | 14 | ||||
| -rw-r--r-- | src/game/CreatureEventAI.h | 7 |
2 files changed, 18 insertions, 3 deletions
diff --git a/src/game/CreatureEventAI.cpp b/src/game/CreatureEventAI.cpp index f39948dabd7..88e922bc16b 100644 --- a/src/game/CreatureEventAI.cpp +++ b/src/game/CreatureEventAI.cpp @@ -984,6 +984,20 @@ void CreatureEventAI::ProcessAction(uint16 type, uint32 param1, uint32 param2, u case ACTION_T_ATTACK_START_PULSE: AttackStart(me->SelectNearestTarget((float)param1)); break; + case ACTION_T_SUMMON_GO: + { + GameObject* pObject = NULL; + + float x,y,z; + m_creature->GetPosition(x,y,z); + pObject = m_creature->SummonGameObject(param1, x, y, z, 0, 0, 0, 0, 0, param2); + if (!pObject) + { + if (EAI_ErrorLevel > 0) + error_db_log( "SD2: EventAI failed to spawn object %u. Spawn event %d is on creature %d", param1, EventId, m_creature->GetEntry()); + } + } + break; } } diff --git a/src/game/CreatureEventAI.h b/src/game/CreatureEventAI.h index f5e89026508..056748631ee 100644 --- a/src/game/CreatureEventAI.h +++ b/src/game/CreatureEventAI.h @@ -103,9 +103,10 @@ enum EventAI_ActionType ACTION_T_DIE = 37, //No Params ACTION_T_ZONE_COMBAT_PULSE = 38, //No Params - ACTION_T_SET_ACTIVE = 101, //Apply - ACTION_T_SET_AGGRESSIVE = 102, //Apply - ACTION_T_ATTACK_START_PULSE = 103, //Distance + ACTION_T_SET_ACTIVE = 101, //Apply + ACTION_T_SET_AGGRESSIVE = 102, //Apply + ACTION_T_ATTACK_START_PULSE = 103, //Distance + ACTION_T_SUMMON_GO = 104, //GameObjectID, DespawnTime in ms ACTION_T_END, }; |
