*Fix the bug that grobbulus spams mutating injection.

*Fix the bug that kelthuzad enter evade mode immediately after enter combat.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-05-03 11:11:35 -05:00
parent 206556b111
commit 84f2aa1e28
2 changed files with 4 additions and 3 deletions
@@ -96,8 +96,9 @@ struct TRINITY_DLL_DECL boss_grobbulusAI : public ScriptedAI
return; return;
case EVENT_INJECT: case EVENT_INJECT:
if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0)) if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0))
DoCast(target, SPELL_MUTATING_INJECTION); if(!target->HasAura(SPELL_MUTATING_INJECTION))
events.ScheduleEvent(EVENT_INJECT, 8000 + 12000 * me->GetHealth() / me->GetMaxHealth()); DoCast(target, SPELL_MUTATING_INJECTION);
events.ScheduleEvent(EVENT_INJECT, 8000 + 12000 * ((float)me->GetHealth() / me->GetMaxHealth()));
return; return;
} }
} }
@@ -214,7 +214,7 @@ struct TRINITY_DLL_DECL boss_kelthuzadAI : public ScriptedAI
if(Phase == 1) if(Phase == 1)
{ {
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
EnterEvadeMode(); //EnterEvadeMode();
//SummonWasters_Timer at far positon //SummonWasters_Timer at far positon
if ( SummonWasters_Timer< diff) if ( SummonWasters_Timer< diff)
{ {