mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 02:46:33 +01:00
Implemented new event for EventAI, EVENT_T_RESET.
--HG-- branch : trunk
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -58,6 +58,7 @@ enum EventAI_Type
|
||||
EVENT_T_RECEIVE_EMOTE = 22, // EmoteId, Condition, CondValue1, CondValue2
|
||||
EVENT_T_BUFFED = 23, // Param1 = SpellID, Param2 = Number of Time STacked, Param3/4 Repeat Min/Max
|
||||
EVENT_T_TARGET_BUFFED = 24, // Param1 = SpellID, Param2 = Number of Time STacked, Param3/4 Repeat Min/Max
|
||||
EVENT_T_RESET = 35, // Is it called after combat, when the creature respawn and spawn. -- TRINITY ONLY
|
||||
|
||||
EVENT_T_END,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user