コード例 #1
0
    void UpdateAI(const uint32 uiDiff)
    {
        if (m_pInstance->GetData(TYPE_JARAXXUS) != IN_PROGRESS) 
            m_creature->ForcedDespawn();

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

        bsw->timedCast(SPELL_FEL_INFERNO, uiDiff);
        bsw->timedCast(SPELL_FEL_STREAK, uiDiff);

        DoMeleeAttackIfReady();
    }
コード例 #2
0
    void UpdateAI(const uint32 diff)
    {
        if (m_pInstance->GetData(TYPE_JARAXXUS) != IN_PROGRESS) 
            m_creature->ForcedDespawn();

        if (bsw->timedQuery(SPELL_INFERNAL_ERUPTION,diff) && m_Count > 0)
        {
            bsw->doCast(SPELL_INFERNAL_ERUPTION);
            DoScriptText(-1713524,m_creature);
            --m_Count;
        }

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

    }
コード例 #3
0
 void Aggro(Unit* pWho)
 {
     if (!m_pInstance) return;
     m_creature->SetInCombatWithZone();
     m_pInstance->SetData(TYPE_JARAXXUS, IN_PROGRESS);
     DoScriptText(-1713514,m_creature);
     bsw->doCast(SPELL_NETHER_POWER);
 }
コード例 #4
0
    void UpdateAI(const uint32 uiDiff)
    {
        if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
            return;

        bsw->timedCast(SPELL_BATTER, uiDiff);

        if (bsw->timedCast(SPELL_FIRE_BOMB, uiDiff, m_creature->getVictim()) == CAST_OK)
        {
            bsw->doCast(SPELL_FIRE_BOMB_1, m_creature->getVictim());
            bsw->doCast(SPELL_FIRE_BOMB_DOT, m_creature->getVictim());
        }

        bsw->timedCast(SPELL_HEAD_CRACK, uiDiff);

        DoMeleeAttackIfReady();
    }
コード例 #5
0
    void UpdateAI(const uint32 uiDiff)
    {
        if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
            return;

        bsw->timedCast(SPELL_IMPALE, uiDiff);
        bsw->timedCast(SPELL_STAGGERING_STOMP, uiDiff);

        if (bsw->timedQuery(SUMMON_SNOBOLD, uiDiff) && SnoboldsCount > 0 )
        {
            bsw->doCast(SUMMON_SNOBOLD);
            DoScriptText(-1713601,m_creature);
            --SnoboldsCount;
        };

        DoMeleeAttackIfReady();
    }
コード例 #6
0
 void Reset()
 {
     pBoss = NULL;
     defaultTarget = NULL;
     m_creature->SetInCombatWithZone();
     m_creature->SetRespawnDelay(DAY);
     pBoss = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_GORMOK));
     if (pBoss) bsw->doCast(SPELL_RISING_ANGER,pBoss);
 }
コード例 #7
0
 void UpdateAI(const uint32 uiDiff)
 {
         if (bsw->timedQuery(SPELL_SLIME_POOL_2,uiDiff)) {
             m_Size = m_Size*1.036;
             me->SetFloatValue(OBJECT_FIELD_SCALE_X, m_Size);
             }
             // Override especially for clean core
                if (m_Size >= 5.0f) me->ForcedDespawn();
 }
コード例 #8
0
 void Reset()
 {
     if(!m_pInstance) return;
     Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY);
     if (Difficulty == RAID_DIFFICULTY_10MAN_HEROIC || Difficulty == RAID_DIFFICULTY_25MAN_HEROIC) 
         m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
     m_creature->SetInCombatWithZone();
     m_creature->SetSpeedRate(MOVE_RUN, 0.05f);
     SetCombatMovement(false);
     m_creature->GetMotionMaster()->MoveRandom();
     bsw->doCast(SPELL_SLIME_POOL_2);
     m_Size = m_creature->GetFloatValue(OBJECT_FIELD_SCALE_X);
 }
コード例 #9
0
    void Reset()
    {
        pBoss = NULL;
        defaultTarget = NULL;
        me->SetInCombatWithZone();
        me->SetRespawnDelay(DAY);
        pBoss = Unit::GetCreature((*me),m_pInstance->GetData64(NPC_GORMOK));
        if (pBoss) bsw->doCast(SPELL_RISING_ANGER,pBoss);

        if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
        {
                me->GetMotionMaster()->MoveChase(pTarget);
                me->SetSpeed(MOVE_RUN, 1);
        }
    }
コード例 #10
0
    void UpdateAI(const uint32 uiDiff)
    {
        if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
            return;

        bsw->timedCast(SPELL_FEL_FIREBALL, uiDiff);
        bsw->timedCast(SPELL_FEL_LIGHTING, uiDiff);

        if (bsw->timedQuery(SPELL_INCINERATE_FLESH, uiDiff))
        {
            if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,1))
            {
                DoScriptText(-1713522,m_creature,pTarget);
                bsw->doCast(SPELL_INCINERATE_FLESH,pTarget);
            }
        }

        if (bsw->timedQuery(SPELL_LEGION_FLAME_1, uiDiff))
        {
            DoScriptText(-1713518,m_creature);
            bsw->doCast(SPELL_LEGION_FLAME_1);
        };

        if (bsw->timedQuery(SPELL_INFERNAL_ERUPTION, uiDiff) && m_volcanoCount > 0)
        {
            DoScriptText(-1713520,m_creature);
            if (bsw->doCast(NPC_INFERNAL_VOLCANO) == CAST_OK) --m_volcanoCount;
        };

        if (bsw->timedQuery(SPELL_NETHER_PORTAL, uiDiff) &&
            m_portalsCount > 0 &&  m_creature->GetHealthPercent() <= 90.0f)
        {
            DoScriptText(-1713519,m_creature);
            if (bsw->doCast(NPC_NETHER_PORTAL) == CAST_OK) --m_portalsCount;
        };

        DoMeleeAttackIfReady();
    }
コード例 #11
0
    void UpdateAI(const uint32 uiDiff)
    {
        if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
            return;

        switch (stage) 
        {
            case 0:
            {
                bsw->timedCast(SPELL_FEROCIOUS_BUTT, uiDiff);
                bsw->timedCast(SPELL_ARCTIC_BREATH, uiDiff);
                bsw->timedCast(SPELL_WHIRL, uiDiff);
                if (bsw->timedQuery(SPELL_MASSIVE_CRASH, uiDiff)) stage = 1;
                bsw->timedCast(SPELL_FROTHING_RAGE, uiDiff);
                DoMeleeAttackIfReady();
                break;
            }
            case 1:
            {
                 if (bsw->doCast(SPELL_MASSIVE_CRASH) == CAST_OK)
                     stage = 2;
                 break;
            }
            case 2:
            {
                if (pTarget = bsw->SelectUnit())
                {
                    TrampleCasted = false;
                    m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
                    stage = 3;
                    bsw->resetTimer(SPELL_TRAMPLE);
                    DoScriptText(-1713506,m_creature,pTarget);
                    SetCombatMovement(false);
                    m_creature->GetMotionMaster()->MoveIdle();
                }
                break;
            }
            case 3:
            {
                if (bsw->timedQuery(SPELL_TRAMPLE,uiDiff))
                {
                    pTarget->GetPosition(fPosX, fPosY, fPosZ);
                    TrampleCasted = false;
                    MovementStarted = true;
                    m_creature->GetMotionMaster()->MovePoint(1, fPosX, fPosY, fPosZ);
                    DoScriptText(-1713508,m_creature);
                    bsw->doCast(SPELL_ADRENALINE);
                    stage = 4;
                }
                break;
            }
            case 4:
            {
                if (MovementStarted)
                {
                    Map* pMap = m_creature->GetMap();
                    Map::PlayerList const &lPlayers = pMap->GetPlayers();
                    for(Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr)
                    {
                        Unit* pPlayer = itr->getSource();
                        if (!pPlayer) continue;
                        if (pPlayer->isAlive() && pPlayer->IsWithinDistInMap(m_creature, 5.0f))
                        {
                            bsw->doCast(SPELL_TRAMPLE, pPlayer);
                            TrampleCasted = true;
                            MovementStarted = false;
                            m_creature->GetMotionMaster()->MovementExpired();
                            m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim());
                        }
                    }

                } else stage = 5;
                if (TrampleCasted) stage = 5;
                break;
            }
            case 5:
            {
                if (!TrampleCasted)
                {
                    bsw->doCast(SPELL_STAGGERED_DAZE);
                    DoScriptText(-1713507,m_creature);
                }
                MovementStarted = false;
                m_creature->GetMotionMaster()->MovementExpired();
                m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim());
                SetCombatMovement(true);
                m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
                stage = 0;
                break;
            }
        }
    }
コード例 #12
0
    void UpdateAI(const uint32 uiDiff)
    {
        if ((!m_creature->SelectHostileTarget() || !m_creature->getVictim()) &&
            (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) != DREADSCALE_SUBMERGED))
            return;

        switch (stage) 
        {
            case 0:
            {
                bsw->timedCast(SPELL_BURNING_BITE, uiDiff);
                bsw->timedCast(SPELL_MOLTEN_SPEW, uiDiff);
                bsw->timedCast(SPELL_FIRE_SPIT, uiDiff);
                bsw->timedCast(SPELL_BURNING_SPRAY, uiDiff);
                bsw->timedCast(SPELL_SWEEP_0, uiDiff);

                if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == DREADSCALE_SUBMERGED)
                     stage = 1;

                break;
            }
            case 1:
            {
                m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
                bsw->doCast(SPELL_SUBMERGE_0);
                stage = 2;
                DoScriptText(-1713557,m_creature);
                m_pInstance->SetData(TYPE_NORTHREND_BEASTS, DREADSCALE_SUBMERGED);
                break;
            }
            case 2:
            {
                if (bsw->timedQuery(SPELL_SLIME_POOL, uiDiff))
                    bsw->doCast(NPC_SLIME_POOL);

                if (bsw->timedQuery(SPELL_SUBMERGE_0, uiDiff) && m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == DREADSCALE_SUBMERGED) 
                         stage = 3;
                    break;
            }
            case 3:
            {
                DoScriptText(-1713559,m_creature);
                bsw->doRemove(SPELL_SUBMERGE_0);
                m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
                stage = 0;
                m_pInstance->SetData(TYPE_NORTHREND_BEASTS, ACIDMAW_SUBMERGED);
                break;
            }
        }

        if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == SNAKES_SPECIAL && !enraged)
        {
            DoScriptText(-1713559,m_creature);
            bsw->doRemove(SPELL_SUBMERGE_0);
            m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
            bsw->doCast(SPELL_ENRAGE);
            enraged = true;
            stage = 0;
            DoScriptText(-1713504,m_creature);
        };

        DoMeleeAttackIfReady();
    }
コード例 #13
0
    void JustDied(Unit* pKiller)
    {
        if (defaultTarget && defaultTarget->isAlive()) bsw->doRemove(SPELL_SNOBOLLED, defaultTarget);
//      if (pBoss && pBoss->isAlive()) bsw->doRemove(SPELL_RISING_ANGER,pBoss);
//      This string - not offlike, in off this buff not removed! especially for small servers.
    }
コード例 #14
0
 void Aggro(Unit *who)
 {
     if (!m_pInstance) return;
     defaultTarget = who;
     bsw->doCast(SPELL_SNOBOLLED, defaultTarget);
 }
コード例 #15
0
    void UpdateAI(const uint32 uiDiff)
    {
        if (m_pInstance && !Unit::GetCreature((*me), m_pInstance->GetData64(NPC_ACIDMAW)))
            this->JustReachedHome();

        if (!UpdateVictim())
            return;

        switch (stage) 
        {
        case 0: {
                bsw->timedCast(SPELL_BURNING_BITE, uiDiff);

                bsw->timedCast(SPELL_MOLTEN_SPEW, uiDiff);

                bsw->timedCast(SPELL_FIRE_SPIT, uiDiff);

                bsw->timedCast(SPELL_BURNING_SPRAY, uiDiff);

                bsw->timedCast(SPELL_SWEEP_0, uiDiff);

                if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == DREADSCALE_SUBMERGED)
                     stage = 1;

                    break;}
        case 1: {
                    me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
                    bsw->doCast(SPELL_SUBMERGE_0);
                    stage = 2;
                    DoScriptText(-1713557,me);
                    m_pInstance->SetData(TYPE_NORTHREND_BEASTS, DREADSCALE_SUBMERGED);
                    break;}
        case 2: {
                if (bsw->timedQuery(SPELL_SLIME_POOL, uiDiff))
                    bsw->doCast(NPC_SLIME_POOL);

                if (bsw->timedQuery(SPELL_SUBMERGE_0, uiDiff) && m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == DREADSCALE_SUBMERGED) 
                         stage = 3;
                    break;}
        case 3: {
                    DoScriptText(-1713559,me);
                    bsw->doRemove(SPELL_SUBMERGE_0);

                    me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
                    bsw->resetTimer(SPELL_SLIME_POOL);
                    stage = 0;
                    m_pInstance->SetData(TYPE_NORTHREND_BEASTS, ACIDMAW_SUBMERGED);
                    break;}
        }

        if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == SNAKES_SPECIAL && !enraged)
                        {
                        DoScriptText(-1713559,me);
                        bsw->doRemove(SPELL_SUBMERGE_0);
                        me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
                        bsw->doCast(SPELL_ENRAGE);
                        enraged = true;
                        stage = 0;
                        DoScriptText(-1713504,me);
                        };

        DoMeleeAttackIfReady();
    }