[11901] Prevent EVENT_T_TIMER_OCC to expire while evading

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
Quriq14 2012-02-06 21:17:27 +01:00 committed by Schmoozerd
parent 02101dc111
commit 97cb838de1
3 changed files with 4 additions and 8 deletions

View file

@ -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