mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +00:00
[11901] Prevent EVENT_T_TIMER_OCC to expire while evading
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
parent
02101dc111
commit
97cb838de1
3 changed files with 4 additions and 8 deletions
|
|
@ -65,7 +65,7 @@ Some events such as EVENT_T_AGGRO, EVENT_T_DEATH, EVENT_T_SPAWNED, and EVENT_T_E
|
|||
# Internal name Param usage Description
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
0 EVENT_T_TIMER InitialMin, InitialMax, RepeatMin, RepeatMax Expires at first between (Param1) and (Param2) and then will repeat between every (Param3) and (Param4), EXPIRES ONLY IN COMBAT.
|
||||
1 EVENT_T_TIMER_OOC InitialMin, InitialMax, RepeatMin, RepeatMax Expires at first between (Param1) and (Param2) and then will repeat between every (Param3) and (Param4), EXPIRES ONLY OUT OF COMBAT.
|
||||
1 EVENT_T_TIMER_OOC InitialMin, InitialMax, RepeatMin, RepeatMax Expires at first between (Param1) and (Param2) and then will repeat between every (Param3) and (Param4), EXPIRES ONLY OUT OF COMBAT WHILE NOT EVADING.
|
||||
2 EVENT_T_HP HPMax%, HPMin%, RepeatMin, RepeatMax Expires when the Creature's HP is between (Param1) and (Param2). Will repeat between every (Param3) and (Param4).
|
||||
3 EVENT_T_MANA ManaMax%,ManaMin% RepeatMin, RepeatMax Expires once the Creature's Mana% is between (Param1) and (Param2). Will repeat between every (Param3) and (Param4).
|
||||
4 EVENT_T_AGGRO NONE Expires ONLY upon the Creature's INITIAL Aggro at the Start of Combat (Does NOT Repeat).
|
||||
|
|
@ -180,7 +180,7 @@ Parameter 2: InitialMax - Maximum Time used to calculate Random Initial Expire
|
|||
Parameter 3: RepeatMin - Minimum Time used to calculate Random Repeat Expire
|
||||
Parameter 4: RepeatMax - Maximum Time used to calculate Random Repeat Expire
|
||||
|
||||
OUT OF COMBAT ONLY! - Expires first between (Param1) and (Param2) and then between every (Param3) and (Param4) from then on.
|
||||
OUT OF COMBAT ONLY! NOT WHILE EVADING. - Expires first between (Param1) and (Param2) and then between every (Param3) and (Param4) from then on.
|
||||
This is commonly used for events that occur and repeat outside of combat.
|
||||
|
||||
---------------
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ bool CreatureEventAI::ProcessEvent(CreatureEventAIHolder& pHolder, Unit* pAction
|
|||
pHolder.UpdateRepeatTimer(m_creature,event.timer.repeatMin,event.timer.repeatMax);
|
||||
break;
|
||||
case EVENT_T_TIMER_OOC:
|
||||
if (m_creature->isInCombat())
|
||||
if (m_creature->isInCombat() || m_creature->IsInEvadeMode())
|
||||
return false;
|
||||
|
||||
//Repeat Timers
|
||||
|
|
@ -1136,10 +1136,6 @@ void CreatureEventAI::UpdateAI(const uint32 diff)
|
|||
//Check if we are in combat (also updates calls threat update code)
|
||||
bool Combat = m_creature->SelectHostileTarget() && m_creature->getVictim();
|
||||
|
||||
//Must return if creature isn't alive. Normally select hostil target and get victim prevent this
|
||||
if (!m_creature->isAlive())
|
||||
return;
|
||||
|
||||
if (!m_bEmptyList)
|
||||
{
|
||||
//Events are only updated once every EVENT_UPDATE_TIME ms to prevent lag with large amount of events
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "11900"
|
||||
#define REVISION_NR "11901"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue