void Update(uint32 diff)
        {
            if (m_auiEncounter[1] != IN_PROGRESS)
                return;

            //add delay timer?
            if (!CanProgressEvent())
            {
                Clear();
                return;
            }

            if (NextPortal_Timer)
            {
                if (NextPortal_Timer <= diff)
                {
                    ++mRiftPortalCount;

                    DoUpdateWorldState(WORLD_STATE_BM_RIFT, mRiftPortalCount);

                    DoSpawnPortal();
                    NextPortal_Timer = RiftWaves[GetRiftWaveId()].NextPortalTime;
                } else NextPortal_Timer -= diff;
            }
        }
        void Update(uint32 diff) override
        {
            if (m_auiEncounter[1] != IN_PROGRESS)
                return;

            //add delay timer?
            if (!CanProgressEvent())
            {
                Clear();
                return;
            }

            Events.Update(diff);

            if (Events.ExecuteEvent() == EVENT_NEXT_PORTAL)
            {
                ++mRiftPortalCount;
                DoUpdateWorldState(WORLD_STATE_BM_RIFT, mRiftPortalCount);
                DoSpawnPortal();
                ScheduleEventNextPortal(RiftWaves[GetRiftWaveId()].NextPortalTime);
            }
        }
Beispiel #3
0
 void ReceiveAIEvent(AIEventType eventType, Creature *pSender, Unit *pInvoker, uint32 data) override
 {
     if (eventType == AI_EVENT_CUSTOM_A && pSender == m_creature)
         CanProgressEvent(pInvoker->ToPlayer());
 }