void UpdateAI(const uint32 diff)
    {
        if (!UpdateVictim())
        {
            if (check_Timer <= diff)
            {
                if (!me->IsNonMeleeSpellCasted(false))
                    DoCast(me, SPELL_EVOCATION);
                check_Timer = 5000;
            } else check_Timer -= diff;
            return;
        }

        if (Firenova)
        {
            if (Firenova_Timer <= diff)
            {
                DoCast(me, SPELL_FIRE_NOVA, true);
                Firenova = false;
                ShadowVolley_Timer = 2000;
            } else Firenova_Timer -=diff;

            return;
        }

        if (ShadowVolley_Timer <= diff)
        {
            DoCast(me, SPELL_SHADOW_BOLT_VOLLEY);
            ShadowVolley_Timer = 5000+rand()%8000;
        } else ShadowVolley_Timer -=diff;

        if (Corruption_Timer <= diff)
        {
            DoCast(me, SPELL_CORRUPTION);
            Corruption_Timer = 30000+rand()%20000;
        } else Corruption_Timer -=diff;

        if (BurningNova_Timer <= diff)
        {
            if (me->IsNonMeleeSpellCasted(false))
                me->InterruptNonMeleeSpells(true);

            DoScriptText(SAY_NOVA, me);

            if (SpellEntry *nova = GET_SPELL(SPELL_BURNING_NOVA))
            {
                if (Aura * aura = Aura::TryCreate(nova, me, me))
                    aura->ApplyForTargets();
            }

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

            BurningNova_Timer = 20000+rand()%8000;
            Firenova_Timer= 5000;
            Firenova = true;
        } else BurningNova_Timer -=diff;

        DoMeleeAttackIfReady();
    }
Exemplo n.º 2
0
			void UpdateAI(uint32 const diff) {
				if (!UpdateVictim())
					return;

				if (me->GetHealthPct() <= 50)
					phase = 2;

				if (shield_timer <= diff) {
					DoCast(me, SPELL_SHIELD);
					shield_timer = 45000;
				} else shield_timer -= diff;

				if (hex_timer <= diff) {
					DoCast(SelectTarget(SELECT_TARGET_RANDOM, 1, 50, true), SPELL_HEX);
					hex_timer = 25000;
				} else hex_timer -= diff;
				
				if (poison_breath_timer <= diff) {
					DoCast(SelectTarget(SELECT_TARGET_TOPAGGRO, 0, 30, true), SPELL_POISON_BREATH);
				}

				if (phase == 2 && teleport_timer <= diff) {
					uint8 pos = urand(0, 2);
					DoTeleportAll(teleLocs[pos].m_positionX, teleLocs[pos].m_positionY, teleLocs[pos].m_positionZ, teleLocs[pos].m_orientation);
					DoCast(SelectTarget(SELECT_TARGET_RANDOM, 1, 50, true), SPELL_POISON_CLOUD);
				} else teleport_timer -= diff;

				DoMeleeAttackIfReady();
			}
            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();
            }
Exemplo n.º 4
0
    void UpdateAI(const uint32 diff)
    {

        if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
            return;
        
        if (!sumportals)
        if (sumportals_Timer < diff)
        {
            DoScriptText(SAY_HELP, m_creature);
            summonPortals();
            sumportals_Timer = 1000000;
                    
        }else sumportals_Timer -= diff;

        if (ShadowBoltVolley_Timer < diff)
        {
            DoCast(m_creature,SPELL_SHADOWBOLT_VOLLEY);
            ShadowBoltVolley_Timer = 15000;
        }else ShadowBoltVolley_Timer -= diff;

        if ( DrawnShadows_Timer < diff)
        {
            DoTeleportAll(VorpilPosition[0][0],VorpilPosition[0][1],VorpilPosition[0][2],0);
            m_creature->Relocate(VorpilPosition[0][0],VorpilPosition[0][1],VorpilPosition[0][2],0);
            DoCast(m_creature,SPELL_DRAWN_SHADOWS,true);

            if(!HeroicMode) DoCast(m_creature,SPELL_RAIN_OF_FIRE);
            else DoCast(m_creature,H_SPELL_RAIN_OF_FIRE);

            ShadowBoltVolley_Timer = 6000;
            DrawnShadows_Timer = 45000;    
        }else DrawnShadows_Timer -= diff;

        if ( summonTraveler_Timer < diff)
        {
            spawnVoidTraveler();
            summonTraveler_Timer = 10000;
        }else summonTraveler_Timer -=diff;

        DoMeleeAttackIfReady();
    }
Exemplo n.º 5
0
            void UpdateAI(uint32 diff) override
            {
                if (!UpdateVictim())
                {
                    if (check_Timer <= diff)
                    {
                        if (!me->IsNonMeleeSpellCast(false))
                            DoCast(me, SPELL_EVOCATION);
                        check_Timer = 5000;
                    }
                    else
                        check_Timer -= diff;
                    return;
                }

                if (Firenova)
                {
                    if (Firenova_Timer <= diff)
                    {
                        DoCast(me, SPELL_FIRE_NOVA, true);
                        Firenova = false;
                        ShadowVolley_Timer = 2000;
                    }
                    else
                        Firenova_Timer -=diff;

                    return;
                }

                if (ShadowVolley_Timer <= diff)
                {
                    DoCast(me, SPELL_SHADOW_BOLT_VOLLEY);
                    ShadowVolley_Timer = 5000 + rand32() % 8000;
                }
                else
                    ShadowVolley_Timer -=diff;

                if (Corruption_Timer <= diff)
                {
                    DoCast(me, SPELL_CORRUPTION);
                    Corruption_Timer = 30000 + rand32() % 20000;
                }
                else
                    Corruption_Timer -=diff;

                if (BurningNova_Timer <= diff)
                {
                    if (me->IsNonMeleeSpellCast(false))
                        me->InterruptNonMeleeSpells(true);

                    Talk(SAY_NOVA);

                    if (SpellInfo const* nova = sSpellMgr->GetSpellInfo(SPELL_BURNING_NOVA))
                    {
                        if (Aura* aura = Aura::TryRefreshStackOrCreate(nova, MAX_EFFECT_MASK, me, me))
                            aura->ApplyForTargets();
                    }

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

                    BurningNova_Timer = 20000 + rand32() % 8000;
                    Firenova_Timer= 5000;
                    Firenova = true;
                }
                else
                    BurningNova_Timer -=diff;

                DoMeleeAttackIfReady();
            }
    void UpdateAI(const uint32 diff)
    {
        if (!UpdateVictim())
        {
            if (check_Timer <= diff)
            {
                if (!me->IsNonMeleeSpellCasted(false))
                    DoCast(me,SPELL_EVOCATION);
                check_Timer = 5000;
            } else check_Timer -= diff;
            return;
        }

        if (Firenova)
        {
            if (Firenova_Timer <= diff)
            {
                DoCast(me,HeroicMode ? H_SPELL_FIRE_NOVA : SPELL_FIRE_NOVA,true);
                Firenova = false;
                ShadowVolley_Timer = 2000;
            } else Firenova_Timer -=diff;

            return;
        }

        if (ShadowVolley_Timer <= diff)
        {
            DoCast(me,HeroicMode ? H_SPELL_SHADOW_BOLT_VOLLEY : SPELL_SHADOW_BOLT_VOLLEY);
            ShadowVolley_Timer = 5000+rand()%8000;
        } else ShadowVolley_Timer -=diff;

        if (Corruption_Timer <= diff)
        {
            DoCast(me,SPELL_CORRUPTION);
            Corruption_Timer = 30000+rand()%20000;
        } else Corruption_Timer -=diff;

        if (BurningNova_Timer <= diff)
        {
            if (me->IsNonMeleeSpellCasted(false))
                me->InterruptNonMeleeSpells(true);

            DoScriptText(SAY_NOVA, me);

            if (SpellEntry *nova = GET_SPELL(SPELL_BURNING_NOVA))
            {
                for (uint32 i = 0; i < 3; ++i)
                    if (nova->Effect[i] == SPELL_EFFECT_APPLY_AURA)
                    {
                        Aura *Aur = new BurningNovaAura(nova, i, me, me);
                        me->AddAura(Aur);
                    }
            }

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

            BurningNova_Timer = 20000+rand()%8000;
            Firenova_Timer= 5000;
            Firenova = true;
        } else BurningNova_Timer -=diff;

        DoMeleeAttackIfReady();
    }
            void UpdateAI(uint32 diff) override
            {
                if (!UpdateVictim())
                {
                    if (check_Timer <= diff)
                    {
                        if (!me->IsNonMeleeSpellCast(false))
                            DoCast(me, SPELL_EVOCATION);
                        check_Timer = 5000;
                    }
                    else
                        check_Timer -= diff;
                    return;
                }

                if (Firenova)
                {
                    if (Firenova_Timer <= diff)
                    {
                        DoCast(me, SPELL_FIRE_NOVA, true);
                        Firenova = false;
                        ShadowVolley_Timer = 2000;
                    }
                    else
                        Firenova_Timer -=diff;

                    return;
                }

                if (ShadowVolley_Timer <= diff)
                {
                    DoCast(me, SPELL_SHADOW_BOLT_VOLLEY);
                    ShadowVolley_Timer = 5000 + rand32() % 8000;
                }
                else
                    ShadowVolley_Timer -=diff;

                if (Corruption_Timer <= diff)
                {
                    DoCast(me, SPELL_CORRUPTION);
                    Corruption_Timer = 30000 + rand32() % 20000;
                }
                else
                    Corruption_Timer -=diff;

                if (BurningNova_Timer <= diff)
                {
                    if (me->IsNonMeleeSpellCast(false))
                        me->InterruptNonMeleeSpells(true);

                    Talk(SAY_NOVA);

                    me->AddAura(SPELL_BURNING_NOVA, me);

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

                    BurningNova_Timer = 20000 + rand32() % 8000;
                    Firenova_Timer= 5000;
                    Firenova = true;
                }
                else
                    BurningNova_Timer -=diff;

                DoMeleeAttackIfReady();
            }