コード例 #1
0
        void AddWave()
        {
            DoUpdateWorldState(WORLD_STATE_HOR, 1);
            DoUpdateWorldState(WORLD_STATE_HOR_WAVE_COUNT, WaveCnt);

            switch (WaveCnt)
            {
                case 1:
                case 2:
                case 3:
                case 4:
                    if (Creature * Falric = instance->GetCreature(FalricGUID))
                        SpawnWave(Falric);
                    break;
                case 5:
                    if (Creature * Falric = instance->GetCreature(FalricGUID))
                        Falric->AI()->DoAction(ACTION_ENTER_COMBAT);
                    break;
                case 6:
                case 7:
                case 8:
                case 9:
                    if (Creature * Marwyn  = instance->GetCreature(MarwynGUID))
                        SpawnWave(Marwyn);
                    break;
                case 10:
                    if (Creature * Marwyn = instance->GetCreature(MarwynGUID))
                        Marwyn->AI()->DoAction(ACTION_ENTER_COMBAT);
                    break;
                default:
                    break;
            }
        }
コード例 #2
0
        void AddWave()
        {
            DoUpdateWorldState(WORLD_STATE_HOR, 1);
            DoUpdateWorldState(WORLD_STATE_HOR_WAVE_COUNT, uiWaveCount);
            if (uiWaveCount > 10)    // should not happen, either
                return;
            switch (uiWaveCount)
            {
                case 1:
                case 2:
                case 3:
                case 4:
                    if (Creature* pFalric = instance->GetCreature(uiFalric))
                        SpawnWave(pFalric);
                    events.CancelEvent(EVENT_NEXT_WAVE);
                    events.ScheduleEvent(EVENT_NEXT_WAVE, WAVE_STD_SPAWNCYCLE);
                    break;
                case 5:
                    if (GetData(DATA_FALRIC_EVENT) == DONE)
                    {
                        events.CancelEvent(EVENT_NEXT_WAVE);
                        events.ScheduleEvent(EVENT_NEXT_WAVE, WAVE_STD_SPAWNCYCLE / 3);
                    }
                    else if (Creature* pFalric = instance->GetCreature(uiFalric))
                    {
                        pFalric->SetReactState(REACT_AGGRESSIVE);
                        pFalric->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
                        if (pFalric->AI())
                            pFalric->AI()->DoAction(ACTION_ENTER_COMBAT);
                    }
                    break;
                case 6:
                case 7:
                case 8:
                case 9:
                    if (Creature* pMarwyn  = instance->GetCreature(uiMarwyn))
                        SpawnWave(pMarwyn);
                    events.CancelEvent(EVENT_NEXT_WAVE);
                    events.ScheduleEvent(EVENT_NEXT_WAVE, WAVE_STD_SPAWNCYCLE);
                    break;
                case 10:
                    if (GetData(DATA_MARWYN_EVENT) != DONE) // wave should not be started if DONE. Check anyway to avoid bug exploit!
                        if (Creature* pMarwyn = instance->GetCreature(uiMarwyn))
                        {
                            pMarwyn->SetReactState(REACT_AGGRESSIVE);
                            pMarwyn->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
                            if (pMarwyn->AI())
                                pMarwyn->AI()->DoAction(ACTION_ENTER_COMBAT);
                        }

                        break;
                default:
                    break;
            }
        }
コード例 #3
0
        void AddWave()
        {
            DoUpdateWorldState(WORLD_STATE_HOR, 1);
            DoUpdateWorldState(WORLD_STATE_HOR_WAVE_COUNT, uiWaveCount);

            switch (uiWaveCount)
            {
                case 1:
                    if (Creature* pFalric = instance->GetCreature(uiFalric))
                        SpawnWave(pFalric);
                    break;
                case 2:
                    if (Creature* pFalric = instance->GetCreature(uiFalric))
                        SpawnWave(pFalric);
                    break;
                case 3:
                    if (Creature* pFalric = instance->GetCreature(uiFalric))
                        SpawnWave(pFalric);
                    break;
                case 4:
                    if (Creature* pFalric = instance->GetCreature(uiFalric))
                        SpawnWave(pFalric);
                    break;
                case 5:
                    if (GetData(DATA_FALRIC_EVENT) == DONE)
                        events.ScheduleEvent(EVENT_NEXT_WAVE, 10000);
                    else if (Creature* pFalric = instance->GetCreature(uiFalric))
                        if (pFalric->AI())
                        {
                            pFalric->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_NON_ATTACKABLE);
                            pFalric->AI()->DoAction(ACTION_ENTER_COMBAT);
                        }
                    break;
                case 6:
                    if (Creature* pMarwyn = instance->GetCreature(uiMarwyn))
                        SpawnWave(pMarwyn);
                    break;
                case 7:
                    if (Creature* pMarwyn = instance->GetCreature(uiMarwyn))
                        SpawnWave(pMarwyn);
                    break;
                case 8:
                    if (Creature* pMarwyn = instance->GetCreature(uiMarwyn))
                        SpawnWave(pMarwyn);
                    break;
                case 9:
                    if (Creature* pMarwyn = instance->GetCreature(uiMarwyn))
                        SpawnWave(pMarwyn);
                    break;
                case 10:
                    if (GetData(DATA_MARWYN_EVENT) != DONE) // wave should not have been started if DONE. Check anyway to avoid bug exploit!
                        if (Creature* pMarwyn = instance->GetCreature(uiMarwyn))
                            if (pMarwyn->AI())
                            {
                                pMarwyn->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_NON_ATTACKABLE);
                                pMarwyn->AI()->DoAction(ACTION_ENTER_COMBAT);
                            }
                    break;
            }
        }
コード例 #4
0
        void AddWave()
        {
            DoUpdateWorldState(WORLD_STATE_HOR, 1);
            DoUpdateWorldState(WORLD_STATE_HOR_WAVE_COUNT, WaveCount);

            switch (WaveCount)
            {
                case 1:
                case 2:
                case 3:
                case 4:
                    if (Creature* falric = instance->GetCreature(Falric))
                        SpawnWave(falric);
                    break;
                case 5:
                    if (GetData(DATA_FALRIC_EVENT) == DONE)
                        events.ScheduleEvent(EVENT_NEXT_WAVE, 10000);
                    else if (Creature* falric = instance->GetCreature(Falric))
                        if (falric->AI())
                            falric->AI()->DoAction(ACTION_ENTER_COMBAT);
                    break;
                case 6:
                case 7:
                case 8:
                case 9:
                    if (Creature* marwyn  = instance->GetCreature(Marwyn))
                        SpawnWave(marwyn);
                    break;
                case 10:
                    if (GetData(DATA_MARWYN_EVENT) != DONE) // wave should not have been started if DONE. Check anyway to avoid bug exploit!
                        if (Creature* marwyn = instance->GetCreature(Marwyn))
                            if (marwyn->AI())
                                marwyn->AI()->DoAction(ACTION_ENTER_COMBAT);
                    break;
            }
        }