Пример #1
0
    void UpdateAI(const uint32 diff)
    {
                if(!pInstance)
                        return;

                ScriptedAI::UpdateAI(diff);

                UpdateTimer = pInstance->GetData(SPECHIAL_TIMER);

        if(UpdateTimer <= diff)
        {
                        switch(pInstance->GetData(PHASE_SPECHIAL))
                        {
                                case 39:
                                                DoScriptText(SAY_INTRO_LICHTKING_2, me);
                                                pInstance->SetData(PHASE_SPECHIAL, 40);
                                                pInstance->SetData(SPECHIAL_TIMER, 24500);
                                break;

                                case 41:
                                                me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_TALK);
                                                pInstance->SetData(PHASE_SPECHIAL, 42);
                                                pInstance->SetData(SPECHIAL_TIMER, 31500);
                                break;

                                case 42:
                                                me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
                                                DoScriptText(SAY_INTRO_LICHTKING_4, me);
                                                pInstance->SetData(PHASE_SPECHIAL, 43);
                                                pInstance->SetData(SPECHIAL_TIMER, 70000);
                                break;

                                case 43:
                                                me->CastSpell(me,72262,false);
                                                pInstance->SetData(PHASE_SPECHIAL, 44);
                                                pInstance->SetData(SPECHIAL_TIMER, 12000);
                                break;

                                case 44:
                                                pInstance->SetData(PHASE_SPECHIAL, 45);
                                                pInstance->SetData(SPECHIAL_TIMER, 18000);
                                break;

                                case 45:
                                                pInstance->HandleGameObject(pInstance->GetData64(20), true);
                                                pInstance->SetData(PHASE_SPECHIAL, 46);
                                                pInstance->SetData(SPECHIAL_TIMER, 2500);
                                break;

                                case 46:
                                                DoScriptText(SAY_INTRO_LICHTKING_5, me);
                                                me->ForcedDespawn();
                                                pInstance->SetData(PHASE_SPECHIAL, 47);
                                                pInstance->SetData(SPECHIAL_TIMER, 15500);
                                break;
                        }
        }
                else
                {
                        UpdateTimer -= diff;
                        pInstance->SetData(SPECHIAL_TIMER, UpdateTimer);
                }
    }
Пример #2
0
    void StartEvent()
    {
                pInstance = (ScriptedInstance*)me->GetInstanceData();

        if(pInstance && pInstance->GetData(PHASE_1) == NOT_STARTED
                        && pInstance->GetData(PHASE_2) == NOT_STARTED
                        && pInstance->GetData(PHASE_3) == NOT_STARTED
                        && pInstance->GetData(PHASE_4) == NOT_STARTED
                        && pInstance->GetData(PHASE_5) == NOT_STARTED
                        && pInstance->GetData(PHASE_6) == NOT_STARTED
                        && pInstance->GetData(PHASE_7) == NOT_STARTED)
        {
                        pInstance->SetData(PHASE_1, IN_PROGRESS);
                }

        if(pInstance && pInstance->GetData(PHASE_1) == DONE
                        && pInstance->GetData(PHASE_2) == DONE
                        && pInstance->GetData(PHASE_3) == DONE
                        && pInstance->GetData(PHASE_4) == NOT_STARTED
                        && pInstance->GetData(PHASE_5) == NOT_STARTED
                        && pInstance->GetData(PHASE_6) == NOT_STARTED
                        && pInstance->GetData(PHASE_7) == NOT_STARTED)
                {
            pInstance->SetData(PHASE_4, IN_PROGRESS);
        }

        if(pInstance && pInstance->GetData(PHASE_1) == DONE
                        && pInstance->GetData(PHASE_2) == DONE
                        && pInstance->GetData(PHASE_3) == DONE
                        && pInstance->GetData(PHASE_4) == DONE
                        && pInstance->GetData(PHASE_5) == NOT_STARTED
                        && pInstance->GetData(PHASE_6) == NOT_STARTED
                        && pInstance->GetData(PHASE_7) == NOT_STARTED)
        {
                        pInstance->SetData(PHASE_5, IN_PROGRESS);
                        SummonChampions();
        }

        if(pInstance && pInstance->GetData(PHASE_1) == DONE
                        && pInstance->GetData(PHASE_2) == DONE
                        && pInstance->GetData(PHASE_3) == DONE
                        && pInstance->GetData(PHASE_4) == DONE
                        && pInstance->GetData(PHASE_5) == DONE
                        && pInstance->GetData(PHASE_6) == NOT_STARTED
                        && pInstance->GetData(PHASE_7) == NOT_STARTED)
        {
            Fjola = me->SummonCreature(NPC_FJOLA, 565.11, 260.0, 397.09+4, 4.72, TEMPSUMMON_MANUAL_DESPAWN, 0);
                        Fjola->SetFlying(true);
                        Fjola->GetMotionMaster()->MovePoint(0, 579.90f, 172.35f, 394.68f);

            Eydis = me->SummonCreature(NPC_EYDIS, 563.11, 260.0, 397.09+4, 4.72, TEMPSUMMON_MANUAL_DESPAWN, 0);
                        Eydis->SetFlying(true);
                        Eydis->GetMotionMaster()->MovePoint(0, 548.57f, 172.59f, 394.68f);
            pInstance->SetData(PHASE_6, IN_PROGRESS);
        }

        if(pInstance && pInstance->GetData(PHASE_1) == DONE
                        && pInstance->GetData(PHASE_2) == DONE
                        && pInstance->GetData(PHASE_3) == DONE
                        && pInstance->GetData(PHASE_4) == DONE
                        && pInstance->GetData(PHASE_5) == DONE
                        && pInstance->GetData(PHASE_6) == DONE
                        && pInstance->GetData(PHASE_7) == NOT_STARTED)
        {
                        pInstance->SetData(PHASE_7, IN_PROGRESS);
                        pInstance->HandleGameObject(pInstance->GetData64(20), true);
        }
    }