Exemplo n.º 1
0
 void Reset()
 {
     CheckChannelers();
     BanishTimer = 1000;
     Whirlwind_Timer = 15000;
     ChaosBlast_Timer = 1000;
     SwitchToDemon_Timer = 45000;
     SwitchToHuman_Timer = 60000;
     Berserk_Timer = 600000;
     InnerDemons_Timer = 30000;
     me->SetCanDualWield(true);
     DealDamage = true;
     DemonForm = false;
     IsFinalForm = false;
     NeedThreatReset = false;
     EnrageUsed = false;
     InnerDemon_Count = 0;
     me->SetSpeed(MOVE_RUN, 2.0f, true);
     me->SetDisplayId(MODEL_NIGHTELF);
     me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID  , 0);
     me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 0);
     DoCast(me, SPELL_DUAL_WIELD, true);
     me->SetCorpseDelay(1000*60*60);
     if (pInstance)
         pInstance->SetData(DATA_LEOTHERASTHEBLINDEVENT, NOT_STARTED);
 }
            void UpdateAI(uint32 diff)
            {
                if (!UpdateVictim())
                {
					checkTimer += diff;
                    if (checkTimer >= 5000)
                    {
						checkTimer = 0;
                        CheckChannelers();
						if (!me->HasUnitState(UNIT_STATE_CASTING))
                            me->CastSpell(me, SPELL_EVOCATION, false);
                        
                    }
                    return;
                }

				events.Update(diff);
				if (me->HasUnitState(UNIT_STATE_CASTING))
					return;

				switch (events.GetEvent())
				{
					case EVENT_SPELL_VOLLEY:
						me->CastSpell(me, SPELL_SHADOW_BOLT_VOLLEY, false);
						events.RepeatEvent(urand(8000, 13000));
						break;
					case EVENT_SPELL_CORRUPTION:
						me->CastSpell(me, SPELL_CORRUPTION, false);
						events.RepeatEvent(urand(30000, 50000));
						break;
					case EVENT_SPELL_BURNING_NOVA:
						Talk(SAY_NOVA);
						
						ApplyImmunities(false);
						me->AddAura(SPELL_BURNING_NOVA, me);
						ApplyImmunities(true);

						if (IsHeroic())
							DoTeleportAll(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation());

						events.DelayEvents(6000, 0);
						events.RepeatEvent(urand(25000, 32000));
						events.ScheduleEvent(EVENT_SPELL_FIRE_NOVA, 5000);
						break;
					case EVENT_SPELL_FIRE_NOVA:
						me->CastSpell(me, SPELL_FIRE_NOVA, true);
						events.PopEvent();
						break;
				}

                DoMeleeAttackIfReady();
            }
 void Reset() override
 {
     CheckChannelers();
     Initialize();
     me->SetCanDualWield(true);
     me->SetSpeed(MOVE_RUN, 2.0f, true);
     me->SetDisplayId(MODEL_NIGHTELF);
     me->SetVirtualItem(0, 0);
     me->SetVirtualItem(1, 0);
     DoCast(me, SPELL_DUAL_WIELD, true);
     me->SetCorpseDelay(1000*60*60);
     instance->SetData(DATA_LEOTHERASTHEBLINDEVENT, NOT_STARTED);
 }