示例#1
0
        void UpdateAI(const uint32 uiDiff)
        {
            if (!UpdateVictim())
            return;

            if (uiBloodlust_Timer <= uiDiff)
            {
                if (Creature *target = SelectRandomFriendlyMissingBuff(SPELL_BLOODLUST)) //He should casts this only on allies, not on self...
                    DoCast(target, SPELL_BLOODLUST);
                uiBloodlust_Timer = urand(12000,15000);
            } else uiBloodlust_Timer -= uiDiff;

            if (uiFrenzy_Timer <= uiDiff)
            {
                DoCast(me, SPELL_FRENZY);
                uiFrenzy_Timer = 200000;
            } else uiFrenzy_Timer -= uiDiff;

            if (uiWarStomp_Timer <= uiDiff)
            {
                DoCast(me->getVictim(), SPELL_WAR_STOMP);
                uiWarStomp_Timer = urand(7000,8500);
            } else uiWarStomp_Timer -= uiDiff;

            DoMeleeAttackIfReady();
        }
    void UpdateAI(const uint32 diff)
    {
        if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return;

            timedCast(SPELL_HEROISM, diff);

            timedCast(SPELL_HEX, diff);

        if (timedQuery(SPELL_HEALING_WAVE, diff))
        {
            switch (urand(0,5))
            {
                case 0: case 1:
                        doCast(SPELL_HEALING_WAVE);
                    break;
                case 2:
                        doCast(SPELL_RIPTIDE);
                    break;
                case 3:
                        doCast(SPELL_EARTH_SHOCK);
                    break;
                case 4:
                        doCast(SPELL_SPIRIT_CLEANSE);
                    break;
                case 5:
                    if (Unit *target = SelectRandomFriendlyMissingBuff(SPELL_EARTH_SHIELD))
                        doCast(target, SPELL_EARTH_SHIELD);
                    break;
            }
        }

        boss_faction_championsAI::UpdateAI(diff);
    }
    void UpdateAI(const uint32 diff)
    {
        if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return;

          timedCast(SPELL_NATURE_GRASP, diff);

          timedCast(SPELL_TRANQUILITY, diff);

          if (timedQuery(SPELL_BARKSKIN, diff))
                if (m_creature->GetHealthPercent() < 50.0f)
                    doCast(SPELL_BARKSKIN);

        if (timedQuery(SPELL_LIFEBLOOM, diff))
            switch (urand(0,4))
            {
                case 0:
                        doCast(SPELL_LIFEBLOOM);
                    break;
                case 1:
                        doCast(SPELL_NOURISH);
                    break;
                case 2:
                        doCast(SPELL_REGROWTH);
                    break;
                case 3:
                        doCast(SPELL_REJUVENATION);
                    break;
                case 4:
                    if (Creature* target = SelectRandomFriendlyMissingBuff(SPELL_THORNS))
                        doCast(SPELL_THORNS, target);
                    break;
            }

        boss_faction_championsAI::UpdateAI(diff);
    }
    void UpdateAI(const uint32 diff)
    {
        if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return;

        //cast bubble at 20% hp
        if (m_creature->GetHealthPercent() < 20.0f)
             timedCast(SPELL_BUBBLE, diff);

            if (Unit *target = DoSelectLowestHpFriendly(40.0f))
                if (target->GetHealthPercent() < 15.0f)
                    timedCast(SPELL_HAND_OF_PROTECTION, diff);

            timedCast(SPELL_HOLY_SHOCK, diff);

            if (Unit *target = SelectRandomFriendlyMissingBuff(SPELL_HAND_OF_FREEDOM))
                timedCast(SPELL_HAND_OF_FREEDOM, diff, target);

            timedCast(SPELL_HAMMER_OF_JUSTICE, diff);

        if (timedQuery(SPELL_FLASH_OF_LIGHT, diff))
        {
            switch (urand(0,4))
            {
                case 0: case 1:
                        doCast(SPELL_FLASH_OF_LIGHT);
                    break;
                case 2: case 3:
                        doCast(SPELL_HOLY_LIGHT);
                    break;
                case 4:
                        doCast(SPELL_CLEANSE);
                    break;
            }
        }

        boss_faction_championsAI::UpdateAI(diff);
    }