Exemplo n.º 1
0
    void Reset()
    {
        ShadowBoltTimer = 1000+rand()%5000;
        m_uiMobCount = 0;
DespawnSummons(17902);
DespawnSummons(17903);
    }
Exemplo n.º 2
0
void JustDied(Unit *victim)
{
        uint32 EnemyCount;
        EnemyCount=pInstance->GetData(DATA_TRASH);
        --EnemyCount;
        pInstance->SetData(DATA_TRASH, EnemyCount);

    if(pInstance->GetData(DATA_ANETHERON) != 0)//additional check
       if(pInstance->GetData(DATA_RAIDDAMAGE) < MINRAIDDAMAGE && !m_creature->isWorldBoss() )
          m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);//no loot
       else m_creature->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);//loot
DespawnSummons(17902);
DespawnSummons(17903);
}
Exemplo n.º 3
0
    void Reset()
    {
        if (pInstance)
            pInstance->SetData(DATA_AKILZONEVENT, NOT_STARTED);

        StaticDisruption_Timer = urand(10000,20000); //10 to 20 seconds (bosskillers)
        GustOfWind_Timer = urand(20000,30000); //20 to 30 seconds(bosskillers)
        CallLighting_Timer = urand(10000,20000); //totaly random timer. can't find any info on this
        ElectricalStorm_Timer = 60000; //60 seconds(bosskillers)
        Enrage_Timer = 10*MINUTE*IN_MILLISECONDS; //10 minutes till enrage(bosskillers)
        SummonEagles_Timer = 99999;

        TargetGUID = 0;
        CloudGUID = 0;
        CycloneGUID = 0;
        DespawnSummons();
        for (uint8 i = 0; i < 8; ++i)
            BirdGUIDs[i] = 0;

        StormCount = 0;
        StormSequenceTimer = 0;

        isRaining = false;

        SetWeather(WEATHER_STATE_FINE, 0.0f);
    }
Exemplo n.º 4
0
 void JustDied(Unit* /*killer*/)
 {
     Talk(SAY_DEATH);
     if (instance)
         instance->SetData(DATA_AKILZONEVENT, DONE);
     DespawnSummons();
 }
 void JustDied(Unit* Killer)
 {
     DoScriptText(SAY_DEATH, m_creature);
     
     if (pInstance)
         pInstance->SetData(DATA_AKILZONEVENT, DONE);
     DespawnSummons(MOB_SOARING_EAGLE);
 }
Exemplo n.º 6
0
 void JustDied(Unit* /*Killer*/)
 {
     me->MonsterYell(SAY_ONDEATH,LANG_UNIVERSAL, 0);
     DoPlaySoundToSet(me, SOUND_ONDEATH);
     if (pInstance)
         pInstance->SetData(DATA_AKILZONEVENT, DONE);
     DespawnSummons();
 }
Exemplo n.º 7
0
 void JustDied(Unit* Killer)
 {
     DoYell(SAY_ONDEATH,LANG_UNIVERSAL,NULL);
     DoPlaySoundToSet(m_creature, SOUND_ONDEATH);
     if(pInstance)
         pInstance->SetData(DATA_AKILZONEVENT, DONE);
     DespawnSummons();
 }
Exemplo n.º 8
0
        void Reset() override
        {
            Initialize();

            events.Reset();

            me->SetDisableGravity(true);
            me->SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, 10);
            me->SetFloatValue(UNIT_FIELD_COMBATREACH, 10);

            DespawnSummons(NPC_VAPOR_TRAIL);
            me->setActive(false);

            instance->SetBossState(DATA_FELMYST, NOT_STARTED);
        }
Exemplo n.º 9
0
            void Reset()
            {
                if (instance)
                    instance->SetData(DATA_AKILZONEVENT, NOT_STARTED);

                TargetGUID = 0;
                CloudGUID = 0;
                CycloneGUID = 0;
                DespawnSummons();
                memset(BirdGUIDs, 0, sizeof(BirdGUIDs));

                StormCount = 0;

                isRaining = false;

                SetWeather(WEATHER_STATE_FINE, 0.0f);
            }
Exemplo n.º 10
0
        void Reset()
        {
            phase = PHASE_NONE;

            events.Reset();

            uiFlightCount = 0;

            me->SetDisableGravity(true);
            me->SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, 10);
            me->SetFloatValue(UNIT_FIELD_COMBATREACH, 10);

            DespawnSummons(MOB_VAPOR_TRAIL);
            me->setActive(false);

            if (instance)
                instance->SetData(DATA_FELMYST_EVENT, NOT_STARTED);
        }
Exemplo n.º 11
0
        void Reset()
        {
            phase = PHASE_NONE;

            events.Reset();

            uiFlightCount = 0;

            me->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
            me->SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, 10);
            me->SetFloatValue(UNIT_FIELD_COMBATREACH, 10);

            DespawnSummons(MOB_VAPOR_TRAIL);
            me->setActive(false);

            if (pInstance)
                pInstance->SetData(DATA_FELMYST_EVENT, NOT_STARTED);
        }
Exemplo n.º 12
0
        void Reset()
        {
            Phase = PHASE_NULL;
            Event = EVENT_NULL;
            Timer[EVENT_BERSERK] = 600000;
            FlightCount = 0;

            me->SetDisableGravity(true);
            me->SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, 10);
            me->SetFloatValue(UNIT_FIELD_COMBATREACH, 10);

            DespawnSummons(MOB_VAPOR_TRAIL);
            KillCharmedPlayer();
            me->setActive(false);

            if (pInstance)
                pInstance->SetData(DATA_FELMYST_EVENT, NOT_STARTED);

            me->SetVisible(false);
        }
Exemplo n.º 13
0
        void Reset()
        {
            Phase = PHASE_NULL;
            Event = EVENT_NULL;
            Timer[EVENT_BERSERK] = 600000;
            FlightCount = 0;

            me->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING + MOVEMENTFLAG_ONTRANSPORT);
            me->SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, 10);
            me->SetFloatValue(UNIT_FIELD_COMBATREACH, 10);

            DespawnSummons(MOB_VAPOR_TRAIL);
            KillCharmedPlayer();
            me->setActive(false);

            if(pInstance)
                pInstance->SetData(DATA_FELMYST_EVENT, NOT_STARTED);

            me->SetVisible(false);
        }
Exemplo n.º 14
0
        void HandleFlightSequence()
        {
            switch (uiFlightCount)
            {
            case 0:
                //me->AttackStop();
                me->GetMotionMaster()->Clear(false);
                me->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
                me->StopMoving();
                Talk(YELL_TAKEOFF);
                events.ScheduleEvent(EVENT_FLIGHT_SEQUENCE, 2000);
                break;
            case 1:
                me->GetMotionMaster()->MovePoint(0, me->GetPositionX()+1, me->GetPositionY(), me->GetPositionZ()+10);
                break;
            case 2:
            {
                Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true);
                if (!target)
                    target = Unit::GetUnit(*me, instance ? instance->GetData64(DATA_PLAYER_GUID) : 0);

                if (!target)
                {
                    EnterEvadeMode();
                    return;
                }

                Creature* Vapor = me->SummonCreature(MOB_VAPOR, target->GetPositionX()-5+rand()%10, target->GetPositionY()-5+rand()%10, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 9000);
                if (Vapor)
                {
                    Vapor->AI()->AttackStart(target);
                    me->InterruptNonMeleeSpells(false);
                    DoCast(Vapor, SPELL_VAPOR_CHANNEL, false); // core bug
                    Vapor->CastSpell(Vapor, SPELL_VAPOR_TRIGGER, true);
                }

                events.ScheduleEvent(EVENT_FLIGHT_SEQUENCE, 10000);
                break;
            }
            case 3:
            {
                DespawnSummons(MOB_VAPOR_TRAIL);
                //DoCast(me, SPELL_VAPOR_SELECT); need core support

                Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true);
                if (!target)
                    target = Unit::GetUnit(*me, instance ? instance->GetData64(DATA_PLAYER_GUID) : 0);

                if (!target)
                {
                    EnterEvadeMode();
                    return;
                }

                //target->CastSpell(target, SPELL_VAPOR_SUMMON, true); need core support
                Creature* pVapor = me->SummonCreature(MOB_VAPOR, target->GetPositionX()-5+rand()%10, target->GetPositionY()-5+rand()%10, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 9000);
                if (pVapor)
                {
                    if (pVapor->AI())
                        pVapor->AI()->AttackStart(target);
                    me->InterruptNonMeleeSpells(false);
                    DoCast(pVapor, SPELL_VAPOR_CHANNEL, false); // core bug
                    pVapor->CastSpell(pVapor, SPELL_VAPOR_TRIGGER, true);
                }

                events.ScheduleEvent(EVENT_FLIGHT_SEQUENCE, 10000);
                break;
            }
            case 4:
                DespawnSummons(MOB_VAPOR_TRAIL);
                events.ScheduleEvent(EVENT_FLIGHT_SEQUENCE, 1);
                break;
            case 5:
            {
                Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true);
                if (!target)
                    target = Unit::GetUnit(*me, instance ? instance->GetData64(DATA_PLAYER_GUID) : 0);

                if (!target)
                {
                    EnterEvadeMode();
                    return;
                }

                breathX = target->GetPositionX();
                breathY = target->GetPositionY();
                float x, y, z;
                target->GetContactPoint(me, x, y, z, 70);
                me->GetMotionMaster()->MovePoint(0, x, y, z+10);
                break;
            }
            case 6:
                me->SetOrientation(me->GetAngle(breathX, breathY));
                me->StopMoving();
                //DoTextEmote("takes a deep breath.", NULL);
                events.ScheduleEvent(EVENT_FLIGHT_SEQUENCE, 10000);
                break;
            case 7:
            {
                DoCast(me, SPELL_FOG_BREATH, true);
                float x, y, z;
                me->GetPosition(x, y, z);
                x = 2 * breathX - x;
                y = 2 * breathY - y;
                me->GetMotionMaster()->MovePoint(0, x, y, z);
                events.ScheduleEvent(EVENT_SUMMON_FOG, 1);
                break;
            }
            case 8:
                me->CastStop(SPELL_FOG_BREATH);
                me->RemoveAurasDueToSpell(SPELL_FOG_BREATH);
                ++uiBreathCount;
                events.ScheduleEvent(EVENT_FLIGHT_SEQUENCE, 1);
                if (uiBreathCount < 3)
                    uiFlightCount = 4;
                break;
            case 9:
                if (Unit* target = SelectTarget(SELECT_TARGET_TOPAGGRO))
                    DoStartMovement(target);
                else
                {
                    EnterEvadeMode();
                    return;
                }
                break;
            case 10:
                me->SetDisableGravity(false);
                me->HandleEmoteCommand(EMOTE_ONESHOT_LAND);
                EnterPhase(PHASE_GROUND);
                AttackStart(SelectTarget(SELECT_TARGET_TOPAGGRO));
                break;
            }
            ++uiFlightCount;
        }
Exemplo n.º 15
0
        void HandleFlightSequence()
        {
            switch (FlightCount)
            {
                case 0:
                    sLog->outError(LOG_FILTER_TSCR, "prevent fly phase");
                    me->GetMotionMaster()->Clear(false);
                    me->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
                    me->SetUnitMovementFlags(MOVEMENTFLAG_DISABLE_GRAVITY + MOVEMENTFLAG_ONTRANSPORT);
                    me->StopMoving();
                    Talk(YELL_TAKEOFF);
                    Timer[EVENT_FLIGHT_SEQUENCE] = 2000;
                    break;
                case 1:
                    sLog->outError(LOG_FILTER_TSCR, "Move to Fly point");
                    me->GetMotionMaster()->MovePoint(0, me->GetPositionX()+1, me->GetPositionY(), me->GetPositionZ()+10);
                    Timer[EVENT_FLIGHT_SEQUENCE] = 0;
                    break;
                case 2:
                {
                    sLog->outError(LOG_FILTER_TSCR, "Summon Vapor case 2");
                    Unit* target;
                    target = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true);
                    if (!target) target = Unit::GetUnit((*me), pInstance->GetData64(DATA_PLAYER_GUID));
                    if (target)
                    {
                        Creature* Vapor = me->SummonCreature(MOB_VAPOR, target->GetPositionX()-5+rand()%10, target->GetPositionY()-5+rand()%10, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 9000);
                        if (Vapor)
                        {
                            Vapor->AI()->AttackStart(target);
                            me->InterruptNonMeleeSpells(false);
                            me->CastSpell(Vapor, SPELL_VAPOR_CHANNEL, false); // core bug
                            Vapor->CastSpell(Vapor, SPELL_VAPOR_TRIGGER, true);
                        }
                    }
                    else
                        Timer[EVENT_FLIGHT_SEQUENCE] = 10000;
                    break;
                }
                case 3:
                {
                    DespawnSummons(MOB_VAPOR_TRAIL);
                    sLog->outError(LOG_FILTER_TSCR, "Summon Vapor case3");
                    Unit* target;
                    target = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true);
                    if (!target) target = Unit::GetUnit((*me), pInstance->GetData64(DATA_PLAYER_GUID));
                    if (target)
                    {
                        Creature* Vapor = me->SummonCreature(MOB_VAPOR, target->GetPositionX()-5+rand()%10, target->GetPositionY()-5+rand()%10, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 9000);
                        if (Vapor)
                        {
                            Vapor->AI()->AttackStart(target);
                            me->InterruptNonMeleeSpells(false);
                            me->CastSpell(Vapor, SPELL_VAPOR_CHANNEL, false); // core bug
                            Vapor->CastSpell(Vapor, SPELL_VAPOR_TRIGGER, true);
                        }
                    }
                    else
                        Timer[EVENT_FLIGHT_SEQUENCE] = 10000;
                    break;
                }
                case 4:
                    DespawnSummons(MOB_VAPOR_TRAIL);
                    Timer[EVENT_FLIGHT_SEQUENCE] = 1;
                    break;
                case 5:
                {
                    float x, y, z;
                    GetRandFlyPos(x,y,z);
                    me->GetMotionMaster()->MovePoint(0, x,y,z);
                    Timer[EVENT_FLIGHT_SEQUENCE] = 0;
                    break;
                }
                case 6:
                    me->SetOrientation(me->GetAngle(me->GetPositionX(), MIDDLE_Y));
                    me->StopMoving();
                    Timer[EVENT_FLIGHT_SEQUENCE] = 10000;
                    break;
                case 7:
                    me->CastSpell(me, SPELL_FOG_BREATH, true);
                    {
                        float x, y, z;
                        GetNextFlyPos(x,y,z);
                        me->GetMotionMaster()->MovePoint(5, x, y, z);
                    }
                    Timer[EVENT_SUMMON_FOG] = 1;
                    Timer[EVENT_FLIGHT_SEQUENCE] = 0;
                    break;
                case 8:
                    me->RemoveAurasDueToSpell(SPELL_FOG_BREATH);
                    BreathCount++;
                    Timer[EVENT_SUMMON_FOG] = 0;
                    Timer[EVENT_FLIGHT_SEQUENCE] = 1;
                    if (BreathCount < 3) FlightCount = 5;
                    break;
                case 9:
                    if (Unit* target = SelectTarget(SELECT_TARGET_TOPAGGRO, 0))
                    {
                        float x, y, z;
                        target->GetContactPoint(me, x, y, z);
                        me->GetMotionMaster()->MovePoint(0, x, y, z);
                    }
                    else
                    {
                        float x,y,z;

                        x = 1435;
                        y = MIDDLE_Y;
                        z = 0;
                        me->UpdateGroundPositionZ(x, y, z);
                        me->GetMotionMaster()->MovePoint(0, x, y, z);
                    }
                    Timer[EVENT_FLIGHT_SEQUENCE] = 0;
                    break;
                case 10:
                    me->SetDisableGravity(true);
                    me->HandleEmoteCommand(EMOTE_ONESHOT_LAND);
                    EnterPhase(PHASE_GROUND);
                    DoStartMovement(SelectTarget(SELECT_TARGET_TOPAGGRO, 0));
                    break;
                default:
                    break;
            }
            FlightCount++;
        }
Exemplo n.º 16
0
 void JustDied(Unit* killer)
 {
     if (killer)
         me->MonsterSay(SAY_DEATH,LANG_UNIVERSAL, NULL);
     DespawnSummons();
 }
Exemplo n.º 17
0
 void HandleFlightSequence()
 {
     switch(FlightCount)
     {
     case 0:
         m_creature->AttackStop();
         m_creature->GetMotionMaster()->Clear(false);
         m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
         m_creature->AddMonsterMoveFlag(MONSTER_MOVE_LEVITATING);
         m_creature->StopMoving();
         DoYell(YELL_TAKEOFF, LANG_UNIVERSAL, NULL);
         DoPlaySoundToSet(m_creature, SOUND_TAKEOFF);
         Timer[EVENT_FLIGHT_SEQUENCE] = 2000;
         break;
     case 1:
         m_creature->GetMotionMaster()->MovePoint(0, m_creature->GetPositionX()+1, m_creature->GetPositionY(), m_creature->GetPositionZ()+10);
         Timer[EVENT_FLIGHT_SEQUENCE] = 0;
         break;
     case 2:
         if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
         {
             Creature* Vapor = m_creature->SummonCreature(MOB_VAPOR, target->GetPositionX()-5+rand()%10, target->GetPositionY()-5+rand()%10, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 9000);
             if(Vapor)
             {
                 Vapor->AI()->AttackStart(target);
                 m_creature->InterruptNonMeleeSpells(false);
                 m_creature->CastSpell(Vapor, SPELL_VAPOR_CHANNEL, false); // core bug
                 Vapor->CastSpell(Vapor, SPELL_VAPOR_TRIGGER, true);
             }
         }else EnterEvadeMode();
         Timer[EVENT_FLIGHT_SEQUENCE] = 10000;
         break;
     case 3:
         DespawnSummons(MOB_VAPOR_TRAIL);
         //m_creature->CastSpell(m_creature, SPELL_VAPOR_SELECT); need core support
         if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
         {
             //target->CastSpell(target, SPELL_VAPOR_SUMMON, true); need core support
             Creature* Vapor = m_creature->SummonCreature(MOB_VAPOR, target->GetPositionX()-5+rand()%10, target->GetPositionY()-5+rand()%10, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 9000);
             if(Vapor)
             {
                 Vapor->AI()->AttackStart(target);
                 m_creature->InterruptNonMeleeSpells(false);
                 m_creature->CastSpell(Vapor, SPELL_VAPOR_CHANNEL, false); // core bug
                 Vapor->CastSpell(Vapor, SPELL_VAPOR_TRIGGER, true);
             }
         }else EnterEvadeMode();
         Timer[EVENT_FLIGHT_SEQUENCE] = 10000;
         break;
     case 4:
         DespawnSummons(MOB_VAPOR_TRAIL);
         Timer[EVENT_FLIGHT_SEQUENCE] = 1;
         break;
     case 5:
         if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
         {
             BreathX = target->GetPositionX();
             BreathY = target->GetPositionY();
             float x, y, z;
             target->GetContactPoint(m_creature, x, y, z, 70);
             m_creature->GetMotionMaster()->MovePoint(0, x, y, z+10);
         }else EnterEvadeMode();
         Timer[EVENT_FLIGHT_SEQUENCE] = 0;
         break;
     case 6:
         m_creature->SetOrientation(m_creature->GetAngle(BreathX, BreathY));
         m_creature->StopMoving();
         DoTextEmote("takes a deep breath.", NULL);
         Timer[EVENT_FLIGHT_SEQUENCE] = 10000;
         break;
     case 7:
         m_creature->CastSpell(m_creature, SPELL_FOG_BREATH, true);
         {
             float x, y, z;
             m_creature->GetPosition(x, y, z);
             x = 2 * BreathX - x;
             y = 2 * BreathY - y;
             m_creature->GetMotionMaster()->MovePoint(0, x, y, z);
         }
         Timer[EVENT_SUMMON_FOG] = 1;
         Timer[EVENT_FLIGHT_SEQUENCE] = 0;
         break;
     case 8:
         m_creature->RemoveAurasDueToSpell(SPELL_FOG_BREATH);
         BreathCount++;
         Timer[EVENT_SUMMON_FOG] = 0;
         Timer[EVENT_FLIGHT_SEQUENCE] = 1;
         if(BreathCount < 3) FlightCount = 4;
         break;
     case 9:
         if(Unit* target = SelectUnit(SELECT_TARGET_TOPAGGRO, 0))
         {
             float x, y, z;
             target->GetContactPoint(m_creature, x, y, z);
             m_creature->GetMotionMaster()->MovePoint(0, x, y, z);
         }else EnterEvadeMode();
         Timer[EVENT_FLIGHT_SEQUENCE] = 0;
         break;
     case 10:
         m_creature->RemoveMonsterMoveFlag(MONSTER_MOVE_LEVITATING);
         m_creature->StopMoving();
         m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LAND);
         EnterPhase(PHASE_GROUND);
         m_creature->AI()->AttackStart(SelectUnit(SELECT_TARGET_TOPAGGRO, 0));
         break;
     default:
         break;
     }
     FlightCount++;
 }
Exemplo n.º 18
0
 void HandleFlightSequence()
 {
     switch(FlightCount)
     {
     case 0:
         //m_creature->AttackStop();
         error_log("prevent fly phase");
         m_creature->GetMotionMaster()->Clear(false);
         m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
         m_creature->SetUnitMovementFlags(MOVEMENTFLAG_LEVITATING);
         m_creature->StopMoving();
         DoScriptText(YELL_TAKEOFF, m_creature);
         Timer[EVENT_FLIGHT_SEQUENCE] = 2000;
         break;
     case 1:
         error_log("Move to Fly point");
         m_creature->GetMotionMaster()->MovePoint(0, m_creature->GetPositionX()+1, m_creature->GetPositionY(), m_creature->GetPositionZ()+10);
         Timer[EVENT_FLIGHT_SEQUENCE] = 0;
         break;
     case 2:{
         error_log("Summon Vapor case 2");
         Unit* target;
         target = SelectUnit(SELECT_TARGET_RANDOM, 0, 150, true);
         if(!target) target = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_PLAYER_GUID));
         if(target)
         {
             Creature* Vapor = m_creature->SummonCreature(MOB_VAPOR, target->GetPositionX()-5+rand()%10, target->GetPositionY()-5+rand()%10, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 9000);
             if(Vapor)
             {
                 Vapor->AI()->AttackStart(target);
                 m_creature->InterruptNonMeleeSpells(false);
                 m_creature->CastSpell(Vapor, SPELL_VAPOR_CHANNEL, false); // core bug
                 Vapor->CastSpell(Vapor, SPELL_VAPOR_TRIGGER, true);
             }
         }
         else
         {
             EnterEvadeMode();
             return;
         }
         Timer[EVENT_FLIGHT_SEQUENCE] = 10000;
         break;}
     case 3: {
         DespawnSummons(MOB_VAPOR_TRAIL);
         error_log("Summon Vapor case3");
         //m_creature->CastSpell(m_creature, SPELL_VAPOR_SELECT); need core support
         Unit* target;
         target = SelectUnit(SELECT_TARGET_RANDOM, 0, 150, true);
         if(!target) target = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_PLAYER_GUID));
         if(target)
         {
             //target->CastSpell(target, SPELL_VAPOR_SUMMON, true); need core support
             Creature* Vapor = m_creature->SummonCreature(MOB_VAPOR, target->GetPositionX()-5+rand()%10, target->GetPositionY()-5+rand()%10, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 9000);
             if(Vapor)
             {
                 Vapor->AI()->AttackStart(target);
                 m_creature->InterruptNonMeleeSpells(false);
                 m_creature->CastSpell(Vapor, SPELL_VAPOR_CHANNEL, false); // core bug
                 Vapor->CastSpell(Vapor, SPELL_VAPOR_TRIGGER, true);
             }
         }
         else
         {
             EnterEvadeMode();
             return;
         }
         Timer[EVENT_FLIGHT_SEQUENCE] = 10000;
         break;}
     case 4:
         DespawnSummons(MOB_VAPOR_TRAIL);
         Timer[EVENT_FLIGHT_SEQUENCE] = 1;
         break;
     case 5:{
         Unit* target;
         target = SelectUnit(SELECT_TARGET_RANDOM, 0, 150, true);
         if(!target) target = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_PLAYER_GUID));
         if(target)
         {
             BreathX = target->GetPositionX();
             BreathY = target->GetPositionY();
             float x, y, z;
             target->GetContactPoint(m_creature, x, y, z, 70);
             m_creature->GetMotionMaster()->MovePoint(0, x, y, z+10);
         }else
         {
             EnterEvadeMode();
             return;
         }
         Timer[EVENT_FLIGHT_SEQUENCE] = 0;
         break;}
     case 6:
         m_creature->SetOrientation(m_creature->GetAngle(BreathX, BreathY));
         m_creature->StopMoving();
         //DoTextEmote("takes a deep breath.", NULL);
         Timer[EVENT_FLIGHT_SEQUENCE] = 10000;
         break;
     case 7:
         m_creature->CastSpell(m_creature, SPELL_FOG_BREATH, true);
         {
             float x, y, z;
             m_creature->GetPosition(x, y, z);
             x = 2 * BreathX - x;
             y = 2 * BreathY - y;
             m_creature->GetMotionMaster()->MovePoint(0, x, y, z);
         }
         Timer[EVENT_SUMMON_FOG] = 1;
         Timer[EVENT_FLIGHT_SEQUENCE] = 0;
         break;
     case 8:
         m_creature->RemoveAurasDueToSpell(SPELL_FOG_BREATH);
         BreathCount++;
         Timer[EVENT_SUMMON_FOG] = 0;
         Timer[EVENT_FLIGHT_SEQUENCE] = 1;
         if(BreathCount < 3) FlightCount = 4;
         break;
     case 9:
         if(Unit* target = SelectUnit(SELECT_TARGET_TOPAGGRO, 0))
         {
             float x, y, z;
             target->GetContactPoint(m_creature, x, y, z);
             m_creature->GetMotionMaster()->MovePoint(0, x, y, z);
         }
         else
         {
             EnterEvadeMode();
             return;
         }
         Timer[EVENT_FLIGHT_SEQUENCE] = 0;
         break;
     case 10:
         m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
         m_creature->StopMoving();
         m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LAND);
         EnterPhase(PHASE_GROUND);
         m_creature->AI()->AttackStart(SelectUnit(SELECT_TARGET_TOPAGGRO, 0));
         break;
     default:
         break;
     }
     FlightCount++;
 }