예제 #1
0
    void Aggro(Unit* /*pWho*/) override
    {
        DoScriptText(SAY_AGGRO, m_creature);

        if (m_pInstance)
            m_pInstance->SetData(TYPE_GALDARAH , IN_PROGRESS);
    }
예제 #2
0
    void Aggro(Unit* /*pWho*/) override
    {
        DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_MORTAL_STRIKES : SPELL_MORTAL_STRIKES_H);

        if (m_pInstance)
            m_pInstance->SetData(TYPE_COLOSSUS, IN_PROGRESS);
    }
예제 #3
0
    void JustDied(Unit* pKiller)
    {
        DoScriptText(SAY_DEATH, m_creature);

        if (m_pInstance)
            m_pInstance->SetData(TYPE_MOORABI, DONE);
    }
예제 #4
0
    void JustDied(Unit* /*pKiller*/) override
    {
        DoScriptText(SAY_DEATH, m_creature);

        if (m_pInstance)
            m_pInstance->SetData(TYPE_GALDARAH, DONE);
    }
예제 #5
0
    void Aggro(Unit* pWho)
    {
        DoScriptText(SAY_AGGRO, m_creature);
        DoCastSpellIfCan(m_creature, SPELL_MOJO_FRENZY);

        if (m_pInstance)
            m_pInstance->SetData(TYPE_MOORABI, IN_PROGRESS);
    }
예제 #6
0
 void JustDied(Unit* /*pKiller*/) override
 {
     if (m_pInstance)
     {
         // kill colossus on death - this will finish the encounter
         if (Creature* pColossus = m_pInstance->GetSingleCreatureFromStorage(NPC_COLOSSUS))
             pColossus->DealDamage(pColossus, pColossus->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
     }
 }
예제 #7
0
    void JustReachedHome() override
    {
        if (m_pInstance)
        {
            if (Creature* pColossus = m_pInstance->GetSingleCreatureFromStorage(NPC_COLOSSUS))
                pColossus->AI()->EnterEvadeMode();
        }

        m_creature->ForcedDespawn();
    }
예제 #8
0
    void JustSummoned(Creature* pSummoned)
    {
        if (!m_pInstance)
            return;

        if (Creature* pSladran = m_pInstance->GetSingleCreatureFromStorage(NPC_SLADRAN))
        {
            float fPosX, fPosY, fPosZ;
            pSladran->GetPosition(fPosX, fPosY, fPosZ);
            pSummoned->GetMotionMaster()->MovePoint(0, fPosX, fPosY, fPosZ);
        }
    }
예제 #9
0
    void JustSummoned(Creature* pSummoned) override
    {
        if (pSummoned->GetEntry() == NPC_RHINO_SPIRIT)
        {
            if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, m_bIsRegularMode ? SPELL_STAMPEDE_RHINO : SPELL_STAMPEDE_RHINO_H, SELECT_FLAG_PLAYER))
            {
                pSummoned->CastSpell(pTarget, m_bIsRegularMode ? SPELL_STAMPEDE_RHINO : SPELL_STAMPEDE_RHINO_H, false, NULL, NULL, m_creature->GetObjectGuid());

                // Store the player guid in order to count it for the achievement
                if (m_pInstance)
                    m_pInstance->SetData(TYPE_ACHIEV_SHARE_LOVE, pTarget->GetGUIDLow());
            }
        }
    }
예제 #10
0
    void EnterEvadeMode() override
    {
        if (!m_bIsPartOfColossus)
            ScriptedAI::EnterEvadeMode();
        // Force the Mojo to move to the Colossus position
        else
        {
            if (m_pInstance)
            {
                float fX, fY, fZ;
                m_creature->GetPosition(fX, fY, fZ);

                if (Creature* pColossus = m_pInstance->GetSingleCreatureFromStorage(NPC_COLOSSUS))
                    pColossus->GetPosition(fX, fY, fZ);

                m_creature->SetWalk(false);
                m_creature->GetMotionMaster()->MovePoint(1, fX, fY, fZ);
            }
        }
    }
예제 #11
0
    void MovementInform(uint32 uiType, uint32 uiPointId) override
    {
        if (uiType != POINT_MOTION_TYPE)
            return;

        if (uiPointId)
        {
            m_creature->ForcedDespawn(1000);

            if (m_pInstance)
            {
                // Prepare to set the Colossus in combat
                if (Creature* pColossus = m_pInstance->GetSingleCreatureFromStorage(NPC_COLOSSUS))
                {
                    if (boss_drakkari_colossusAI* pBossAI = dynamic_cast<boss_drakkari_colossusAI*>(pColossus->AI()))
                        pBossAI->DoPrepareColossus();
                }
            }
        }
    }
예제 #12
0
    void UpdateAI(const uint32 uiDiff) override
    {
        if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
            return;

        if (m_creature->HasAura(SPELL_TRANSFORMATION) && !m_bMammothPhase)
        {
            DoScriptText(EMOTE_TRANSFORMED, m_creature);
            m_bMammothPhase = true;

            // Set the achievement to failed
            if (m_pInstance)
                m_pInstance->SetLessRabiAchievementCriteria(false);
        }

        if (m_uiRoarTimer < uiDiff)
        {
            DoCastSpellIfCan(m_creature->getVictim(), m_bMammothPhase ? SPELL_NUMBING_ROAR : SPELL_NUMBING_SHOUT);
            m_uiRoarTimer = 20000;
        }
        else
            m_uiRoarTimer -= uiDiff;

        if (m_uiQuakeTimer < uiDiff)
        {
            DoScriptText(SAY_QUAKE, m_creature);
            DoCastSpellIfCan(m_creature->getVictim(), m_bMammothPhase ? SPELL_QUAKE : SPELL_GROUND_TREMOR);
            m_uiQuakeTimer = m_bMammothPhase ? 13000 : 18000;
        }
        else
            m_uiQuakeTimer -= uiDiff;

        if (m_uiStabTimer < uiDiff)
        {
            if (m_bMammothPhase)
                DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_DETERMINED_GORE : SPELL_DETERMINED_GORE_H);
            else
                DoCastSpellIfCan(m_creature->getVictim(), SPELL_DETERMINED_STAB);

            m_uiStabTimer = 7000;
        }
        else
            m_uiStabTimer -= uiDiff;

        // check only in troll phase
        if (!m_bMammothPhase)
        {
            if (m_uiTransformationTimer < uiDiff)
            {
                DoScriptText(SAY_TRANSFORM, m_creature);
                DoScriptText(EMOTE_TRANSFORM, m_creature);
                DoCastSpellIfCan(m_creature, SPELL_TRANSFORMATION);
                m_uiPreviousTimer *= 0.8;
                m_uiTransformationTimer = m_uiPreviousTimer;
            }
            else
                m_uiTransformationTimer -= uiDiff;
        }

        DoMeleeAttackIfReady();
    }
예제 #13
0
 void JustReachedHome() override
 {
     if (m_pInstance)
         m_pInstance->SetData(TYPE_COLOSSUS, FAIL);
 }
예제 #14
0
 void JustDied(Unit* /*pKiller*/) override
 {
     if (m_pInstance)
         m_pInstance->SetData(TYPE_COLOSSUS, DONE);
 }
예제 #15
0
 void JustReachedHome() override
 {
     if (m_pInstance)
         m_pInstance->SetData(TYPE_SLADRAN, FAIL);
 }
예제 #16
0
    void UpdateAI(const uint32 uiDiff) override
    {
        if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
            return;

        if (m_uiPoisonNovaTimer < uiDiff)
        {
            if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_POISON_NOVA : SPELL_POISON_NOVA_H) == CAST_OK)
            {
                DoScriptText(EMOTE_NOVA, m_creature);
                m_uiPoisonNovaTimer = 22000;
            }
        }
        else
            m_uiPoisonNovaTimer -= uiDiff;

        if (m_uiSummonTimer < uiDiff)
        {
            if (!m_pInstance)
                return;

            if (Creature* pSummonTarget = m_creature->GetMap()->GetCreature(m_pInstance->SelectRandomSladranTargetGuid()))
            {
                if (urand(0, 3))
                {
                    // we don't want to get spammed
                    if (!urand(0, 4))
                        DoScriptText(SAY_SUMMON_CONSTRICTOR, m_creature);

                    pSummonTarget->CastSpell(pSummonTarget, SPELL_SUMMON_CONSTRICTOR, false, NULL, NULL, m_creature->GetObjectGuid());
                }
                else
                {
                    // we don't want to get spammed
                    if (!urand(0, 4))
                        DoScriptText(SAY_SUMMON_SNAKE, m_creature);

                    pSummonTarget->CastSpell(pSummonTarget, SPELL_SUMMON_VIPER, false, NULL, NULL, m_creature->GetObjectGuid());
                }
            }

            m_uiSummonTimer = m_bIsRegularMode ? 5000 : 3000;
        }
        else
            m_uiSummonTimer -= uiDiff;

        if (m_uiPowerfulBiteTimer < uiDiff)
        {
            if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_POWERFUL_BITE : SPELL_POWERFUL_BITE_H) == CAST_OK)
                m_uiPowerfulBiteTimer = 10000;
        }
        else
            m_uiPowerfulBiteTimer -= uiDiff;

        if (m_uiVenomBoltTimer < uiDiff)
        {
            if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0))
            {
                if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_VENOM_BOLT : SPELL_VENOM_BOLT_H) == CAST_OK)
                    m_uiVenomBoltTimer = 15000;
            }
        }
        else
            m_uiVenomBoltTimer -= uiDiff;

        DoMeleeAttackIfReady();
    }
예제 #17
0
 void JustReachedHome() override
 {
     if (m_pInstance)
         m_pInstance->SetData(TYPE_GALDARAH, FAIL);
 }
예제 #18
0
 void JustReachedHome()
 {
     if (m_pInstance)
         m_pInstance->SetData(TYPE_GALDARAH, NOT_STARTED);
 }