diff options
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, }; |
