Esempio n. 1
0
            void EndBeamPhase()
            {
                // RemoveBeamAuras
                std::list<Player*> PlayerList;
                GetPlayerListInGrid(PlayerList, me, 200.0f);

                for (auto itr : PlayerList)
                {
                    itr->RemoveAurasDueToSpell(SPELL_BLUE_BEAM);
                    itr->RemoveAurasDueToSpell(SPELL_RED_BEAM);
                }

                // Despawn creatures from phase
                DespawnCreature(RED_EYE);
                DespawnCreature(BLUE_EYE);
                DespawnCreature(YELLOW_EYE);
                DespawnCreature(YELLOW_EYE_MOVER);
                DespawnCreature(BLUE_FOG);
                
                std::list<Creature*> hungryList;
                GetCreatureListWithEntryInGrid(hungryList, me, HUNGRY_EYE, 80.0f); 
                for (auto eye : hungryList)
                    eye->GetAI()->DoAction(ACTION_EYE_DRAIN_LIFE); // find hungry eye to start drain life

                events.ScheduleEvent(EVENT_MAZE_TIME, 75000);
            }
Esempio n. 2
0
            void Maze(bool start)
            {
                me->SetReactState(start ? REACT_PASSIVE : REACT_AGGRESSIVE);
                start ? events.CancelEvent(EVENT_HARD_STARE) : events.ScheduleEvent(EVENT_HARD_STARE, 2000);
                start ? events.CancelEvent(EVENT_GAZE) : events.ScheduleEvent(EVENT_GAZE, 2000);

                if (!start)
                {
                    DespawnCreature(YELLOW_EYE_MOVER);

                    events.CancelEvent(EVENT_MIND_DAGGERS);
                    events.CancelEvent(EVENT_MAZE_ORIENTATION);

                    me->RemoveAurasDueToSpell(SPELL_DESINTEGRATION_BEAM);
                }
                else
                {
                    me->SetOrientation(6.272f);
                    if (Creature * tarMover = me->SummonCreature(YELLOW_EYE_MOVER,YellowEyePositions[0]))
                        me->CastSpell(tarMover,SPELL_DESINTEGRATION_BEAM,true);
                }
            }
    void UpdateAI(uint32 const uiDiff)
    {
        if (m_pInstance && m_pInstance->GetData(TYPE_MARROWGAR) != IN_PROGRESS) // make them despawn after encounter is over or in fail-case
        {
            RemoveImpale();
            DespawnCreature(m_creature);
        }

        m_uiBonedTimer += uiDiff;

        // if we had a passenger, but he died, we remove the "Impaled" aura (death persistant)
        if (!m_Target.IsEmpty())
            if (Unit* summoner = m_creature->GetMap()->GetUnit(m_Target))
                if (!summoner->isAlive())
                {
                    // set achievement failed
                    if (m_pInstance)
                        m_pInstance->SetData(DATA_ACHIEVEMENT_CHECK_MARROWGAR, 1);
                    RemoveImpale();
                }

        if (m_uiBonedTimer >= TIMER_BONED && m_pInstance && m_pInstance->GetData(DATA_ACHIEVEMENT_CHECK_MARROWGAR) == 0) // just set it once
            m_pInstance->SetData(DATA_ACHIEVEMENT_CHECK_MARROWGAR, 1);
    }