예제 #1
0
 void WaypointReached(uint32 uiPointId) override
 {
     switch (uiPointId)
     {
         case 13:                                        // Before Tribunal Event, Continue with Gossip Interaction
             DoScriptText(SAY_EVENT_INTRO_1, m_creature);
             SetEscortPaused(true);
             m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
             break;
         case 17:                                        // Reach Tribunal
             SetEscortPaused(true);
             m_uiPhaseTimer = 500;
             break;
         case 18:                                        // Reach Floor Event
             SetEscortPaused(true);
             if (m_pInstance)
             {
                 if (GameObject* pKonsole = m_pInstance->GetSingleGameObjectFromStorage(GO_TRIBUNAL_CONSOLE))
                     m_creature->SetFacingToObject(pKonsole);
                 m_pInstance->DoUseDoorOrButton(GO_TRIBUNAL_FLOOR);
             }
             m_uiPhaseTimer = 1000;
             break;
     }
 }
예제 #2
0
    void ContinueEvent()
    {
        if (!m_pInstance || m_pInstance->GetData(TYPE_TRIBUNAL) != IN_PROGRESS)
            return;

        // Set the achiev in progress
        m_pInstance->SetBrannSpankin(true);

        m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
        SetRun(true);
        SetEscortPaused(false);
        m_bHasContinued = true;
    }
예제 #3
0
    void JustStartedEscort() override
    {
        if (m_pInstance)
            m_pInstance->SetData(TYPE_TRIBUNAL, IN_PROGRESS);

        DoScriptText(SAY_ESCORT_START, m_creature);
    }
    void Aggro(Unit* /*pWho*/) override
    {
        DoScriptText(SAY_AGGRO, m_creature);

        if (m_pInstance)
            m_pInstance->SetData(TYPE_MAIDEN, IN_PROGRESS);
    }
    void JustDied(Unit* /*pKiller*/) override
    {
        DoScriptText(SAY_DEATH, m_creature);

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

        if (m_pInstance)
        {
            m_pInstance->SetData(TYPE_TRIBUNAL, FAIL);
            // Continue at right state after respawn
            if (m_bHasContinued)
                m_pInstance->SetData(TYPE_TRIBUNAL, IN_PROGRESS);
        }

        for (GuidList::const_iterator itr = m_luiDwarfGUIDs.begin(); itr != m_luiDwarfGUIDs.end(); ++itr)
        {
            if (Creature* pDwarf = m_creature->GetMap()->GetCreature(*itr))
                pDwarf->ForcedDespawn();
        }
        m_luiDwarfGUIDs.clear();
    }
예제 #7
0
    void SpawnDwarf(uint32 uEntry)
    {
        if (!m_pInstance)
            return;

        // each case has an individual spawn stalker
        switch (uEntry)
        {
            case NPC_DARK_RUNE_PROTECTOR:
            {
                Creature* pStalker = m_creature->GetMap()->GetCreature(m_pInstance->GetProtectorStalkerGuid());
                if (!pStalker)
                    return;

                uint32 uiSpawnNumber = (m_bIsRegularMode ? 2 : 3);
                for (uint8 i = 0; i < uiSpawnNumber; ++i)
                    pStalker->CastSpell(pStalker, SPELL_SUMMON_PROTECTOR, true, NULL, NULL, m_creature->GetObjectGuid());
                pStalker->CastSpell(pStalker, SPELL_SUMMON_STORMCALLER, true, NULL, NULL, m_creature->GetObjectGuid());
                break;
            }
            case NPC_DARK_RUNE_STORMCALLER:
            {
                Creature* pStalker = m_creature->GetMap()->GetCreature(m_pInstance->GeStormcallerStalkerGuid());
                if (!pStalker)
                    return;

                for (uint8 i = 0; i < 2; ++i)
                    pStalker->CastSpell(pStalker, SPELL_SUMMON_STORMCALLER, true, NULL, NULL, m_creature->GetObjectGuid());
                break;
            }
            case NPC_IRON_GOLEM_CUSTODIAN:
            {
                Creature* pStalker = m_creature->GetMap()->GetCreature(m_pInstance->GetCustodianStalkerGuid());
                if (!pStalker)
                    return;

                pStalker->CastSpell(pStalker, SPELL_SUMMON_CUSTODIAN, true, NULL, NULL, m_creature->GetObjectGuid());
                break;
            }
        }
    }
예제 #8
0
    // Respawn Handling: Relocate and Set Escort to WP 13
    void JustRespawned() override
    {
        if (!m_pInstance)
            return;

        Reset();

        if (m_pInstance->GetData(TYPE_TRIBUNAL) == IN_PROGRESS)
        {
            SetEscortPaused(true);

            m_uiStep = 0;
            m_uiPhaseTimer = 0;

            m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);

            // Relocate to position of WP 13
            m_creature->GetMap()->CreatureRelocation(m_creature, 941.101563f, 377.373413f, 207.421f, 3.85f);

            SetCurrentWaypoint(13);
        }
    }
예제 #9
0
    void UpdateEscortAI(const uint32 uiDiff) override
    {
        if (m_uiPhaseTimer && m_uiPhaseTimer <= uiDiff)
        {
            switch (m_uiStep)
            {
                    // Begin Event
                case 0:
                    // TODO, this is wrong, must be "using or similar"
                    m_creature->SetStandState(UNIT_STAND_STATE_KNEEL);
                    m_uiPhaseTimer = 1500;
                    break;
                case 1:
                    DoScriptText(SAY_EVENT_INTRO_2, m_creature);
                    m_uiPhaseTimer = 2500;
                    break;
                case 2:
                    if (m_pInstance)
                        m_pInstance->DoUseDoorOrButton(GO_TRIBUNAL_CONSOLE);
                    m_uiPhaseTimer = 6500;
                    break;
                case 3:
                    if (m_pInstance)
                        m_pInstance->DoFaceSpeak(FACE_ABEDNEUM, SAY_EVENT_INTRO_3_ABED);
                    m_uiPhaseTimer = 8500;
                    break;

                    // Activate Kaddrak
                case 4:
                    DoScriptText(SAY_EVENT_A_1, m_creature);
                    m_uiPhaseTimer = 6500;
                    break;
                case 5:
                    if (m_pInstance)
                        m_pInstance->DoFaceSpeak(FACE_KADDRAK, SAY_EVENT_A_2_KADD);
                    m_uiPhaseTimer = 12500;
                    break;
                case 6:
                    DoScriptText(SAY_EVENT_A_3, m_creature);
                    m_uiPhaseTimer = 6000;
                    break;
                case 7:
                    if (m_pInstance)
                        m_pInstance->ActivateFace(FACE_KADDRAK, false);
                    m_uiPhaseTimer = 5000;
                    break;
                case 8:
                    SpawnDwarf(NPC_DARK_RUNE_PROTECTOR);
                    m_uiPhaseTimer = 20000;
                    break;

                    // Activate Marnak
                case 9:
                    DoScriptText(SAY_EVENT_B_1, m_creature);
                    m_uiPhaseTimer = 6000;
                    break;
                case 10:
                    if (m_pInstance)
                        m_pInstance->DoFaceSpeak(FACE_MARNAK, SAY_EVENT_B_2_MARN);
                    SpawnDwarf(NPC_DARK_RUNE_PROTECTOR);
                    m_uiPhaseTimer = 20000;
                    break;
                case 11:
                    DoScriptText(SAY_EVENT_B_3, m_creature);
                    m_uiPhaseTimer = 5000;
                    break;
                case 12:
                    if (m_pInstance)
                        m_pInstance->ActivateFace(FACE_MARNAK, false);
                    m_uiPhaseTimer = 10000;
                    break;
                case 13:
                    SpawnDwarf(NPC_DARK_RUNE_PROTECTOR);
                    m_uiPhaseTimer = 10000;
                    break;
                case 14:
                    SpawnDwarf(NPC_DARK_RUNE_STORMCALLER);
                    m_uiPhaseTimer = (20000);
                    break;
                case 15:
                    DoScriptText(SAY_EVENT_C_1, m_creature);
                    SpawnDwarf(NPC_DARK_RUNE_PROTECTOR);
                    m_uiPhaseTimer = 10000;
                    break;
                case 16:
                    SpawnDwarf(NPC_DARK_RUNE_STORMCALLER);
                    m_uiPhaseTimer = 20000;
                    break;

                    // Activate Abedneum
                case 17:
                    if (m_pInstance)
                        m_pInstance->DoFaceSpeak(FACE_ABEDNEUM, SAY_EVENT_C_2_ABED);
                    SpawnDwarf(NPC_DARK_RUNE_PROTECTOR);
                    m_uiPhaseTimer = 20000;
                    break;
                case 18:
                    DoScriptText(SAY_EVENT_C_3, m_creature);
                    m_uiPhaseTimer = 5000;
                    break;
                case 19:
                    if (m_pInstance)
                        m_pInstance->ActivateFace(FACE_ABEDNEUM, false);
                    m_uiPhaseTimer = 5000;
                    break;
                case 20:
                    SpawnDwarf(NPC_DARK_RUNE_STORMCALLER);
                    m_uiPhaseTimer = 10000;
                    break;
                case 21:
                    SpawnDwarf(NPC_DARK_RUNE_PROTECTOR);
                    m_uiPhaseTimer = 15000;
                    break;

                case 22:
                    DoScriptText(SAY_EVENT_D_1, m_creature);
                    SpawnDwarf(NPC_IRON_GOLEM_CUSTODIAN);
                    m_uiPhaseTimer = 20000;
                    break;
                case 23:
                    if (m_pInstance)
                        m_pInstance->DoFaceSpeak(FACE_ABEDNEUM, SAY_EVENT_D_2_ABED);
                    SpawnDwarf(NPC_DARK_RUNE_PROTECTOR);
                    m_uiPhaseTimer = 5000;
                    break;
                case 24:
                    SpawnDwarf(NPC_DARK_RUNE_STORMCALLER);
                    m_uiPhaseTimer = 15000;
                    break;
                case 25:
                    DoScriptText(SAY_EVENT_D_3, m_creature);
                    SpawnDwarf(NPC_IRON_GOLEM_CUSTODIAN);
                    m_uiPhaseTimer = 5000;
                    break;
                case 26:
                    SpawnDwarf(NPC_DARK_RUNE_PROTECTOR);
                    m_uiPhaseTimer = 5000;
                    break;
                case 27:
                    SpawnDwarf(NPC_DARK_RUNE_STORMCALLER);
                    m_uiPhaseTimer = 10000;
                    break;
                case 28:
                    if (m_pInstance)
                        m_pInstance->DoFaceSpeak(FACE_ABEDNEUM, SAY_EVENT_D_4_ABED);
                    SpawnDwarf(NPC_DARK_RUNE_PROTECTOR);
                    m_uiPhaseTimer = 10000;
                    break;

                    // End Event
                case 29:
                    DoScriptText(SAY_EVENT_END_01, m_creature);
                    m_creature->SetStandState(UNIT_STAND_STATE_STAND);// TODO TODO
                    if (m_pInstance)
                        m_pInstance->SetData(TYPE_TRIBUNAL, SPECIAL); // Kill remaining npcs

                    // ToDo: the loot and the achiev should be triggered at this point
                    // Brann should get the gossip option "There will be plenty of time for this later Brann, we need to get moving!"
                    // This will allow Brann to continue the escort to the last encounter
                    // When reaching the last door he has the gossip "We're with you Brann! Open it!"

                    SetEscortPaused(false);
                    m_uiPhaseTimer = 3000;
                    // break;
                    // case 30:
                    if (m_pInstance)
                        m_pInstance->ActivateFace(FACE_ABEDNEUM, true);
                    m_uiPhaseTimer = 0;
                    break;
                case 30:
                    DoScriptText(SAY_EVENT_END_02, m_creature);
                    m_uiPhaseTimer = 5500;
                    break;
                case 31:
                    if (m_pInstance)
                        m_pInstance->DoFaceSpeak(FACE_ABEDNEUM, SAY_EVENT_END_03_ABED);
                    m_uiPhaseTimer = 8500;
                    break;
                case 32:
                    DoScriptText(SAY_EVENT_END_04, m_creature);
                    m_uiPhaseTimer = 11500;
                    break;
                case 33:
                    if (m_pInstance)
                        m_pInstance->DoFaceSpeak(FACE_ABEDNEUM, SAY_EVENT_END_05_ABED);
                    m_uiPhaseTimer = 11500;
                    break;
                case 34:
                    DoScriptText(SAY_EVENT_END_06, m_creature);
                    m_uiPhaseTimer = 4500;
                    break;
                case 35:
                    if (m_pInstance)
                        m_pInstance->DoFaceSpeak(FACE_ABEDNEUM, SAY_EVENT_END_07_ABED);
                    m_uiPhaseTimer = 22500;
                    break;
                case 36:
                    DoScriptText(SAY_EVENT_END_08, m_creature);
                    m_uiPhaseTimer = 7500;
                    break;
                case 37:
                    if (m_pInstance)
                        m_pInstance->DoFaceSpeak(FACE_KADDRAK, SAY_EVENT_END_09_KADD);
                    m_uiPhaseTimer = 18500;
                    break;
                case 38:
                    DoScriptText(SAY_EVENT_END_10, m_creature);
                    m_uiPhaseTimer = 5500;
                    break;
                case 39:
                    if (m_pInstance)
                        m_pInstance->DoFaceSpeak(FACE_KADDRAK, SAY_EVENT_END_11_KADD);
                    m_uiPhaseTimer = 20500;
                    break;
                case 40:
                    DoScriptText(SAY_EVENT_END_12, m_creature);
                    m_uiPhaseTimer = 2500;
                    break;
                case 41:
                    if (m_pInstance)
                        m_pInstance->DoFaceSpeak(FACE_KADDRAK, SAY_EVENT_END_13_KADD);
                    m_uiPhaseTimer = 19500;
                    break;
                case 42:
                    DoScriptText(SAY_EVENT_END_14, m_creature);
                    m_uiPhaseTimer = 10500;
                    break;
                case 43:
                    if (m_pInstance)
                        m_pInstance->DoFaceSpeak(FACE_MARNAK, SAY_EVENT_END_15_MARN);
                    m_uiPhaseTimer = 6500;
                    break;
                case 44:
                    DoScriptText(SAY_EVENT_END_16, m_creature);
                    m_uiPhaseTimer = 6500;
                    break;
                case 45:
                    if (m_pInstance)
                        m_pInstance->DoFaceSpeak(FACE_MARNAK, SAY_EVENT_END_17_MARN);
                    m_uiPhaseTimer = 25500;
                    break;
                case 46:
                    DoScriptText(SAY_EVENT_END_18, m_creature);
                    m_uiPhaseTimer = 23500;
                    break;
                case 47:
                    if (m_pInstance)
                        m_pInstance->DoFaceSpeak(FACE_MARNAK, SAY_EVENT_END_19_MARN);
                    m_uiPhaseTimer = 3500;
                    break;
                case 48:
                    DoScriptText(SAY_EVENT_END_20, m_creature);
                    m_uiPhaseTimer = 8500;
                    break;
                case 49:
                    if (m_pInstance)
                        m_pInstance->DoFaceSpeak(FACE_ABEDNEUM, SAY_EVENT_END_21_ABED);
                    m_uiPhaseTimer = 5500;
                    break;
                case 50:
                {
                    if (m_pInstance)
                    {
                        m_pInstance->DoUseDoorOrButton(GO_TRIBUNAL_FLOOR);
                        m_pInstance->SetData(TYPE_TRIBUNAL, DONE);
                    }

                    Player* pPlayer = GetPlayerForEscort();
                    if (pPlayer)
                        pPlayer->GroupEventHappens(QUEST_HALLS_OF_STONE, m_creature);

                    m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
                    m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);

                    m_uiPhaseTimer = 180000;
                    break;
                }
                case 51:
                    SetEscortPaused(false);
                    break;
            }
            ++m_uiStep;
        }
        else if (m_uiPhaseTimer)
            m_uiPhaseTimer -= uiDiff;

        if (!m_bIsLowHP && m_creature->GetHealthPercent() < 30)
        {
            DoScriptText(SAY_LOW_HEALTH, m_creature);
            m_bIsLowHP = true;
        }
        else if (m_bIsLowHP && m_creature->GetHealthPercent() > 30)
            m_bIsLowHP = false;

        // No Combat abilities needed here
        if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
            return;
    }
예제 #10
0
 void DamageTaken(Unit* /*pDealer*/, uint32& uiDamage) override
 {
     // If Brann takes damage, mark the achiev as failed
     if (uiDamage && m_pInstance)
         m_pInstance->SetBrannSpankin(false);
 }
예제 #11
0
 void JustReachedHome() override
 {
     if (m_pInstance)
         m_pInstance->SetData(TYPE_MAIDEN, FAIL);
 }
    void UpdateEscortAI(const uint32 uiDiff)
    {
        if (m_uiPhaseTimer && m_uiPhaseTimer <= uiDiff)
        {
            switch (m_uiStep)
            {
                // Begin Event
                case 0:
                    // TODO, this is wrong, must be "using or similar"
                    m_creature->SetStandState(UNIT_STAND_STATE_KNEEL);
                    m_uiPhaseTimer = 1500;
                    break;
                case 1:
                    DoScriptText(SAY_EVENT_INTRO_2, m_creature);
                    m_uiPhaseTimer = 2500;
                    break;
                case 2:
                    if (m_pInstance)
                        m_pInstance->DoUseDoorOrButton(GO_TRIBUNAL_CONSOLE);
                    m_uiPhaseTimer = 6500;
                    break;
                case 3:
                    if (m_pInstance)
                        m_pInstance->DoFaceSpeak(FACE_ABEDNEUM, SAY_EVENT_INTRO_3_ABED);
                    m_uiPhaseTimer = 8500;
                    break;

                // Activate Kaddrak
                case 4:
                    DoScriptText(SAY_EVENT_A_1, m_creature);
                    m_uiPhaseTimer = 6500;
                    break;
                case 5:
                    if (m_pInstance)
                        m_pInstance->DoFaceSpeak(FACE_KADDRAK, SAY_EVENT_A_2_KADD);
                    m_uiPhaseTimer = 12500;
                    break;
                case 6:
                    DoScriptText(SAY_EVENT_A_3, m_creature);
                    m_uiPhaseTimer = 6000;
                    break;
                case 7:
                    if (m_pInstance)
                        m_pInstance->ActivateFace(FACE_KADDRAK, false);
                    m_uiPhaseTimer = 5000;
                    break;
                case 8:
                    SpawnDwarf(NPC_DARK_RUNE_PROTECTOR);
                    m_uiPhaseTimer = 20000;
                    break;

                // Activate Marnak
                case 9:
                    DoScriptText(SAY_EVENT_B_1, m_creature);
                    m_uiPhaseTimer = 6000;
                    break;
                case 10:
                    if (m_pInstance)
                        m_pInstance->DoFaceSpeak(FACE_MARNAK, SAY_EVENT_B_2_MARN);
                    SpawnDwarf(NPC_DARK_RUNE_PROTECTOR);
                    m_uiPhaseTimer = 20000;
                    break;
                case 11:
                    DoScriptText(SAY_EVENT_B_3, m_creature);
                    m_uiPhaseTimer = 5000;
                    break;
                case 12:
                    if (m_pInstance)
                        m_pInstance->ActivateFace(FACE_MARNAK, false);
                    m_uiPhaseTimer = 10000;
                    break;
                case 13:
                    SpawnDwarf(NPC_DARK_RUNE_PROTECTOR);
                    m_uiPhaseTimer = 10000;
                    break;
                case 14:
                    SpawnDwarf(NPC_DARK_RUNE_STORMCALLER);
                    m_uiPhaseTimer = (20000);
                    break;
                case 15:
                    DoScriptText(SAY_EVENT_C_1, m_creature);
                    SpawnDwarf(NPC_DARK_RUNE_PROTECTOR);
                    m_uiPhaseTimer = 10000;
                    break;
                case 16:
                    SpawnDwarf(NPC_DARK_RUNE_STORMCALLER);
                    m_uiPhaseTimer = 20000;
                    break;

                // Activate Abedneum
                case 17:
                    if (m_pInstance)
                        m_pInstance->DoFaceSpeak(FACE_ABEDNEUM, SAY_EVENT_C_2_ABED);
                    SpawnDwarf(NPC_DARK_RUNE_PROTECTOR);
                    m_uiPhaseTimer = 20000;
                    break;
                case 18:
                    DoScriptText(SAY_EVENT_C_3, m_creature);
                    m_uiPhaseTimer = 5000;
                    break;
                case 19:
                    if (m_pInstance)
                        m_pInstance->ActivateFace(FACE_ABEDNEUM, false);
                    m_uiPhaseTimer = 5000;
                    break;
                case 20:
                    SpawnDwarf(NPC_DARK_RUNE_STORMCALLER);
                    m_uiPhaseTimer = 10000;
                    break;
                case 21:
                    SpawnDwarf(NPC_DARK_RUNE_PROTECTOR);
                    m_uiPhaseTimer = 15000;
                    break;

                case 22:
                    DoScriptText(SAY_EVENT_D_1, m_creature);
                    SpawnDwarf(NPC_IRON_GOLEM_CUSTODIAN);
                    m_uiPhaseTimer = 20000;
                    break;
                case 23:
                    if (m_pInstance)
                        m_pInstance->DoFaceSpeak(FACE_ABEDNEUM, SAY_EVENT_D_2_ABED);
                    SpawnDwarf(NPC_DARK_RUNE_PROTECTOR);
                    m_uiPhaseTimer = 5000;
                    break;
                case 24:
                    SpawnDwarf(NPC_DARK_RUNE_STORMCALLER);
                    m_uiPhaseTimer = 15000;
                    break;
                case 25:
                    DoScriptText(SAY_EVENT_D_3, m_creature);
                    SpawnDwarf(NPC_IRON_GOLEM_CUSTODIAN);
                    m_uiPhaseTimer = 5000;
                    break;
                case 26:
                    SpawnDwarf(NPC_DARK_RUNE_PROTECTOR);
                    m_uiPhaseTimer = 5000;
                    break;
                case 27:
                    SpawnDwarf(NPC_DARK_RUNE_STORMCALLER);
                    m_uiPhaseTimer = 10000;
                    break;
                case 28:
                    if (m_pInstance)
                        m_pInstance->DoFaceSpeak(FACE_ABEDNEUM, SAY_EVENT_D_4_ABED);
                    SpawnDwarf(NPC_DARK_RUNE_PROTECTOR);
                    m_uiPhaseTimer = 10000;
                    break;

                // End Event
                case 29:
                    DoScriptText(SAY_EVENT_END_01, m_creature);
                    m_creature->SetStandState(UNIT_STAND_STATE_STAND);// TODO TODO
                    if (m_pInstance)
                        m_pInstance->SetData(TYPE_TRIBUNAL, SPECIAL); // Kill remaining npcs
                    SetEscortPaused(false);
                    m_uiPhaseTimer = 3000;
                    // break;
                    // case 30:
                    if (m_pInstance)
                        m_pInstance->ActivateFace(FACE_ABEDNEUM, true);
                    m_uiPhaseTimer = 0;
                    break;
                case 30:
                    DoScriptText(SAY_EVENT_END_02, m_creature);
                    m_uiPhaseTimer = 5500;
                    break;
                case 31:
                    if (m_pInstance)
                        m_pInstance->DoFaceSpeak(FACE_ABEDNEUM, SAY_EVENT_END_03_ABED);
                    m_uiPhaseTimer = 8500;
                    break;
                case 32:
                    DoScriptText(SAY_EVENT_END_04, m_creature);
                    m_uiPhaseTimer = 11500;
                    break;
                case 33:
                    if (m_pInstance)
                        m_pInstance->DoFaceSpeak(FACE_ABEDNEUM, SAY_EVENT_END_05_ABED);
                    m_uiPhaseTimer = 11500;
                    break;
                case 34:
                    DoScriptText(SAY_EVENT_END_06, m_creature);
                    m_uiPhaseTimer = 4500;
                    break;
                case 35:
                    if (m_pInstance)
                        m_pInstance->DoFaceSpeak(FACE_ABEDNEUM, SAY_EVENT_END_07_ABED);
                    m_uiPhaseTimer = 22500;
                    break;
                case 36:
                    DoScriptText(SAY_EVENT_END_08, m_creature);
                    m_uiPhaseTimer = 7500;
                    break;
                case 37:
                    if (m_pInstance)
                        m_pInstance->DoFaceSpeak(FACE_KADDRAK, SAY_EVENT_END_09_KADD);
                    m_uiPhaseTimer = 18500;
                    break;
                case 38:
                    DoScriptText(SAY_EVENT_END_10, m_creature);
                    m_uiPhaseTimer = 5500;
                    break;
                case 39:
                    if (m_pInstance)
                        m_pInstance->DoFaceSpeak(FACE_KADDRAK, SAY_EVENT_END_11_KADD);
                    m_uiPhaseTimer = 20500;
                    break;
                case 40:
                    DoScriptText(SAY_EVENT_END_12, m_creature);
                    m_uiPhaseTimer = 2500;
                    break;
                case 41:
                    if (m_pInstance)
                        m_pInstance->DoFaceSpeak(FACE_KADDRAK, SAY_EVENT_END_13_KADD);
                    m_uiPhaseTimer = 19500;
                    break;
                case 42:
                    DoScriptText(SAY_EVENT_END_14, m_creature);
                    m_uiPhaseTimer = 10500;
                    break;
                case 43:
                    if (m_pInstance)
                        m_pInstance->DoFaceSpeak(FACE_MARNAK, SAY_EVENT_END_15_MARN);
                    m_uiPhaseTimer = 6500;
                    break;
                case 44:
                    DoScriptText(SAY_EVENT_END_16, m_creature);
                    m_uiPhaseTimer = 6500;
                    break;
                case 45:
                    if (m_pInstance)
                        m_pInstance->DoFaceSpeak(FACE_MARNAK, SAY_EVENT_END_17_MARN);
                    m_uiPhaseTimer = 25500;
                    break;
                case 46:
                    DoScriptText(SAY_EVENT_END_18, m_creature);
                    m_uiPhaseTimer = 23500;
                    break;
                case 47:
                    if (m_pInstance)
                        m_pInstance->DoFaceSpeak(FACE_MARNAK, SAY_EVENT_END_19_MARN);
                    m_uiPhaseTimer = 3500;
                    break;
                case 48:
                    DoScriptText(SAY_EVENT_END_20, m_creature);
                    m_uiPhaseTimer = 8500;
                    break;
                case 49:
                    if (m_pInstance)
                        m_pInstance->DoFaceSpeak(FACE_ABEDNEUM, SAY_EVENT_END_21_ABED);
                    m_uiPhaseTimer = 5500;
                    break;
                case 50:
                {
                    if (m_pInstance)
                    {
                        m_pInstance->DoUseDoorOrButton(GO_TRIBUNAL_FLOOR);
                        m_pInstance->SetData(TYPE_TRIBUNAL, DONE);
                    }

                    // Should cast spell 59046 (doesn't exist in client dbc), criterias are ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET

                    Player* pPlayer = GetPlayerForEscort();
                    if (pPlayer)
                        pPlayer->GroupEventHappens(QUEST_HALLS_OF_STONE, m_creature);

                    m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
                    m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);

                    m_uiPhaseTimer = 180000;
                    break;
                }
                case 51:
                    SetEscortPaused(false);
                    break;
            }
            ++m_uiStep;
        }
        else if (m_uiPhaseTimer)
            m_uiPhaseTimer -= uiDiff;

        if (!m_bIsLowHP && m_creature->GetHealthPercent() < 30)
        {
            DoScriptText(SAY_LOW_HEALTH, m_creature);
            m_bIsLowHP = true;
        }
        else if (m_bIsLowHP && m_creature->GetHealthPercent() > 30)
            m_bIsLowHP = false;

        // No Combat abilities needed here
        if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
            return;
    }