Ejemplo n.º 1
0
    void CaveDestruction(bool bBool)
    {
        if (GoSummonList.empty())
            return;

        for (std::list<uint64>::const_iterator itr = GoSummonList.begin(); itr != GoSummonList.end(); ++itr)
        {
            if (GameObject* pGo = GameObject::GetGameObject(*me, *itr))
            {
                if (pGo)
                {
                    if (Creature* trigger = pGo->SummonTrigger(pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), 0, 1))
                    {
                        //visual effects are not working! ¬¬
                        trigger->CastSpell(trigger, 11542, true);
                        trigger->CastSpell(trigger, 35470, true);
                    }
                    pGo->RemoveFromWorld();
                    //pGo->CastSpell(me,12158); makes all die?!
                }
            }
        }

        if (bBool)
        {
            if (pInstance)
                if (GameObject* pGo = GameObject::GetGameObject((*me), pInstance->GetData64(DATA_GO_CAVE_IN_RIGHT)))
                    pInstance->HandleGameObject(0, false, pGo);
        }
        else if (pInstance)
            if (GameObject* pGo = GameObject::GetGameObject((*me), pInstance->GetData64(DATA_GO_CAVE_IN_LEFT)))
                pInstance->HandleGameObject(0, false, pGo);
    }
Ejemplo n.º 2
0
    void RestoreAll()
    {
        if (!pInstance)
            return;

        if (GameObject* pGo = GameObject::GetGameObject((*me), pInstance->GetData64(DATA_GO_CAVE_IN_RIGHT)))
            pInstance->HandleGameObject(0, false, pGo);

        if (GameObject* pGo = GameObject::GetGameObject((*me), pInstance->GetData64(DATA_GO_CAVE_IN_LEFT)))
            pInstance->HandleGameObject(0, false, pGo);

        if (!GoSummonList.empty())
            for (std::list<uint64>::const_iterator itr = GoSummonList.begin(); itr != GoSummonList.end(); ++itr)
            {
                if (GameObject* pGo = GameObject::GetGameObject(*me, *itr))
                    pGo->RemoveFromWorld();
            }

        if (!SummonList.empty())
            for (std::list<uint64>::const_iterator itr = SummonList.begin(); itr != SummonList.end(); ++itr)
            {
                if (Creature* pSummon = Unit::GetCreature(*me, *itr))
                {
                    if (pSummon->IsAlive())
                        pSummon->DisappearAndDie();
                    else
                        pSummon->RemoveCorpse();
                }
            }
    }
    void JustDied(Unit* /*killer*/)
    {
        DoScriptText(SAY_DEATH, me);

        if (!pInstance)
            return;

        pInstance->SetData(DATA_SELIN_EVENT, DONE);         // Encounter complete!
        pInstance->HandleGameObject(pInstance->GetData64(DATA_SELIN_ENCOUNTER_DOOR), true);                  // Open the encounter door
        pInstance->HandleGameObject(pInstance->GetData64(DATA_SELIN_DOOR), true);                 // Open the door leading further in
        ShatterRemainingCrystals();
    }
Ejemplo n.º 4
0
    void JustDied(Unit* /*killer*/)
    {
        DoScriptText(SAY_JULIANNE_DEATH02, me);

        if (pInstance)
        {
            pInstance->SetData(TYPE_OPERA, DONE);
            pInstance->HandleGameObject(pInstance->GetData64(DATA_GO_STAGEDOORLEFT), true);
            pInstance->HandleGameObject(pInstance->GetData64(DATA_GO_STAGEDOORRIGHT), true);
            if (GameObject* pSideEntrance = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_GO_SIDE_ENTRANCE_DOOR)))
                pSideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
        }
    }
Ejemplo n.º 5
0
    void JustDied(Unit* /*killer*/)
    {
        DoPlaySoundToSet(me, SOUND_WOLF_DEATH);

        if (pInstance)
        {
            pInstance->SetData(TYPE_OPERA, DONE);
            pInstance->HandleGameObject(pInstance->GetData64(DATA_GO_STAGEDOORLEFT), true);
            pInstance->HandleGameObject(pInstance->GetData64(DATA_GO_STAGEDOORRIGHT), true);

            if (GameObject* pSideEntrance = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_GO_SIDE_ENTRANCE_DOOR)))
                pSideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
        }
    }
Ejemplo n.º 6
0
    void Reset()
    {
        SecondarySpellTimer = 5000;
        NormalCastTimer = 0;
        SuperCastTimer = 35000;
        BerserkTimer = 720000;
        CloseDoorTimer = 15000;

        LastSuperSpell = rand()%3;

        FlameWreathTimer = 0;
        FlameWreathCheckTime = 0;

        CurrentNormalSpell = 0;
        ArcaneCooldown = 0;
        FireCooldown = 0;
        FrostCooldown = 0;

        DrinkInturruptTimer = 10000;

        ElementalsSpawned = false;
        Drinking = false;
        DrinkInturrupted = false;

        if (pInstance)
        {
            // Not in progress
            pInstance->SetData(TYPE_ARAN, NOT_STARTED);
            pInstance->HandleGameObject(pInstance->GetData64(DATA_GO_LIBRARY_DOOR), true);
        }
    }
Ejemplo n.º 7
0
 void WaypointReached(uint32 uiPointId)
 {
     switch (uiPointId)
     {
         case 7:
             if (Creature* pCreature = GetClosestCreatureWithEntry(m_creature, CREATURE_TRIBUNAL_OF_THE_AGES, 100.0f))
             {
                 if (!pCreature->isAlive())
                     pCreature->Respawn();
                 CAST_AI(mob_tribuna_controllerAI, pCreature->AI())->UpdateFacesList();
                 uiControllerGUID = pCreature->GetGUID();
             }
             break;
         case 13:
             DoScriptText(SAY_EVENT_INTRO_1, m_creature);
             SetEscortPaused(true);
             JumpToNextStep(20000);
             break;
         case 17:
             DoScriptText(SAY_EVENT_INTRO_2, m_creature);
             if (pInstance)
                 pInstance->HandleGameObject(pInstance->GetData64(DATA_GO_TRIBUNAL_CONSOLE),true);
             m_creature->SetStandState(UNIT_STAND_STATE_KNEEL);
             SetEscortPaused(true);
             JumpToNextStep(8500);
             break;
         case 18:
             SetEscortPaused(true);
             break;
     }
  }
Ejemplo n.º 8
0
    void Reset()
    {
        // TODO: Timers
        FireballTimer = 0;
        PhoenixTimer = 10000;
        FlameStrikeTimer = 25000;
        CombatPulseTimer = 0;

        PyroblastTimer = 60000;

        GravityLapseTimer = 0;
        GravityLapsePhase = 0;

        FirstGravityLapse = true;
        HasTaunted = false;

        Phase = 0;

        if (pInstance)
        {
            pInstance->SetData(DATA_KAELTHAS_EVENT, NOT_STARTED);
            pInstance->HandleGameObject(pInstance->GetData64(DATA_KAEL_DOOR), true);
           // Open the big encounter door. Close it in Aggro and open it only in JustDied(and here)
           // Small door opened after event are expected to be closed by default
        }
    }
    void EnterCombat(Unit * /*who*/)
    {
        DoScriptText(SAY_AGGRO, me);

        if (pInstance)
            pInstance->HandleGameObject(pInstance->GetData64(DATA_GO_NETHER_DOOR), false); // Open the door leading further in
    }
    void Reset()
    {
        AxesCleanup();
        ClearWeapons();
        InfernalCleanup();
        positions.clear();

        for (uint8 i = 0; i < 5; ++i)
            enfeeble_targets[i] = 0;

        for (uint8 i = 0; i < TOTAL_INFERNAL_POINTS; ++i)
            positions.push_back(&InfernalPoints[i]);

        EnfeebleTimer = 30000;
        EnfeebleResetTimer = 38000;
        ShadowNovaTimer = 35500;
        SWPainTimer = 20000;
        AmplifyDamageTimer = 5000;
        Cleave_Timer = 8000;
        InfernalTimer = 45000;
        InfernalCleanupTimer = 47000;
        AxesTargetSwitchTimer = urand(7500,20000);
        SunderArmorTimer = urand(5000,10000);
        phase = 1;

        if (pInstance)
            pInstance->HandleGameObject(pInstance->GetData64(DATA_GO_NETHER_DOOR), true);
    }
Ejemplo n.º 11
0
    void DoPrepareForPhase()
    {
        if (pInstance)
        {
            m_creature->InterruptNonMeleeSpells(true);
            m_creature->RemoveAurasByType(SPELL_AURA_DUMMY);

            switch (Phase)
            {
                case 2:
                    DoCast(m_creature, SPELL_TARGET_ALPHA);
                    pInstance->SetData(TYPE_WARDEN_1,IN_PROGRESS);
                    pInstance->HandleGameObject(pInstance->GetData64(DATA_SPHERE_SHIELD), false);
                    break;
                case 3:
                    DoCast(m_creature, SPELL_TARGET_BETA);
                    pInstance->SetData(TYPE_WARDEN_2,IN_PROGRESS);
                    break;
                case 5:
                    DoCast(m_creature, SPELL_TARGET_DELTA);
                    pInstance->SetData(TYPE_WARDEN_3,IN_PROGRESS);
                    break;
                case 6:
                    DoCast(m_creature, SPELL_TARGET_GAMMA);
                    pInstance->SetData(TYPE_WARDEN_4,IN_PROGRESS);
                    break;
                case 7:
                    pInstance->SetData(TYPE_WARDEN_5,IN_PROGRESS);
                    break;
            }
            CanSpawn = true;
        }
    }
Ejemplo n.º 12
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;
            }
        }
    }
Ejemplo n.º 13
0
    void EnterCombat(Unit * /*who*/)
    {
        if (!pInstance)
            return;

        pInstance->HandleGameObject(pInstance->GetData64(DATA_KAEL_DOOR), false);
       //Close the encounter door, open it in JustDied/Reset
    }
    void EnterCombat(Unit* /*who*/)
    {
        DoScriptText(SAY_AGGRO, me);

        if (pInstance)
            pInstance->HandleGameObject(pInstance->GetData64(DATA_SELIN_ENCOUNTER_DOOR), false);
            //Close the encounter door, open it in JustDied/Reset
     }
Ejemplo n.º 15
0
 void HandleTerraceDoors(bool open)
 {
     if (pInstance)
     {
         pInstance->HandleGameObject(pInstance->GetData64(DATA_MASTERS_TERRACE_DOOR_1), open);
         pInstance->HandleGameObject(pInstance->GetData64(DATA_MASTERS_TERRACE_DOOR_2), open);
     }
 }
Ejemplo n.º 16
0
 void Reset()
 {
     if (instance)
     {
         // Not in progress
         instance->SetData(TYPE_ARAN, NOT_STARTED);
         instance->HandleGameObject(instance->GetData64(DATA_GO_LIBRARY_DOOR), true);
     }
 }
Ejemplo n.º 17
0
    void JustDied(Unit* Killer)
    {
       if (!pInstance)
           return;

       pInstance->HandleGameObject(pInstance->GetData64(DATA_DOOR4), true);
       pInstance->HandleGameObject(pInstance->GetData64(DATA_DOOR5), true);
       pInstance->SetData(TYPE_BROGGOK_EVENT, DONE);
    }
Ejemplo n.º 18
0
 void JustDied(Unit * /*killer*/)
 {
     if (pInstance)
     {
         pInstance->SetData(DATA_SUPREMUSEVENT, DONE);
         pInstance->HandleGameObject(pInstance->GetData64(DATA_GAMEOBJECT_SUPREMUS_DOORS), true);
     }
     summons.DespawnAll();
 }
Ejemplo n.º 19
0
    void JustDied(Unit* /*Killer*/)
    {
        DoScriptText(SAY_DEATH, me);

        if (pInstance)
        {
            pInstance->SetData(DATA_GRUULEVENT, DONE);
            pInstance->HandleGameObject(pInstance->GetData64(DATA_GRUULDOOR), true);         // Open the encounter door
        }
    }
Ejemplo n.º 20
0
    void JustDied(Unit* /*Killer*/)
    {
        DoScriptText(SAY_DIE, me);

        if (!pInstance)
            return;

        pInstance->SetData(TYPE_NETHEKURSE,DONE);
        pInstance->HandleGameObject(pInstance->GetData64(DATA_NETHEKURSE_DOOR), true);
    }
Ejemplo n.º 21
0
    void EnterCombat(Unit * /*who*/)
    {
        DoScriptText(RAND(SAY_AGGRO_1,SAY_AGGRO_2,SAY_AGGRO_3), me);

        if (!pInstance)
            return;

        pInstance->SetData(TYPE_THE_MAKER_EVENT, IN_PROGRESS);
        pInstance->HandleGameObject(pInstance->GetData64(DATA_DOOR2), false);
    }
Ejemplo n.º 22
0
    void EnterCombat(Unit* /*who*/)
    {
        DoScriptText(RAND(SAY_AGGRO1,SAY_AGGRO2,SAY_AGGRO3), me);

        if (pInstance)
        {
            pInstance->SetData(TYPE_ARAN, IN_PROGRESS);
            pInstance->HandleGameObject(pInstance->GetData64(DATA_GO_LIBRARY_DOOR), false);
        }
    }
Ejemplo n.º 23
0
    void JustDied(Unit* /*victim*/)
    {
        DoScriptText(SAY_DEATH, me);

        if (pInstance)
        {
            pInstance->SetData(TYPE_ARAN, DONE);
            pInstance->HandleGameObject(pInstance->GetData64(DATA_GO_LIBRARY_DOOR), true);
        }
    }
Ejemplo n.º 24
0
    void DamageTaken(Unit *done_by, uint32 &damage)
    {
        if (damage >= me->GetHealth())
        {		
            damage = 0;
            EnterEvadeMode();
			me->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NON_ATTACKABLE);
			me->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NOT_SELECTABLE);
			DoScriptText(SAY_START_8, me);
            me->setFaction(35);
            bDone = true;
            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(),true);		
					if (pInstance)
            pInstance->SetData(BOSS_ARGENT_CHALLENGE_E, DONE);
		}
    }
Ejemplo n.º 25
0
    void JustDied(Unit * /*killer*/)
    {
        DoScriptText(SAY_DEATH, me);

        if (!pInstance)
            return;

        pInstance->HandleGameObject(pInstance->GetData64(DATA_KAEL_DOOR), true);
        // Open the encounter door
    }
    void JustDied(Unit* /*Killer*/)
    {
        DoScriptText(SAY_DIE, me);

        if (!pInstance)
            return;

        pInstance->SetData(TYPE_KELIDAN_THE_BREAKER_EVENT, DONE);
        pInstance->HandleGameObject(pInstance->GetData64(DATA_DOOR1), true);
        pInstance->HandleGameObject(pInstance->GetData64(DATA_DOOR6), true);
    }
Ejemplo n.º 27
0
    void Reset()
    {
        uiKaddrakEncounterTimer = 1500;
        uiMarnakEncounterTimer = 10000;
        uiAbedneumEncounterTimer = 10000;

        bKaddrakActivated = false;
        bMarnakActivated = false;
        bAbedneumActivated = false;

        if (pInstance)
        {
            pInstance->HandleGameObject(pInstance->GetData64(DATA_GO_KADDRAK),false);
            pInstance->HandleGameObject(pInstance->GetData64(DATA_GO_MARNAK),false);
            pInstance->HandleGameObject(pInstance->GetData64(DATA_GO_ABEDNEUM),false);
            pInstance->HandleGameObject(pInstance->GetData64(DATA_GO_SKY_FLOOR),false);
        }
    
        KaddrakGUIDList.clear();
    }
Ejemplo n.º 28
0
    void DoAction(const int32 param)
    {
        switch (param)
        {
            case EVENT_1_CAGE:
                if (pInstance)
                    pInstance->SetData(DATA_BROGGOKEVENT, IN_PROGRESS);
            case EVENT_2_CAGE:
            case EVENT_3_CAGE:
            case EVENT_4_CAGE:
            {
                phase = eEvents(param);
                break;
            }
            default:
                me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
                me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
                me->SetReactState(REACT_AGGRESSIVE);

                DoZoneInCombat();
                pInstance->HandleGameObject(pInstance->GetData64(5), true, NULL);
                return;
        }

        pInstance->HandleGameObject(pInstance->GetData64(phase), true, NULL);
        for (std::map<uint64, uint8>::iterator it = prisoners.begin(); it != prisoners.end(); it++)
        {
            if (it->second == phase)
            {
                if (Creature *pPrisoner = me->GetCreature(it->first))
                {
                    pPrisoner->SetAggroRange(90.0f);
                    pPrisoner->SetReactState(REACT_AGGRESSIVE);

                    pPrisoner->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
                    pPrisoner->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
                    pPrisoner->AI()->DoZoneInCombat();
                }
            }
        }
    }
Ejemplo n.º 29
0
    void StartEncounter()
    {
        if (!pInstance)
            return;

        me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
            if (GameObject* pGO = GameObject::GetGameObject(*me, pInstance->GetData64(DATA_MAIN_GATE1)))
                    pInstance->HandleGameObject(pGO->GetGUID(),false);

        if (pInstance->GetData(BOSS_BLACK_KNIGHT) == NOT_STARTED)
        {
            if (pInstance->GetData(BOSS_ARGENT_CHALLENGE_E) == NOT_STARTED && pInstance->GetData(BOSS_ARGENT_CHALLENGE_P) == NOT_STARTED)
            {
                if (pInstance->GetData(BOSS_GRAND_CHAMPIONS) == NOT_STARTED)
                    me->AI()->SetData(DATA_START,0);

                if (pInstance->GetData(BOSS_GRAND_CHAMPIONS) == DONE)
                    DoStartArgentChampionEncounter();
            }

           if (pInstance->GetData(BOSS_GRAND_CHAMPIONS) == DONE &&
               pInstance->GetData(BOSS_ARGENT_CHALLENGE_E) == DONE ||
               pInstance->GetData(BOSS_ARGENT_CHALLENGE_P) == DONE)
            {
               if (Unit* pBlackKnight = me->SummonCreature(VEHICLE_BLACK_KNIGHT,801.369507, 640.574280, 469.314362, 3.97124,TEMPSUMMON_DEAD_DESPAWN,180000))
			    {
			                uiBlackKnightGUID = pBlackKnight->GetGUID();
							pBlackKnight->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
                            pBlackKnight->SetUInt64Value(UNIT_FIELD_TARGET, me->GetGUID());
                            me->SetUInt64Value(UNIT_FIELD_TARGET, uiBlackKnightGUID);
							if (GameObject* pGO = GameObject::GetGameObject(*me, pInstance->GetData64(DATA_MAIN_GATE)))
                                            pInstance->HandleGameObject(pGO->GetGUID(),false);
		    	}
				me->RemoveFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NON_ATTACKABLE);
				me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
				me->SetReactState(REACT_AGGRESSIVE);
				DoScriptText(SAY_START5, me);
		    }

        }
    }
Ejemplo n.º 30
0
    void EnterCombat(Unit *who)
    {
        DoScriptText(YELL_INTRO1, m_creature);
        DoCast(m_creature, SPELL_BUBBLE_VISUAL);

        if (pInstance)
        {
            pInstance->SetData(TYPE_HARBINGERSKYRISS,IN_PROGRESS);
            pInstance->HandleGameObject(pInstance->GetData64(DATA_SPHERE_SHIELD), false);
            IsRunning = true;
        }
    }