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

            timedCast(SPELL_Fear, diff);

            if (EnemiesInRange(10.0f) > 2)
                timedCast(SPELL_HELLFIRE, diff);

            timedCast(SPELL_Unstable_Affliction, diff);

        if (timedQuery(SPELL_Shadow_Bolt, diff))
        {
            switch (urand(0,5))
            {
                case 0:
                    doCast(SPELL_Searing_Pain);
                    break;
                case 1: case 2:
                    doCast(SPELL_Shadow_Bolt);
                    break;
                case 3:
                    doCast(SPELL_CORRUPTION);
                    break;
                case 4:
                    doCast(SPELL_Curse_of_Agony);
                    break;
                case 5:
                    doCast(SPELL_Curse_of_Exhaustion);
                    break;
             }
         }
       boss_faction_championsAI::UpdateAI(diff);
    }
Ejemplo n.º 2
0
    void UpdateAI(const uint32 diff)
    {
        if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return;

            if (EnemiesInRange(10.0f) > 3)
                timedCast(SPELL_Disengage, diff);

            if (m_creature->GetHealthPercent() < 20.0f)
                timedCast(SPELL_Deterrence, diff);

            timedCast(SPELL_Wyvern_Sting, diff);

            timedCast(SPELL_Frost_Trap, diff );

            if (m_creature->GetDistance2d(m_creature->getVictim()) < 5.0f)
                timedCast(SPELL_WING_CLIP, diff);

        if (timedQuery(SPELL_SHOOT, diff))
        {
            switch (urand(0,3))
            {
                case 0: case 1:
                    doCast(SPELL_SHOOT);
                    break;
                case 2:
                    doCast(SPELL_EXPLOSIVE_SHOT);
                    break;
                case 3:
                    doCast(SPELL_AIMED_SHOT);
                    break;
            }
        }
        boss_faction_championsAI::UpdateAI(diff);
    }
Ejemplo n.º 3
0
    void UpdateAI(const uint32 diff)
    {
        if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return;

            if (EnemiesInRange(10.0f) > 2)
                timedCast(SPELL_PSYCHIC_SCREAM, diff);

        if (timedQuery(SPELL_RENEW, diff))
        {
            switch (urand(0,5))
            {
                case 0:
                        doCast(SPELL_RENEW);
                    break;
                case 1:
                        doCast(SPELL_SHIELD);
                    break;
                case 2: case 3:
                        doCast(SPELL_FLASH_HEAL);
                    break;
                case 4:
                    if (Unit *target = urand(0,1) ? m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0) : DoSelectLowestHpFriendly(40.0f))
                        doCast(target, SPELL_DISPEL);
                    break;
                case 5:
                        doCast(SPELL_MANA_BURN);
                    break;
            }
        }

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

            if (EnemiesInRange(10.0f) > 2)
                timedCast(SPELL_PSYCHIC_SCREAM, diff);

            if (m_creature->GetHealthPercent() < 20.0f)
                timedCast(SPELL_DISPERSION, diff);

            if (Unit *target = SelectEnemyCaster(false))
                timedCast(SPELL_SILENCE, diff, target);

            timedCast(SPELL_MIND_BLAST, diff);

        if (timedQuery(SPELL_MIND_FLAY, diff))
        {
            switch (urand(0,4))
            {
                case 0: case 1:
                    doCast(SPELL_MIND_FLAY);
                    break;
                case 2:
                    doCast(SPELL_VAMPIRIC_TOUCH);
                    break;
               case 3:
                    doCast(SPELL_SW_PAIN);
                    break;
               case 4:
                    doCast(SPELL_DISPEL);
                    break;
            }
        }
        boss_faction_championsAI::UpdateAI(diff);
    }
Ejemplo n.º 5
0
    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);
    }
Ejemplo n.º 6
0
    void Aggro(Unit *pWho)
    {
        if(!pInstance) return;
        if (pWho->GetTypeId() != TYPEID_PLAYER)
            return;

        Creature* pBlightTarget = m_creature->GetMap()->GetCreature(blightTargetGUID);

        pInstance->SetData(TYPE_FESTERGUT, IN_PROGRESS);
        DoScriptText(-1631203,m_creature,pWho);
        if (pBlightTarget && !pBlightTarget->isAlive())
            pBlightTarget->Respawn();
        if (pBlightTarget)
        {
            pBlightTarget->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
            pBlightTarget->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
            doRemove(SPELL_BLIGHT_VISUAL_1,pBlightTarget);
            doRemove(SPELL_BLIGHT_VISUAL_2,pBlightTarget);
            doRemove(SPELL_BLIGHT_VISUAL_3,pBlightTarget);
            doCast(SPELL_BLIGHT_VISUAL_1,pBlightTarget);
        }
        doCast(SPELL_GASEOUS_BLIGHT_1);
        doRemoveFromAll(SPELL_BLIGHT_VISUAL_3);
        doRemoveFromAll(SPELL_BLIGHT_VISUAL_2);
        doRemoveFromAll(SPELL_BLIGHT_VISUAL_1);
/*        for(uint8 i = 0; i < 3; ++i)
             if (pPuddleStalkerGUID[i])
                 doCast(SPELL_GASEOUS_SPIGOT, m_creature->GetMap()->GetCreature(pPuddleStalkerGUID[i]));
*/
    }
Ejemplo n.º 7
0
            void DoNonCombatActions()
            {
                if (me->HasAura(SPELL_DEVOTION_AURA))
                Aura = DevotionAura;
                else if (me->HasAura(SPELL_FIRE_RESISTANCE_AURA))
                    Aura = FireResistanceAura;
                else
                    Aura = NoAura;

                //buff myself
                if (!master->HasAura(SPELL_DEVOTION_AURA) && isTimerReady(uiGc_Timer))
                    doCast(me, SPELL_DEVOTION_AURA, true);
                else
                    // I already have devotion aura and its not mine, cast different aura
                    if (master->HasAura(SPELL_DEVOTION_AURA) && !master->HasAura(SPELL_DEVOTION_AURA, me->GetGUID()) && Aura == NoAura && isTimerReady(uiGc_Timer))
                    doCast(me, SPELL_FIRE_RESISTANCE_AURA, true);

                if (!me->HasAura(SPELL_SEAL_OF_LIGHT) && isTimerReady(uiGc_Timer))
                    doCast(me, SPELL_SEAL_OF_LIGHT, true);

                //buff and heal master's group
                if (master->GetGroup())
                {
                    RezGroup(SPELL_REDEMPTION, master);
                    BuffAndHealGroup(master);
                    CureGroup(master);
                }
            }
Ejemplo n.º 8
0
    void UpdateAI(const uint32 diff)
    {
        if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return;

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

        timedCast(SPELL_Cyclone, diff);

        timedCast(SPELL_Entangling_Roots, diff);

        timedCast(SPELL_Faerie_Fire, diff);

        if (timedQuery(SPELL_Moonfire, diff))
        {
            switch (urand(0,6))
            {
                case 0: case 1:
                      doCast(SPELL_Moonfire);
                      break;
                case 2:
                      doCast(SPELL_Insect_Swarm);
                      break;
                case 3:
                      doCast(SPELL_Starfire);
                      break;
                case 4: case 5: case 6:
                      doCast(SPELL_Wrath);
                      break;
            }
        }
        boss_faction_championsAI::UpdateAI(diff);
    }
Ejemplo n.º 9
0
 void CheckBlink(uint32 diff)
 {
     if (GetBotCommandState() == COMMAND_STAY || me->IsMounted()) return;
     if (!BLINK || Blink_cd > diff || me->getLevel() < 20 || IsCasting()) return;
     if (!me->IsInCombat() && me->GetExactDist(master) > std::max(float(master->GetBotFollowDist()), 35.f) &&
         me->HasInArc(M_PI*0.75f, master))
     {
         temptimer = GC_Timer;
         if (doCast(me, BLINK))
         {
             Blink_cd = 13000;
             GC_Timer = temptimer;
         }
         return;
     }
     if (!me->getAttackers().empty() && me->GetExactDist(master) > 15)
     {
         if (Unit* op = me->SelectNearestTarget(7))
         {
             if (op->GetVictim() == me)
             {
                 me->SetFacingTo(me->GetAngle(master));
                 temptimer = GC_Timer;
                 if (doCast(me, BLINK))
                 {
                     Blink_cd = 13000;
                     GC_Timer = temptimer;
                 }
             }
         }
     }
 }
Ejemplo n.º 10
0
 void CheckBlink(uint32 diff)
 {
     if (GetBotCommandState() == COMMAND_STAY || me->IsMounted()) return;
     if (Blink_cd > diff || me->getLevel() < 20 || IsCasting()) return;
     if (me->GetExactDist(master) > std::max(float(master->GetBotFollowDist()), 25.f)/* && me->IsWithinLOSInMap(master)*/)
     {
         me->SetFacingTo(me->GetAngle(master));
         if (doCast(me, BLINK))
         {
             Blink_cd = 15000 - me->getLevel()/4 * 100; //13 sec with improved
             GC_Timer = 500;
         }
         return;
     }
     if (!me->getAttackers().empty() && me->GetExactDist(master) > 15)
     {
         if (Unit* op = me->SelectNearestTarget(10))
         {
             if (op->GetVictim() == me)
             {
                 me->SetFacingTo(me->GetAngle(master));
                 if (doCast(me, BLINK))
                 {
                     Blink_cd = 15000 - me->getLevel()/4 * 100; //13 sec with improved
                     GC_Timer = 500;
                 }
             }
         }
     }
 }
Ejemplo n.º 11
0
        void CheckPots(uint32 diff)
        {
            if (me->IsMounted() || IsCasting()) return;

            if (GetHealthPCT(me) < 67 && Potion_cd <= diff)
            {
                temptimer = GC_Timer;
                if (doCast(me, HEALINGPOTION))
                {
                    Potion_cd = POTION_CD;
                    GC_Timer = temptimer;
                }
            }
            if (GetManaPCT(me) < 35 && Rand() < 35)
            {
                if (EVOCATION && Evocation_cd <= diff && !me->isMoving() &&
                    me->getAttackers().empty() && doCast(me, EVOCATION))
                    Evocation_cd = 60000;
                else if (Potion_cd <= diff)
                {
                    temptimer = GC_Timer;
                    if (doCast(me, MANAPOTION))
                    {
                        Potion_cd = POTION_CD;
                        GC_Timer = temptimer;
                    }
                }
            }
        }
Ejemplo n.º 12
0
            bool HealTarget(Unit* target, uint8 hp)
            {
                if (!isTimerReady(uiGc_Timer))
                    return false;
        
                if (me->IsNonMeleeSpellCasted(true))
                    return false;
        
                if (!target || target->isDead())
                    return false;

                if (hp < 90 && uiLesserHealing_Timer <= 0)
                {
                    doCast(target, SPELL_LESSER_HEALING);
                    uiLesserHealing_Timer = 90;
                    uiHeal_Timer = uiHeal_Timer + 5; //wait 5 seconds before casting a real heal
                    return true;
                }
                else if (uiLesserHealing_Timer >= 0)
                    --uiLesserHealing_Timer;

                if (hp < 75 && isTimerReady(uiHeal_Timer))
                {
                    doCast(target, SPELL_CHAIN_HEAL);
                    uiHeal_Timer = 10;
                }

                return true;
            }
Ejemplo n.º 13
0
 void doBeacon(bool command = false)
 {
     if (command)
     {
          for(uint8 i = 0; i < getSpellData(SPELL_BEACON); ++i)
          {
             if (Unit* pTarget = doSelectRandomPlayer(SPELL_BEACON, false, 100.0f))
             {
                 if (doCast(SPELL_BEACON, pTarget) == CAST_OK)
                     marked[i] = pTarget;
                 else marked[i] = NULL;
             }
          }
          conflagated = true;
     }
     else
     {
          m_creature->InterruptNonMeleeSpells(true);
          for(uint8 i = 0; i < getSpellData(SPELL_BEACON); ++i)
          {
             if (marked[i])
                 doCast(SPELL_CONFLAGATION_2, marked[i]);
             marked[i] = NULL;
          }
          doCast(SPELL_CONFLAGATION_1);
          conflagated = false;
     }
 }
Ejemplo n.º 14
0
 void Counter()
 {
     Unit* u = me->GetVictim();
     bool cSpell = COUNTERSPELL && CounterSpell_cd <= 5000;
     bool blast = FIREBLAST && FireBlast_cd <= 3000 && !(u && u->ToCreature() && (u->ToCreature()->isWorldBoss() || u->ToCreature()->IsDungeonBoss())) && me->HasAura(IMPACT_BUFF);
     if (!cSpell && !blast) return;
     if (u && u->IsNonMeleeSpellCast(false) &&
         ((cSpell && me->GetDistance(u) < 40) || (blast && me->GetDistance(u) < 30)))
     {
         temptimer = GC_Timer;
         if (me->IsNonMeleeSpellCast(false))
             me->InterruptNonMeleeSpells(false);
         if (cSpell && doCast(u, COUNTERSPELL))
             CounterSpell_cd = 15000;
         else if (blast && doCast(u, FIREBLAST))
             FireBlast_cd = 6000;
         GC_Timer = temptimer;
     }
     else if (cSpell)
     {
         if (Unit* target = FindCastingTarget(40))
         {
             temptimer = GC_Timer;
             if (me->IsNonMeleeSpellCast(false))
                 me->InterruptNonMeleeSpells(false);
             if (doCast(target, COUNTERSPELL))
             {
                 CounterSpell_cd = 15000;
                 GC_Timer = temptimer;
             }
         }
     }
 }
Ejemplo n.º 15
0
            void DoNonCombatActions()
            {
                //if eating or drinking don't do anything
                if (me->HasAura(10256) || me->HasAura(1137))
                    return;

                Feast();

                //buff master
                if (!HasAuraName(master, SPELL_PRAYER_OF_SHADOW, 0) && isTimerReady(uiGc_Timer))
                    doCast(master, SPELL_PRAYER_OF_SHADOW, true);

                if (!HasAuraName(master, SPELL_FEAR_WARD, 0) && isTimerReady(uiGc_Timer))
                    doCast(master, SPELL_FEAR_WARD, true);

                if (!HasAuraName(master, SPELL_DIVINE_SPIRIT, 0) && isTimerReady(uiGc_Timer))
                {
                    doCast(master, SPELL_DIVINE_SPIRIT, true);
                    GiveManaBack();
                }

                //buff myself
                if (!me->HasAura(SPELL_INNER_FIRE, 0) && isTimerReady(uiGc_Timer))
                    doCast(me, SPELL_INNER_FIRE, true);

                if (!me->HasAura(SPELL_PW_FORTITUDE, 0) && isTimerReady(uiGc_Timer))
                    doCast(me, SPELL_PW_FORTITUDE, true);

                //buff and heal master's group
                if (master->GetGroup())
                    RezGroup(SPELL_RESURRECTION, master);
            }
Ejemplo n.º 16
0
    void UpdateAI(const uint32 diff)
    {

    if(!pInstance) return;

    if (!pet)
    {
        if (Creature* pGuard = m_creature->GetMap()->GetCreature(pInstance->GetData64(NPC_PRECIOUS)))
            if (!pGuard->isAlive())
            {
                 pet = true;
                 if (pInstance->GetData(TYPE_PRECIOUS) == NOT_STARTED)
                 {
                     DoScriptText(-1631228,m_creature);
                     pInstance->SetData(TYPE_PRECIOUS,DONE);
                 }
            }
    }

    if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
            return;

        if (nexttick)
              {
                  doCast(SPELL_OOZE_FLOOD_1);
                  DoScriptText(-1631227,m_creature);
                  nexttick = false;
              };

        if (timedQuery(SPELL_OOZE_FLOOD_1, diff))
              {
                   uint8 i = urand(0,3);
                   if (Unit* pTemp = doSummon(NPC_OOZE_STALKER,SpawnLoc[i].x, SpawnLoc[i].y, SpawnLoc[i].z, TEMPSUMMON_TIMED_DESPAWN, 15000))
                   {
                       doCast(SPELL_OOZE_FLOOD, pTemp);
                       nexttick = true;
                   }
              };

        if (timedQuery(SPELL_SLIME_SPRAY, diff))
            if (doSummon(NPC_OOZE_SPRAY_STALKER))
                doCast(SPELL_SLIME_SPRAY);

        if (timedQuery(SPELL_MUTATED_INFECTION, diff))
        {
            for(uint8 i = 0; i < getSpellData(SPELL_MUTATED_INFECTION); ++i)
                if (Unit* pTarget = doSelectRandomPlayer(SPELL_MUTATED_INFECTION_AURA, false, 60.0f))
                     doCast(SPELL_MUTATED_INFECTION, pTarget);
            DoScriptText(-1631226,m_creature);
        }

        if (timedQuery(SPELL_BERSERK, diff))
        {
            doCast(SPELL_BERSERK);
            DoScriptText(-1631225,m_creature);
        };

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

        timedCast(SPELL_TWILIGHT_PRECISION, diff);

        if ( m_creature->GetHealthPercent() <= 80.0f && phase == 0)
        {
            phase = 1;
        }
        if ( m_creature->GetHealthPercent() <= 60.0f && phase == 1)
        {
            phase = 2;
        }
        if ( m_creature->GetHealthPercent() <= 40.0f && phase == 2)
        {
           phase = 3;
        }
        if ( m_creature->GetHealthPercent() <= 20.0f && phase == 3)
        {
           phase = 4;
        }

        switch (phase)
        {
            case 0: //GROUND
                 doCast(SPELL_FLAME_BREATH);
                 doCast(SPELL_ENRAGE);
                 break;
            case 1: //AIR
                    //NEED SCRIPT AIR MOVEMENT
                DoScriptText(-1666404,m_creature);
                doCast(SPELL_BEACON);
                doCast(SPELL_CONFLAG);
                break;
            case 2: //GROUND
                doCast(SPELL_FLAME_BREATH);
                doCast(SPELL_ENRAGE);
                break;
            case 3: //AIR
                    //NEED SCRIPT AIR MOVEMENT
                DoScriptText(-1666404,m_creature);
                doCast(SPELL_BEACON);
                doCast(SPELL_CONFLAG);
                break;
            case 4: //GROUND
                doCast(SPELL_FLAME_BREATH);
                doCast(SPELL_ENRAGE);
                break;
            default:
                break;
        }

        DoMeleeAttackIfReady();
    }
Ejemplo n.º 18
0
            bool HealTarget(Unit* target, uint8 hp)
            {
                if (!isTimerReady(uiGc_Timer))
                    return false;

                if (me->IsNonMeleeSpellCasted(true))
                    return false;

                if (!target || target->isDead())
                    return false;

                if (hp < 25 && isTimerReady(uiLayOfHands_Timer))
                {
                    // 33% to cast loh, else just do a fast heal
                    uint64 m_rand = urand(1, 3);

                    switch(m_rand)
                    {
                        case 1:
                        {
                            std::string loh = "Lay of Hands on ";
                            loh += target->GetName();
                            loh += ".";

                            me->MonsterSay(loh.c_str(), LANG_UNIVERSAL, NULL);

                            doCast(target, SPELL_LAY_OF_HANDS);
                            uiLayOfHands_Timer = 1600;
                            return true;
                        }
                        case 2:
                        case 3:
                            doCast(target, SPELL_FLASH_OF_LIGHT);
                            GiveManaBack(15);
                            return true;
                    }

                }

                if (hp < 60)
                {
                    doCast(target, SPELL_FLASH_OF_LIGHT);
                    GiveManaBack(15);
                    return true;
                }

                if (hp < 80)
                {
                    doCast(target, SPELL_HOLY_LIGHT);
                    GiveManaBack(20);
                    return true;
                }

                return true;
            }
Ejemplo n.º 19
0
        void DoNonCombatActions(uint32 diff)
        {
            if (GC_Timer > diff || me->IsMounted()) return;
            if (Feasting()) return;

            if (!HasAuraName(me, DAMPENMAGIC) && 
                doCast(me, DAMPENMAGIC))
            { /*GC_Timer = 800;*/ return; }

            if (!HasAuraName(me, ICEARMOR) && 
                doCast(me, ICEARMOR))
            { /*GC_Timer = 800;*/ return; }
        }
Ejemplo n.º 20
0
            void BuffTarget(Unit* target)
            {
                if (!HasAuraName(target, GetSpellName(SPELL_PW_FORTITUDE)))
                {
                    doCast(target, SPELL_PW_FORTITUDE, false);
                    GiveManaBack();
                }

                if (!HasAuraName(target, GetSpellName(SPELL_PRAYER_OF_SHADOW)))
                {
                    doCast(target, SPELL_PRAYER_OF_SHADOW, false);
                    GiveManaBack();
                }
            }
Ejemplo n.º 21
0
    void UpdateAI(const uint32 uiDiff) override
    {
        if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
            return;

        switch (m_uiStage)
        {
            case 0:
                    break;
            case 1:
                    doCast(SPELL_BERSERK);
                    m_uiStage = 2;
                    break;
            case 2:
            default:
                    break;
        }

        timedCast(SPELL_CLEAVE, uiDiff);
        timedCast(SPELL_BLIZZARD, uiDiff);
        timedCast(SPELL_FROST_BREATH, uiDiff);

        if (m_creature->GetHealthPercent() < 10.0f && m_uiStage == 0)
            m_uiStage = 1;

        timedCast(SPELL_BERSERK, uiDiff);

        DoMeleeAttackIfReady();

    }
Ejemplo n.º 22
0
 void CheckSpellSteal(uint32 diff)
 {
     if (!SPELLSTEAL || GC_Timer > diff || Rand() > 25 || IsCasting()) return;
     Unit* target = FindHostileDispelTarget(40, true);
     if (target && doCast(target, SPELLSTEAL))
         GC_Timer = 800;
 }
Ejemplo n.º 23
0
        void DoNormalAttack(uint32 diff)
        {
            opponent = me->GetVictim();
            if (opponent)
            {
                if (!IsCasting())
                    StartAttack(opponent, true);
            }
            else
                return;
            if (MoveBehind(*opponent))
                wait = 5;

            //float dist = me->GetExactDist(opponent);
            float meleedist = me->GetDistance(opponent);

            //TORMENT
            if (TORMENT && Torment_cd <= diff && meleedist < 5 && (!tank || tank == me || opponent->GetVictim() == m_creatureOwner))
            {
                temptimer = GC_Timer;
                if (doCast(opponent, TORMENT))
                {
                    Torment_cd = 5000;
                    GC_Timer = temptimer;
                    return;
                }
            }
        }
Ejemplo n.º 24
0
 void Reset()
 {
      pOwner = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_DEATHBRINGER_SAURFANG));
      resetTimers();
      doCast(SPELL_BLOOD_LINK_BEAST);
      scentcasted = false;
 }
Ejemplo n.º 25
0
        void DoNormalAttack(uint32 diff)
        {
            opponent = me->GetVictim();
            if (opponent)
            {
                if (!IsCasting())
                    StartAttack(opponent, true);
            }
            else
                return;
            if (MoveBehind(*opponent))
                wait = 5;

            //float dist = me->GetExactDist(opponent);
            float meleedist = me->GetDistance(opponent);

            //TORMENT
            if (IsSpellReady(TORMENT_1, diff, false) && meleedist < 5 && !IsTank(opponent->GetVictim()))
            {
                temptimer = GC_Timer;
                if (doCast(opponent, GetSpell(TORMENT_1)))
                {
                    GC_Timer = temptimer;
                    return;
                }
            }
        }
Ejemplo n.º 26
0
    void UpdateAI(const uint32 diff)
    {
        if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
            return;

        switch(stage)
        {
            case 0: {
                    timedCast(SPELL_SOUL_FEAST, diff);
                    break;}
            case 1: {
                    doCast(SPELL_BERSERK);
                    stage = 2;
                    break;}
            case 2: {
                    break;}
            }

                    timedCast(SPELL_CLEAVE, diff);
                    timedCast(SPELL_BLIZZARD, diff);
                    timedCast(SPELL_FROST_BREATH, diff);

        if (m_creature->GetHealthPercent() < 10.0f && stage == 0) stage = 1;

        timedCast(SPELL_BERSERK, diff);

        DoMeleeAttackIfReady();

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

        doCast(SPELL_METEOR_FLAME);
    }
Ejemplo n.º 28
0
        void UpdateAI(uint32 diff)
        {
            ReduceCD(diff);
            if (!GlobalUpdate(diff))
                return;
            CheckAttackState();
            CheckAuras();
            if (wait == 0)
                wait = GetWait();
            else
                return;
            BreakCC(diff);
            if (CCed(me)) return;

            ////if pet is dead or unreachable
            //Creature* m_botsPet = me->GetBotsPet();
            //if (!m_botsPet || m_botsPet->FindMap() != master->GetMap() || (me->GetDistance2d(m_botsPet) > sWorld->GetMaxVisibleDistanceOnContinents() - 20.f))
            //    if (master->getLevel() >= 10 && !me->IsInCombat() && !IsCasting() && !me->IsMounted())
            //        SummonBotsPet(PET_VOIDWALKER);

            //TODO: implement healthstone
            if (Potion_cd <= diff && GetHealthPCT(me) < 67)
            {
                temptimer = GC_Timer;
                if (doCast(me, HEALINGPOTION))
                {
                    Potion_cd = POTION_CD;
                    GC_Timer = temptimer;
                }
            }
            if (Potion_cd <= diff && GetManaPCT(me) < 50)
            {
                temptimer = GC_Timer;
                if (doCast(me, MANAPOTION))
                {
                    Potion_cd = POTION_CD;
                    GC_Timer = temptimer;
                }
            }
            if (!me->IsInCombat())
                DoNonCombatActions();

            if (!CheckAttackTarget(BOT_CLASS_WARLOCK))
                return;

            DoNormalAttack(diff);
        }
    void JustDied(Unit *killer)
    {
        if (!pInstance) return;
        pInstance->SetData(TYPE_PUTRICIDE, DONE);
        DoScriptText(-1631243,m_creature, killer);

        doCast(QUEST_24749);
    }
Ejemplo n.º 30
0
            bool CureTarget(Unit* target)
            {
                if (!isTimerReady(uiGc_Timer))
                    return false;

                if (HasAuraName(target, "Withering Heat"))
                    doCast(target, SPELL_CLEANSE);

                if (HasAuraName(target, "Ancient Dread"))
                    doCast(target, SPELL_CLEANSE);

                if (HasAuraName(target, "Ancient Dread"))
                    doCast(target, SPELL_CLEANSE);

                if (HasAuraName(target, "Arcane Buffet"))
                    doCast(target, SPELL_CLEANSE);

                if (HasAuraName(target, "Shadow Buffet"))
                    doCast(target, SPELL_CLEANSE);

                if (HasAuraName(target, "Flame Buffet"))
                    doCast(target, SPELL_CLEANSE);

                if (HasAuraName(target, "Frost Buffet"))
                doCast(target, SPELL_CLEANSE);

                return true;
            }