コード例 #1
0
    void SetData(uint32 uiType, uint32 uiData)
    {
        switch (uiType)
        {
            case DATA_START:
                if (GameObject* pGO = GameObject::GetGameObject(*me, pInstance->GetData64(DATA_MAIN_GATE)))
                    pInstance->HandleGameObject(pGO->GetGUID(),true);
			    if (GameObject* pGO = GameObject::GetGameObject(*me, pInstance->GetData64(DATA_MAIN_GATE1)))
                    pInstance->HandleGameObject(pGO->GetGUID(),false);	
                DoScriptText(SAY_START, me);			
                DoSummonGrandChampion(uiFirstBoss);
                NextStep(10000,false,1);
                break;
            case DATA_IN_POSITION: //movement done.		
		        me->SetUnitMovementFlags(MOVEMENTFLAG_WALK_MODE);			
                me->GetMotionMaster()->MovePoint(1,735.898, 651.961, 411.93);
				DoScriptText(SAY_START2, me);
                if (GameObject* pGO = GameObject::GetGameObject(*me, pInstance->GetData64(DATA_MAIN_GATE)))
                    pInstance->HandleGameObject(pGO->GetGUID(),false);
                NextStep(20000,false,3);
                break;
            case DATA_LESSER_CHAMPIONS_DEFEATED:
            {
                ++uiLesserChampions;
                std::list<uint64> TempList;
                if (uiLesserChampions == 3 || uiLesserChampions == 6)
                {
                    switch(uiLesserChampions)
                    {
                        case 3:
                            TempList = Champion2List;
                            break;
                        case 6:
                            TempList = Champion3List;
                            break;
                    }

                    for (std::list<uint64>::const_iterator itr = TempList.begin(); itr != TempList.end(); ++itr)
                        if (Creature* pSummon = Unit::GetCreature(*me, *itr))
                            AggroAllPlayers(pSummon);
                }else if (uiLesserChampions == 9)
                    StartGrandChampionsAttack();

                break;
            }
        }
    }
コード例 #2
0
        void SetData(uint32 uiType, uint32 /*uiData*/)
        {
            switch (uiType)
            {
                case DATA_START:
                    DoSummonGrandChampion(uiFirstBoss);
                    NextStep(10000, false, 1);
                    break;
                case DATA_IN_POSITION: //movement done.
                    me->GetMotionMaster()->MovePoint(1, 735.81f, 661.92f, 412.39f);
                    if (GameObject* go = GameObject::GetGameObject(*me, instance->GetData64(DATA_MAIN_GATE)))
                        instance->HandleGameObject(go->GetGUID(), false);
                    NextStep(10000, false, 3);
                    break;
                case DATA_LESSER_CHAMPIONS_DEFEATED:
                {
                    ++uiLesserChampions;
                    std::list<uint64> TempList;
                    if (uiLesserChampions == 3 || uiLesserChampions == 6)
                    {
                        switch (uiLesserChampions)
                        {
                            case 3:
                                TempList = Champion2List;
                                break;
                            case 6:
                                TempList = Champion3List;
                                break;
                        }

                        for (std::list<uint64>::const_iterator itr = TempList.begin(); itr != TempList.end(); ++itr)
                            if (Creature* summon = Unit::GetCreature(*me, *itr))
                                AggroAllPlayers(summon);
                    }else if (uiLesserChampions == 9)
                        StartGrandChampionsAttack();

                    break;
                }
            }
        }
コード例 #3
0
        void SetData(uint32 uiType, uint32 /*uiData*/) override
        {
            switch (uiType)
            {
                case DATA_START:
                    if (GameObject* gate = ObjectAccessor::GetGameObject(*me, instance->GetData64(DATA_MAIN_GATE)))
                        instance->HandleGameObject(gate->GetGUID(),true);
                    if (GameObject* gate = ObjectAccessor::GetGameObject(*me, instance->GetData64(DATA_MAIN_GATE1)))
                        instance->HandleGameObject(gate->GetGUID(),false);
                    DoSummonGrandChampion(uiFirstBoss);
                    events.ScheduleEvent(EVENT_SUMMON_FACTION_2, 10000, 0, PHASE_INPROGRESS);
                    break;
                case DATA_LESSER_CHAMPIONS_DEFEATED:
                {
                    ++uiLesserChampions;
                    std::list<uint64> TempList;
                    if (uiLesserChampions == 3 || uiLesserChampions == 6)
                    {
                        switch(uiLesserChampions)
                        {
                            case 3:
                                TempList = Champion2List;
                                break;
                            case 6:
                                TempList = Champion3List;
                                break;
                        }

                        for(std::list<uint64>::const_iterator itr = TempList.begin(); itr != TempList.end(); ++itr)
                            if (Creature* summon = ObjectAccessor::GetCreature(*me, *itr))
                                AggroAllPlayers(summon);
                    } else if (uiLesserChampions == 9)
                        StartGrandChampionsAttack();
                    break;
                }
            }
        }
コード例 #4
0
        void SetData(uint32 type, uint32 data)
        {
            if (!instance)
                return;

            switch (type)
            {
                case DATA_START:
                    if (GameObject* go = GameObject::GetGameObject(*me, instance->GetData64(DATA_MAIN_GATE)))
                        instance->HandleGameObject(go->GetGUID(), true);
                    if (GameObject* go = GameObject::GetGameObject(*me, instance->GetData64(DATA_PORTCULLIS)))
                        instance->HandleGameObject(go->GetGUID(), false);
                    instance->SetData(DATA_MOVEMENT_DONE, 0);

                    DoScriptText(SAY_START, me);
                    DoSummonGrandChampion(firstBoss);
                    NextStep(10000, false, 1);
                    break;
                case DATA_IN_POSITION: // movement done.
                    me->GetMotionMaster()->MovePoint(1, 735.81f, 661.92f, 412.39f);
                    if (GameObject* go = GameObject::GetGameObject(*me, instance->GetData64(DATA_MAIN_GATE)))
                        instance->HandleGameObject(go->GetGUID(), false);
                    NextStep(10000, false, 3);
                    break;
                case DATA_LESSER_CHAMPIONS_DEFEATED:
                {
                    ++lesserChampions;
                    std::list<uint64> tempList;
                    if (lesserChampions == 3 || lesserChampions == 6)
                    {
                        switch (lesserChampions)
                        {
                            case 3:
                                tempList = Champion2List;
                                break;
                            case 6:
                                tempList = Champion3List;
                                break;
                        }

                        for (std::list<uint64>::const_iterator itr = tempList.begin(); itr != tempList.end(); ++itr)
                            if (Creature* summon = Unit::GetCreature(*me, *itr))
                                AggroAllPlayers(summon);
                    }
                    else if (lesserChampions == 9)
                        StartGrandChampionsAttack();

                    break;
                }
                case DATA_GRAND_CHAMPIONS_DEFEATED:
                    defeatedGrandChampions = data;
                    if (defeatedGrandChampions == 3)
                    {
                        for (uint8 i = 0; i < 3; ++i)
                            if (Creature* GrandChampion = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_GRAND_CHAMPION_1 + i)))
                            {
                                switch (i)
                                {
                                    case 0: GrandChampion->SetHomePosition(739.678f, 662.541f, 412.393f, 4.6f); break;
                                    case 1: GrandChampion->SetHomePosition(746.71f, 661.02f, 411.69f, 4.6f); break;
                                    case 2: GrandChampion->SetHomePosition(754.34f, 660.70f, 412.39f, 4.6f); break;
                                }
                                GrandChampion->AI()->SetData(10, 0);
                            }

                        instance->SetData(BOSS_GRAND_CHAMPIONS, IN_PROGRESS);
                    }
                    break;
            }
        }
コード例 #5
0
        void SetData(uint32 uiType, uint32 uiData)
        {
            switch (uiType)
            {
                case DATA_START:
                    if (GameObject* pGO = GameObject::GetGameObject(*me, pInstance->GetData64(DATA_MAIN_GATE)))
                        pInstance->HandleGameObject(pGO->GetGUID(),true);
			        if (GameObject* pGO = GameObject::GetGameObject(*me, pInstance->GetData64(DATA_MAIN_GATE1)))
                        pInstance->HandleGameObject(pGO->GetGUID(),false);	
                    DoScriptText(SAY_START, me);			
                    DoSummonGrandChampion(uiFirstBoss);
    				
				    NextStep(10000,false,1);
                    break;
                case DATA_IN_POSITION: //movement done.		
		            me->SetUnitMovementFlags(MOVEMENTFLAG_WALKING);			
                    me->GetMotionMaster()->MovePoint(1, 735.898f, 651.961f, 411.93f);
				    DoScriptText(SAY_START2, me);
                    if (GameObject* pGO = GameObject::GetGameObject(*me, pInstance->GetData64(DATA_MAIN_GATE)))
                        pInstance->HandleGameObject(pGO->GetGUID(),false);
                    NextStep(20000,false,3);
                    break;
			    case DATA_RESET:
				    me->GetMotionMaster()->MovePoint(2, 746.626f, 618.54f, 411.09f);
    				
				    uiSummonTimes = 0;
				    uiPosition = 0;
				    uiLesserChampions = 0;

				    uiFirstBoss = 0;
				    uiSecondBoss = 0;
				    uiThirdBoss = 0;

				    uiArgentChampion = 0;

				    uiPhase = 0;
				    uiTimer = 0;

				    uiVehicle1GUID = 0;
				    uiVehicle2GUID = 0;
				    uiVehicle3GUID = 0;

				    Champion1List.clear();
				    Champion2List.clear();
				    Champion3List.clear();
    			
				    me->SetReactState(REACT_PASSIVE);
				    me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
				    me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
				    SetGrandChampionsForEncounter();
				    SetArgentChampion();

				    break;
                case DATA_LESSER_CHAMPIONS_DEFEATED:
                {
                    ++uiLesserChampions;
                    std::list<uint64> TempList;
                    if (uiLesserChampions == 3 || uiLesserChampions == 6)
                    {
                        switch(uiLesserChampions)
                        {
                            case 3:
                                TempList = Champion2List;
                                break;
                            case 6:
                                TempList = Champion3List;
                                break;
                        }

                        for(std::list<uint64>::const_iterator itr = TempList.begin(); itr != TempList.end(); ++itr)
                            if (Creature* pSummon = Unit::GetCreature(*me, *itr))
                                AggroAllPlayers(pSummon);
                    }else if (uiLesserChampions == 9)
                        StartGrandChampionsAttack();

                    break;
                }
            }
        }