コード例 #1
0
        void DoIntro()
        {
            Creature *Madrigosa = Unit::GetCreature(*me, pInstance ? pInstance->GetData64(DATA_MADRIGOSA) : 0);
            if (!Madrigosa)
                return;

            switch (IntroPhase)
            {
                case 0:
                    DoScriptText(YELL_MADR_ICE_BARRIER, Madrigosa);
                    IntroPhaseTimer = 7000;
                    ++IntroPhase;
                    break;
                case 1:
                    me->SetInFront(Madrigosa);
                    Madrigosa->SetInFront(me);
                    DoScriptText(YELL_MADR_INTRO, Madrigosa, me);
                    IntroPhaseTimer = 9000;
                    ++IntroPhase;
                    break;
                case 2:
                    DoScriptText(YELL_INTRO, me, Madrigosa);
                    IntroPhaseTimer = 13000;
                    ++IntroPhase;
                    break;
                case 3:
                    DoCast(me, SPELL_INTRO_FROST_BLAST);
                    Madrigosa->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
                    me->AttackStop();
                    Madrigosa->AttackStop();
                    IntroFrostBoltTimer = 3000;
                    IntroPhaseTimer = 28000;
                    ++IntroPhase;
                    break;
                case 4:
                    DoScriptText(YELL_INTRO_BREAK_ICE, me);
                    IntroPhaseTimer = 6000;
                    ++IntroPhase;
                    break;
                case 5:
                    Madrigosa->CastSpell(me, SPELL_INTRO_ENCAPSULATE_CHANELLING, false);
                    DoScriptText(YELL_MADR_TRAP, Madrigosa);
                    DoCast(me, SPELL_INTRO_ENCAPSULATE);
                    IntroPhaseTimer = 11000;
                    ++IntroPhase;
                    break;
                case 6:
                    DoScriptText(YELL_INTRO_CHARGE, me);
                    IntroPhaseTimer = 5000;
                    ++IntroPhase;
                    break;
                case 7:
                    me->Kill(Madrigosa);
                    DoScriptText(YELL_MADR_DEATH, Madrigosa);
                    me->SetFullHealth();
                    me->AttackStop();
                    IntroPhaseTimer = 4000;
                    ++IntroPhase;
                    break;
                case 8:
                    DoScriptText(YELL_INTRO_KILL_MADRIGOSA, me);
                    me->SetOrientation(0.14f);
                    me->StopMoving();
                    Madrigosa->setDeathState(CORPSE);
                    IntroPhaseTimer = 8000;
                    ++IntroPhase;
                    break;
                case 9:
                    DoScriptText(YELL_INTRO_TAUNT, me);
                    IntroPhaseTimer = 5000;
                    ++IntroPhase;
                    break;
                case 10:
                    EndIntro();
                    break;
            }
        }
コード例 #2
0
ファイル: boss_brutallus.cpp プロジェクト: Adeer/OregonCore
    void DoIntro()
    {
        Creature* Madrigosa = Unit::GetCreature(*me, pInstance ? pInstance->GetData64(DATA_MADRIGOSA) : 0);
        if (!Madrigosa)
            return;

        float x, y, z, ground_Z;
        switch (IntroPhase)
        {
        case 0:
            me->SetFacingToObject(Madrigosa);
            Madrigosa->SetFacingToObject(me);
            IntroPhaseTimer = 1000;
            break;
        case 1:
            DoScriptText(YELL_MADR_ICE_BARRIER, Madrigosa);
            IntroPhaseTimer = 8000;
            break;
        case 2:
            DoScriptText(YELL_MADR_INTRO, Madrigosa, me);
            IntroPhaseTimer = 7000;
            break;
        case 3:
            DoScriptText(YELL_INTRO, me, Madrigosa);
            IntroPhaseTimer = 4000;
            break;
        case 4:
            Madrigosa->CombatStart(me, true);
            IntroAttackTimer = 2000;
            IntroPhaseTimer = 10000;
            break;
        case 5:
            me->AttackStop();
            Madrigosa->AttackStop();
            Madrigosa->SetSpeed(MOVE_RUN, 3.0f, true);
            Madrigosa->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
            IntroPhaseTimer = 500;
            break;
        case 6:
            Madrigosa->GetMotionMaster()->MovePoint(0, Madrigosa->GetPositionX(), Madrigosa->GetPositionY() + 2, Madrigosa->GetPositionZ() + 8);
            IntroPhaseTimer = 2000;
            break;
        case 7:
            Madrigosa->SetInFront(me);
            Madrigosa->SendMovementFlagUpdate();
            IntroAttackTimer = 3500;
            IntroFrostBoltTimer = 3500;
            IntroPhaseTimer = 13000;
            break;
        case 8:
            DoScriptText(YELL_INTRO_BREAK_ICE, me);
            IntroPhaseTimer = 5000;
            break;
        case 9:
            Madrigosa->SetWalk(true);
            Madrigosa->HandleEmoteCommand(EMOTE_ONESHOT_LAND);
            IntroPhaseTimer = 500;
            break;
        case 10:
            Madrigosa->GetPosition(x, y, z);
            ground_Z = me->GetMap()->GetHeight(x, y, MAX_HEIGHT, true);
            Madrigosa->GetMotionMaster()->MovePoint(1, x, y, ground_Z);
            IntroPhaseTimer = 2000;
            break;
        case 11:
            Madrigosa->SetInFront(me);
            Madrigosa->SendMovementFlagUpdate();
            Madrigosa->CastSpell(me, SPELL_INTRO_ENCAPSULATE_CHANELLING, true);
            DoScriptText(YELL_MADR_TRAP, Madrigosa);
            DoCast(me, SPELL_INTRO_ENCAPSULATE);
            me->SetSpeed(MOVE_RUN, 4.0f, true);

            me->GetPosition(x, y, z);
            me->GetMotionMaster()->MovePoint(1, x - 6, y - 15, z + 10);

            IntroAttackTimer = 3000;
            IntroPhaseTimer = 6000;
            break;
        case 12:
            DoScriptText(YELL_INTRO_CHARGE, me);
            me->SetSpeed(MOVE_RUN, 3.0f, true);
            //me->GetMotionMaster()->MovePath(30000, false);
            me->GetPosition(x, y, z);
            ground_Z = me->GetMap()->GetHeight(x, y, MAX_HEIGHT, true);
            me->GetMotionMaster()->MovePoint(2, x + 6, y + 15, ground_Z);
            IntroPhaseTimer = 5000;
            break;
        case 13:
            me->Kill(Madrigosa);
            DoScriptText(YELL_MADR_DEATH, Madrigosa);
            me->SetSpeed(MOVE_RUN, 2.0f, true);
            IntroPhaseTimer = 7000;
            break;
        case 14:
            DoScriptText(YELL_INTRO_KILL_MADRIGOSA, me);
            me->SetSpeed(MOVE_RUN, 1.0f, true);
            Madrigosa->setDeathState(CORPSE);
            IntroPhaseTimer = 8000;
            break;
        case 15:
            DoScriptText(YELL_INTRO_TAUNT, me);
            IntroPhaseTimer = 5000;
            break;
        case 16:
            EndIntro();
            break;
        }
    }
コード例 #3
0
    void DoIntro()
    {
        Creature *Madrigosa = Unit::GetCreature(*me, pInstance ? pInstance->GetData64(DATA_MADRIGOSA) : 0);
        if (!Madrigosa)
            return;
 
        switch (IntroPhase)
        {
   case 0:
IntroPhaseTimer = 1000;
break;
   case 1:
                DoScriptText(YELL_MADR_ICE_BARRIER, Madrigosa);
IntroPhaseTimer = 8000;
                break;
            case 2:
                DoScriptText(YELL_MADR_INTRO, Madrigosa, me);
Madrigosa->SetReactState(REACT_PASSIVE);
                IntroPhaseTimer = 7000;
                break;
            case 3:
                DoScriptText(YELL_INTRO, me, Madrigosa);
me->SetInFront(Madrigosa);
                Madrigosa->SetInFront(me);
                IntroPhaseTimer = 4000;
                break;
case 4:
Madrigosa->CombatStart(me, true);
IntroAttackTimer = 2000;
IntroPhaseTimer = 10000;
break;
case 5:
me->AttackStop();
                Madrigosa->AttackStop();
Madrigosa->SetUnitMovementFlags(MOVEFLAG_LEVITATING | MOVEFLAG_ONTRANSPORT);
Madrigosa->SetSpeed(MOVE_RUN, 3.0f, true);
Madrigosa->GetMotionMaster()->MovePath(31000, false);
Madrigosa->SetInFront(me);
IntroAttackTimer = 3500;
                IntroFrostBoltTimer = 3500;
                IntroPhaseTimer = 13000;
                break;
            case 6:
Madrigosa->SetPosition(Madrigosa->GetPositionX(),Madrigosa->GetPositionY(),Madrigosa->GetPositionZ(),4.1f,true);
                DoScriptText(YELL_INTRO_BREAK_ICE, me);
                IntroPhaseTimer = 6000;
                break;
            case 7:
Madrigosa->SetUnitMovementFlags(MOVEFLAG_NONE);
                Madrigosa->CastSpell(me, 45661, true);
                DoScriptText(YELL_MADR_TRAP, Madrigosa);
                DoCast(me, SPELL_INTRO_ENCAPSULATE);
me->SetSpeed(MOVE_RUN, 4.0f, true);
me->GetMotionMaster()->MovePoint(0,1494.691895, 548.588989, 39.162289);
me->SetPosition(1494.691895, 548.588989, 25.652, 1.34f, true);
IntroAttackTimer = 3000;
                IntroPhaseTimer = 6000;
                break;
case 8:
DoScriptText(YELL_INTRO_CHARGE, me);
me->SetSpeed(MOVE_RUN, 3.0f, true);
me->GetMotionMaster()->MovePath(30000, false);
   IntroPhaseTimer = 4000;
                break;
case 9:
                me->DealDamage(Madrigosa, Madrigosa->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, true);
                DoScriptText(YELL_MADR_DEATH, Madrigosa);
                me->SetHealth(me->GetMaxHealth());
                me->AttackStop();
me->SetSpeed(MOVE_RUN, 2.0f, true);
IntroPhaseTimer = 7000;
                break;
            case 10:
                DoScriptText(YELL_INTRO_KILL_MADRIGOSA, me);
                me->StopMoving();
me->SetSpeed(MOVE_RUN, 1.0f, true);
me->GetMotionMaster()->MovePoint(0, me->GetPositionX()+3,me->GetPositionY(),me->GetPositionZ());
me->SetPosition(me->GetPositionX()+3,me->GetPositionY(),me->GetPositionZ(), 1.1, false);
                Madrigosa->setDeathState(CORPSE);
                IntroPhaseTimer = 8000;
                break;
            case 11:
                DoScriptText(YELL_INTRO_TAUNT, me);
                IntroPhaseTimer = 5000;
                break;
            case 12:
                EndIntro();
                break;
        }
    }
コード例 #4
0
        void DoIntro()
        {
            Creature* Madrigosa = Unit::GetCreature(*me, instance ? instance->GetData64(DATA_MADRIGOSA) : 0);
            if (!Madrigosa)
                return;

            switch (IntroPhase)
            {
                case 0:
                    Madrigosa->AI()->Talk(YELL_MADR_ICE_BARRIER);
                    IntroPhaseTimer = 7000;
                    ++IntroPhase;
                    break;
                case 1:
                    me->SetInFront(Madrigosa);
                    Madrigosa->SetInFront(me);
                    Madrigosa->AI()->Talk(YELL_MADR_INTRO, me->GetGUID());
                    IntroPhaseTimer = 9000;
                    ++IntroPhase;
                    break;
                case 2:
                    Talk(YELL_INTRO, Madrigosa->GetGUID());
                    IntroPhaseTimer = 13000;
                    ++IntroPhase;
                    break;
                case 3:
                    DoCast(me, SPELL_INTRO_FROST_BLAST);
                    Madrigosa->SetDisableGravity(true);
                    me->AttackStop();
                    Madrigosa->AttackStop();
                    IntroFrostBoltTimer = 3000;
                    IntroPhaseTimer = 28000;
                    ++IntroPhase;
                    break;
                case 4:
                    Talk(YELL_INTRO_BREAK_ICE);
                    IntroPhaseTimer = 6000;
                    ++IntroPhase;
                    break;
                case 5:
                    Madrigosa->CastSpell(me, SPELL_INTRO_ENCAPSULATE_CHANELLING, false);
                    Madrigosa->AI()->Talk(YELL_MADR_TRAP);
                    DoCast(me, SPELL_INTRO_ENCAPSULATE);
                    IntroPhaseTimer = 11000;
                    ++IntroPhase;
                    break;
                case 6:
                    Talk(YELL_INTRO_CHARGE);
                    IntroPhaseTimer = 5000;
                    ++IntroPhase;
                    break;
                case 7:
                    me->Kill(Madrigosa);
                    Madrigosa->AI()->Talk(YELL_MADR_DEATH);
                    me->SetFullHealth();
                    me->AttackStop();
                    IntroPhaseTimer = 4000;
                    ++IntroPhase;
                    break;
                case 8:
                    Talk(YELL_INTRO_KILL_MADRIGOSA);
                    me->SetOrientation(0.14f);
                    me->StopMoving();
                    Madrigosa->setDeathState(CORPSE);
                    IntroPhaseTimer = 8000;
                    ++IntroPhase;
                    break;
                case 9:
                    Talk(YELL_INTRO_TAUNT);
                    IntroPhaseTimer = 5000;
                    ++IntroPhase;
                    break;
                case 10:
                    EndIntro();
                    break;
            }
        }
コード例 #5
0
        void UpdateAI(const uint32 diff)
        {
            if(instance->GetData(DATA_TYRANNUS_START) == IN_PROGRESS && event)
            {
                if (StartTimer <= diff)
                {
                    switch (StartPhase)
                    {
                        case 0:
                            if (Creature* sTyrannus = me->FindNearestCreature(NPC_TYRANNUS_EVENTS, 50.0f, true))
                            {
                                sTyrannus->SetCanFly(true);
                                DoScriptText(SAY_TYRRANUS_1, sTyrannus);
                                
                                int32 entryIndex;
                               if (instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
                                     entryIndex = 0;
                                  else
                                     entryIndex = 1;
                                     
                               Position spawnPoint = {427.36f, 212.636f, 529.47f, 6.2564f};
                               
                              for (int8 i = 0; startPositions[i].entry[entryIndex] != 0; ++i)
                              {
                                 if (Creature* summon = me->SummonCreature(startPositions[i].entry[entryIndex], spawnPoint, TEMPSUMMON_DEAD_DESPAWN))
                                  summon->GetMotionMaster()->MovePoint(0, startPositions[i].movePosition);
                              }
                            }
                            ++StartPhase;
                            StartTimer = 5000;
                            break;
                        case 1:
                            if (Creature* sTyrannus = me->FindNearestCreature(NPC_TYRANNUS_EVENTS, 50.0f, true))
                                DoScriptText(SAY_TYRRANUS_2, sTyrannus);
                            ++StartPhase;
                            StartTimer = 15000;
                            break;
                        case 2:
                            if(me->GetEntry() == NPC_SYLVANAS_PART1)
                                DoScriptText(SAY_SYLVANAS_1, me);
                            else if(me->GetEntry() == NPC_JAINA_PART1)
                                DoScriptText(SAY_JAINA_1, me);

                            if (instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
                            {
                                GetCreatureListWithEntryInGrid(Champion1, me, NPC_CHAMPION_1_ALLIANCE, 150.0f);
                                for(std::list<Creature*>::iterator itr = Champion1.begin(); itr != Champion1.end(); ++itr)
                                {
                                    Creature *sChampions = *itr;
                                    if (!sChampions)
                                        continue;

                                    if (sChampions->isAlive())
                                        if (Creature* sNecrolyte = me->FindNearestCreature(367880, 150.0f, true))
                                        {
                                            sChampions->Attack(sNecrolyte, true);
                                            sChampions->GetMotionMaster()->MoveChase(sNecrolyte);
                                        }
                                }

                                GetCreatureListWithEntryInGrid(Champion2, me, NPC_CHAMPION_2_ALLIANCE, 150.0f);
                                for(std::list<Creature*>::iterator itr = Champion2.begin(); itr != Champion2.end(); ++itr)
                                {
                                    Creature *sChampions = *itr;
                                    if (!sChampions)
                                        continue;

                                    if (sChampions->isAlive())
                                        if (Creature* sNecrolyte = me->FindNearestCreature(36788, 150.0f, true))
                                        {
                                            sChampions->Attack(sNecrolyte, true);
                                            sChampions->GetMotionMaster()->MoveChase(sNecrolyte);
                                        }
                                }
                            }
                            else
                            {
                                GetCreatureListWithEntryInGrid(Champion1, me, NPC_CHAMPION_1_HORDE, 150.0f);
                                for(std::list<Creature*>::iterator itr = Champion1.begin(); itr != Champion1.end(); ++itr)
                                {
                                    Creature *sChampions = *itr;
                                    if (!sChampions)
                                        continue;

                                    if (sChampions->isAlive())
                                        if (Creature* sNecrolyte = me->FindNearestCreature(367880, 150.0f, true))
                                        {
                                            sChampions->Attack(sNecrolyte, true);
                                            sChampions->GetMotionMaster()->MoveChase(sNecrolyte);
                                        }
                                }

                                GetCreatureListWithEntryInGrid(Champion2, me, NPC_CHAMPION_2_HORDE, 150.0f);
                                for(std::list<Creature*>::iterator itr = Champion2.begin(); itr != Champion2.end(); ++itr)
                                {
                                    Creature *sChampions = *itr;
                                    if (!sChampions)
                                        continue;

                                    if (sChampions->isAlive())
                                        if (Creature* sNecrolyte = me->FindNearestCreature(36788, 150.0f, true))
                                        {
                                            sChampions->Attack(sNecrolyte, true);
                                            sChampions->GetMotionMaster()->MoveChase(sNecrolyte);
                                        }
                                }

                                GetCreatureListWithEntryInGrid(Champion3, me, NPC_CHAMPION_3_HORDE, 150.0f);
                                for(std::list<Creature*>::iterator itr = Champion3.begin(); itr != Champion3.end(); ++itr)
                                {
                                    Creature *sChampions = *itr;
                                    if (!sChampions)
                                        continue;

                                    if (sChampions->isAlive())
                                        if (Creature* sNecrolyte = me->FindNearestCreature(36788, 150.0f, true))
                                        {
                                            sChampions->Attack(sNecrolyte, true);
                                            sChampions->GetMotionMaster()->MoveChase(sNecrolyte);
                                        }
                                }
                            }
                            ++StartPhase;
                            StartTimer = 1000;
                            break;
                        case 3:
                            if (Creature* sTyrannus = me->FindNearestCreature(NPC_TYRANNUS_EVENTS, 150.0f, true))
                                DoScriptText(SAY_TYRRANUS_3, sTyrannus);
                            ++StartPhase;
                            StartTimer = 2000;
                            break;
                        case 4:
                            if (Creature* sTyrannus = me->FindNearestCreature(NPC_TYRANNUS_EVENTS, 150.0f, true))
                                DoPlaySoundToSet(sTyrannus, SAY_SOUND);

                            for(std::list<Creature*>::iterator itr = Champion1.begin(); itr != Champion1.end(); ++itr)
                            {
                                Creature *sChampions = *itr;
                                if (!sChampions)
                                    continue;

                                if (sChampions->isAlive())
                                {
                                    sChampions->AttackStop();
                                    sChampions->GetMotionMaster()->MoveFall();
                                }
                            }

                            for(std::list<Creature*>::iterator itr = Champion2.begin(); itr != Champion2.end(); ++itr)
                            {
                                Creature *sChampions = *itr;
                                if (!sChampions)
                                    continue;

                                if (sChampions->isAlive())
                                {
                                    sChampions->AttackStop();
                                    sChampions->GetMotionMaster()->MoveFall();
                                }
                            }

                            for(std::list<Creature*>::iterator itr = Champion3.begin(); itr != Champion3.end(); ++itr)
                            {
                                Creature *sChampions = *itr;
                                if (!sChampions)
                                    continue;

                                if (sChampions->isAlive())
                                {
                                    sChampions->AttackStop();
                                    sChampions->GetMotionMaster()->MoveFall();
                                }
                            }
                            ++StartPhase;
                            StartTimer = 5000;
                            break;
                        case 5:
                            if (Creature* sTyrannus = me->FindNearestCreature(NPC_TYRANNUS_EVENTS, 50.0f, true))
                                sTyrannus->CastSpell(sTyrannus, SPELL_NECROMANTIC_POWER, false);

                            for(std::list<Creature*>::iterator itr = Champion1.begin(); itr != Champion1.end(); ++itr)
                            {
                                Creature *sChampions = *itr;
                                if (!sChampions)
                                    continue;

                                if (sChampions->isAlive())
                                    sChampions->Kill(sChampions, false);
                            }

                            for(std::list<Creature*>::iterator itr = Champion2.begin(); itr != Champion2.end(); ++itr)
                            {
                                Creature *sChampions = *itr;
                                if (!sChampions)
                                    continue;

                                if (sChampions->isAlive())
                                    sChampions->Kill(sChampions, false);
                            }

                            for(std::list<Creature*>::iterator itr = Champion3.begin(); itr != Champion3.end(); ++itr)
                            {
                                Creature *sChampions = *itr;
                                if (!sChampions)
                                    continue;

                                if (sChampions->isAlive())
                                    sChampions->Kill(sChampions, false);
                            }

                            if(me->GetEntry() == NPC_SYLVANAS_PART1)
                                DoScriptText(SAY_SYLVANAS_2, me);
                            else if(me->GetEntry() == NPC_JAINA_PART1)
                                DoScriptText(SAY_JAINA_2, me);
                            ++StartPhase;
                            StartTimer = 5000;
                            break;
                        case 6:
                            for(std::list<Creature*>::iterator itr = Champion1.begin(); itr != Champion1.end(); ++itr)
                            {
                                Creature *sChampions = *itr;
                                if (!sChampions)
                                    continue;

                                sChampions->Respawn();
                                sChampions->CastSpell(sChampions, SPELL_DEATH_ARMY_VISUAL, true);
                                if(me->GetEntry() == NPC_SYLVANAS_PART1)
                                    sChampions->UpdateEntry(36796, ALLIANCE);
                                else
                                    sChampions->UpdateEntry(36796, HORDE);
                                sChampions->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
                                sChampions->SetReactState(REACT_PASSIVE);
                            }

                            for(std::list<Creature*>::iterator itr = Champion2.begin(); itr != Champion2.end(); ++itr)
                            {
                                Creature *sChampions = *itr;
                                if (!sChampions)
                                    continue;

                                sChampions->Respawn();
                                sChampions->CastSpell(sChampions, SPELL_DEATH_ARMY_VISUAL, true);
                                if(me->GetEntry() == NPC_SYLVANAS_PART1)
                                    sChampions->UpdateEntry(36796, ALLIANCE);
                                else
                                    sChampions->UpdateEntry(36796, HORDE);
                                sChampions->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
                                sChampions->SetReactState(REACT_PASSIVE);
                            }

                            for(std::list<Creature*>::iterator itr = Champion3.begin(); itr != Champion3.end(); ++itr)
                            {
                                Creature *sChampions = *itr;
                                if (!sChampions)
                                    continue;

                                sChampions->Respawn();
                                sChampions->CastSpell(sChampions, SPELL_DEATH_ARMY_VISUAL, true);
                                if(me->GetEntry() == NPC_SYLVANAS_PART1)
                                    sChampions->UpdateEntry(36796, ALLIANCE);
                                else
                                    sChampions->UpdateEntry(36796, HORDE);
                                sChampions->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
                                sChampions->SetReactState(REACT_PASSIVE);
                            }

                            if (Creature* sTyrannus = me->FindNearestCreature(NPC_TYRANNUS_EVENTS, 50.0f, true))
                                DoScriptText(SAY_TYRRANUS_4, sTyrannus);

                            for(std::list<Creature*>::iterator itr = Champion1.begin(); itr != Champion1.end(); ++itr)
                            {
                                Creature *sChampions = *itr;
                                if (!sChampions)
                                    continue;

                                if (Creature* pHelper = me->FindNearestCreature(NPC_KORALEN, 150.0f, true))
                                {
                                    sChampions->Attack(pHelper, true);
                                    sChampions->GetMotionMaster()->MoveChase(pHelper);
                                }
                                else if (Creature* pHelper = me->FindNearestCreature(NPC_KORLAEN, 150.0f, true))
                                {
                                    sChampions->Attack(pHelper, true);
                                    sChampions->GetMotionMaster()->MoveChase(pHelper);
                                }
                            }

                            for(std::list<Creature*>::iterator itr = Champion2.begin(); itr != Champion2.end(); ++itr)
                            {
                                Creature *sChampions = *itr;
                                if (!sChampions)
                                    continue;

                                if (Creature* pHelper = me->FindNearestCreature(NPC_KORALEN, 150.0f, true))
                                {
                                    sChampions->Attack(pHelper, true);
                                    sChampions->GetMotionMaster()->MoveChase(pHelper);
                                }
                                else if (Creature* pHelper = me->FindNearestCreature(NPC_KORLAEN, 150.0f, true))
                                {
                                    sChampions->Attack(pHelper, true);
                                    sChampions->GetMotionMaster()->MoveChase(pHelper);
                                }
                            }

                            for(std::list<Creature*>::iterator itr = Champion3.begin(); itr != Champion3.end(); ++itr)
                            {
                                Creature *sChampions = *itr;
                                if (!sChampions)
                                    continue;

                                if (Creature* pHelper = me->FindNearestCreature(NPC_KORALEN, 150.0f, true))
                                {
                                    sChampions->Attack(pHelper, true);
                                    sChampions->GetMotionMaster()->MoveChase(pHelper);
                                }
                                else if (Creature* pHelper = me->FindNearestCreature(NPC_KORLAEN, 150.0f, true))
                                {
                                    sChampions->Attack(pHelper, true);
                                    sChampions->GetMotionMaster()->MoveChase(pHelper);
                                }
                            }
                            ++StartPhase;
                            StartTimer = 3000;
                            break;
                        case 7:
                            for(std::list<Creature*>::iterator itr = Champion1.begin(); itr != Champion1.end(); ++itr)
                            {
                                Creature *sChampions = *itr;
                                if (!sChampions)
                                    continue;

                                if(me->GetEntry() == NPC_SYLVANAS_PART1)
                                    me->CastSpell(sChampions, SPELL_MULTI_SHOT_SYLVANAS, true);
                                else
                                    me->CastSpell(sChampions, SPELL_BLIZZARD_JAINA, true);
                            }

                            for(std::list<Creature*>::iterator itr = Champion2.begin(); itr != Champion2.end(); ++itr)
                            {
                                Creature *sChampions = *itr;
                                if (!sChampions)
                                    continue;

                                if(me->GetEntry() == NPC_SYLVANAS_PART1)
                                    me->CastSpell(sChampions, SPELL_MULTI_SHOT_SYLVANAS, true);
                                else
                                    me->CastSpell(sChampions, SPELL_BLIZZARD_JAINA, true);
                            }

                            for(std::list<Creature*>::iterator itr = Champion3.begin(); itr != Champion3.end(); ++itr)
                            {
                                Creature *sChampions = *itr;
                                if (!sChampions)
                                    continue;

                                if(me->GetEntry() == NPC_SYLVANAS_PART1)
                                    me->CastSpell(sChampions, SPELL_MULTI_SHOT_SYLVANAS, true);
                                else
                                    me->CastSpell(sChampions, SPELL_BLIZZARD_JAINA, true);
                            }
                            ++StartPhase;
                            StartTimer = 500;
                            break;
                        case 8:
                            for(std::list<Creature*>::iterator itr = Champion1.begin(); itr != Champion1.end(); ++itr)
                            {
                                Creature *sChampions = *itr;
                                if (!sChampions)
                                    continue;

                                if(me->GetEntry() == NPC_SYLVANAS_PART1)
                                    me->CastSpell(sChampions, SPELL_SHADOW_BOLT_SYLVANAS, true);
                                else
                                    me->CastSpell(sChampions, SPELL_ICE_LANCE_JAINA, true);
                            }

                            for(std::list<Creature*>::iterator itr = Champion2.begin(); itr != Champion2.end(); ++itr)
                            {
                                Creature *sChampions = *itr;
                                if (!sChampions)
                                    continue;

                                if(me->GetEntry() == NPC_SYLVANAS_PART1)
                                    me->CastSpell(sChampions, SPELL_SHADOW_BOLT_SYLVANAS, true);
                                else
                                    me->CastSpell(sChampions, SPELL_ICE_LANCE_JAINA, true);
                            }

                            for(std::list<Creature*>::iterator itr = Champion3.begin(); itr != Champion3.end(); ++itr)
                            {
                                Creature *sChampions = *itr;
                                if (!sChampions)
                                    continue;

                                if(me->GetEntry() == NPC_SYLVANAS_PART1)
                                    me->CastSpell(sChampions, SPELL_SHADOW_BOLT_SYLVANAS, true);
                                else
                                    me->CastSpell(sChampions, SPELL_ICE_LANCE_JAINA, true);
                            }
                            ++StartPhase;
                            StartTimer = 500;
                            break;
                        case 9:
                            for(std::list<Creature*>::iterator itr = Champion1.begin(); itr != Champion1.end(); ++itr)
                            {
                                Creature *sChampions = *itr;
                                if (!sChampions)
                                    continue;
                                me->Kill(sChampions, false);
                            }

                            for(std::list<Creature*>::iterator itr = Champion2.begin(); itr != Champion2.end(); ++itr)
                            {
                                Creature *sChampions = *itr;
                                if (!sChampions)
                                    continue;

                                me->Kill(sChampions, false);
                            }

                            for(std::list<Creature*>::iterator itr = Champion3.begin(); itr != Champion3.end(); ++itr)
                            {
                                Creature *sChampions = *itr;
                                if (!sChampions)
                                    continue;

                                me->Kill(sChampions, false);
                            }
                            ++StartPhase;
                            StartTimer = 3000;
                            break;
                        case 10:
                            if(me->GetEntry() == NPC_JAINA_PART1)
                                DoScriptText(SAY_JAINA_3, me);
                            else 
                                DoScriptText(SAY_SYLVANAS_3, me);
                            ++StartPhase;
                            StartTimer = 10000;
                            break;
                        case 11:
                            if(me->GetEntry() == NPC_JAINA_PART1)
                            DoScriptText(SAY_JAINA_4, me);
                            else 
                                DoScriptText(SAY_SYLVANAS_4, me);
                            ++StartPhase;
                            StartTimer = 10000;
                            break;
                        case 12:
                            if (Creature* sTyrannus = me->FindNearestCreature(NPC_TYRANNUS_EVENTS, 150.0f, true))
                                sTyrannus->GetMotionMaster()->MovePoint(0, 938.125f, 93.928f, 585.39f);
                            instance->SetData(DATA_TYRANNUS_START, DONE);
                            event = false;
                            ++StartPhase;
                            StartTimer = 10000;
                            break;
                        return;					
                    }
                } else StartTimer -= diff;
            }
        }