Ejemplo n.º 1
0
    void UpdateAI(const uint32 diff)
    {
        if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
            return;

        //ShadowVolley_Timer
        if (ShadowVolley_Timer < diff)
        {
            DoCastSpellIfCan(m_creature->getVictim(),SPELL_SHADOWBOLTVOLLEY);
            ShadowVolley_Timer = 15000;
        }else ShadowVolley_Timer -= diff;

        //BoneShield_Timer
        if (BoneShield_Timer < diff)
        {
            DoCastSpellIfCan(m_creature->getVictim(),SPELL_BONESHIELD);
            BoneShield_Timer = 45000;
        }else BoneShield_Timer -= diff;

        //Minion_Timer
        if (Minion_Timer < diff)
        {
            //Cast
            SummonMinion(m_creature->getVictim());
            SummonMinion(m_creature->getVictim());
            SummonMinion(m_creature->getVictim());
            SummonMinion(m_creature->getVictim());

            Minion_Timer = 12000;
        }else Minion_Timer -= diff;

        //Summon 2 Bone Mages
        if (!Mages && m_creature->GetHealthPercent() < 26.0f)
        {
            //Cast
            SummonMages(m_creature->getVictim());
            SummonMages(m_creature->getVictim());
            Mages = true;
        }

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

            //ShadowVolley_Timer
            if (ShadowVolley_Timer <= diff)
            {
                DoCast(me->getVictim(), SPELL_SHADOWBOLTVOLLEY);
                ShadowVolley_Timer = 15000;
            } else ShadowVolley_Timer -= diff;

            //BoneShield_Timer
            if (BoneShield_Timer <= diff)
            {
                DoCast(me->getVictim(), SPELL_BONESHIELD);
                BoneShield_Timer = 45000;
            } else BoneShield_Timer -= diff;

            //Minion_Timer
            if (Minion_Timer <= diff)
            {
                //Cast
                SummonMinions(me->getVictim());
                SummonMinions(me->getVictim());
                SummonMinions(me->getVictim());
                SummonMinions(me->getVictim());

                Minion_Timer = 12000;
            } else Minion_Timer -= diff;

            //Summon 2 Bone Mages
            if (!Mages && HealthBelowPct(26))
            {
                //Cast
                SummonMages(me->getVictim());
                SummonMages(me->getVictim());
                Mages = true;
            }

            DoMeleeAttackIfReady();
        }
Ejemplo n.º 3
0
    void UpdateAI(const uint32 diff)
    {
        //Return since we have no target
        if (!m_creature->SelectHostilTarget())
            return;

        //Check if we have a current target
        if( m_creature->getVictim() && m_creature->isAlive())
        {
            
            //ShadowVolley_Timer
            if (ShadowVolley_Timer < diff)
            {
                //Cast
                DoCast(m_creature->getVictim(),SPELL_SHADOWBOLTVOLLEY);

                //15 seconds
               ShadowVolley_Timer = 15000;
            }else ShadowVolley_Timer -= diff;

            //BoneShield_Timer
            if (BoneShield_Timer < diff)
            {
                //Cast
                DoCast(m_creature->getVictim(),SPELL_BONESHIELD);

                //45 seconds
               BoneShield_Timer = 45000;
            }else BoneShield_Timer -= diff;


            //Minion_Timer
            if (Minion_Timer < diff)
            {
                //Cast
                SummonMinion(m_creature->getVictim());
                SummonMinion(m_creature->getVictim());
                SummonMinion(m_creature->getVictim());
                SummonMinion(m_creature->getVictim());

                //12 seconds until we should cast this agian
                Minion_Timer = 12000;
            }else Minion_Timer -= diff;

            //Summon 2 Bone Mages
            if ( !Mages && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 26 )
            {
                //Cast
                SummonMages(m_creature->getVictim());
                SummonMages(m_creature->getVictim());
                Mages = true;
            }

            //If we are within range melee the target
            if( m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE))
            {
                //Make sure our attack is ready and we arn't currently casting
                if( m_creature->isAttackReady() && !m_creature->m_currentSpell)
                {
                    m_creature->AttackerStateUpdate(m_creature->getVictim());
                    m_creature->resetAttackTimer();
                }
            }
        }
    }