Example #1
0
        void EnterEvadeMode()
        {
            // Remove all auras from the Legs and unset them in combat.
            for (uint8 i = 0; i <= 3; ++i)
                if (Unit* Leg = vehicle->GetPassenger(i))
                {
                    Leg->RemoveAllAuras();
                    Leg->DeleteThreatList();
                    Leg->CombatStop(false);

                    if (instance)
                        instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, Leg); // Remove
                }

            DespawnCreatures(NPC_PHEROMONE_TRAIL);
            me->RemoveAllAuras();
            Reset();
            me->DeleteThreatList();
            me->CombatStop(false);
            me->GetMotionMaster()->MoveTargetedHome();

            if (instance)
            {
                instance->SetData(DATA_GARALON, FAIL);
                instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me); // Remove
                instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_PHEROMONES_AURA); // Remove Pheromones.
            }

            _EnterEvadeMode();
        }
Example #2
0
        void EnterCombat(Unit* /*who*/)
        {
            for (uint8 i = 0; i <= 3; ++i)
                if (Unit* Leg = vehicle->GetPassenger(i))
                {
                    Leg->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
                    Leg->ClearUnitState(UNIT_STATE_ONVEHICLE);
                    Leg->ToCreature()->SetInCombatWithZone();

                    if (instance)
                        instance->SendEncounterUnit(ENCOUNTER_FRAME_ENGAGE, Leg); // Add
                }

            me->AddAura(SPELL_CRUSH_BODY_VIS, me); // And add the body crush marker.

            events.ScheduleEvent(EVENT_FURIOUS_SWIPE, urand(8000, 11000));
            events.ScheduleEvent(EVENT_PHEROMONES, urand(2000, 3000));
            events.ScheduleEvent(EVENT_CRUSH, 30000); // First Crush always seems to have this timer, on any difficulty.
            events.ScheduleEvent(EVENT_GARALON_BERSERK, 7 * MINUTE * IN_MILLISECONDS); // 7 min enrage timer.

            if (instance)
            {
                instance->SetData(DATA_GARALON, IN_PROGRESS);
                instance->SendEncounterUnit(ENCOUNTER_FRAME_ENGAGE, me); // Add
            }

            _EnterCombat();
        }
            void JustDied(Unit* /*killer*/)
            {
                if (Creature* jindo = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_JINDO)))
                    jindo->AI()->DoAction(ACTION_CHAIN_DIED);

                instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me);
            }
        void EnterCombat(Unit* /*who*/)
        {
            Talk(SAY_AGGRO);

            // Not tauntable.
            me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true);
            me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_ATTACK_ME, true);

            if (instance)
            {
                instance->SetBossState(DATA_SHANNOX, IN_PROGRESS);
                instance->SendEncounterUnit(ENCOUNTER_FRAME_ENGAGE, me); // Add
            }

            events.ScheduleEvent(EVENT_SUMMON_IMMOLATION_TRAP, 10000);
            events.ScheduleEvent(EVENT_ARCING_SLASH, 12000);
            events.ScheduleEvent(EVENT_HURL_SPEAR_OR_MAGMA_RUPTURE, 20000);
            events.ScheduleEvent(EVENT_SUMMON_CRYSTAL_PRISON, 25000);
            events.ScheduleEvent(EVENT_BERSERK, 10 * MINUTE * IN_MILLISECONDS);

            // Sets the current Position as Home Position prevents that Shannox is running through the Instance
            me->SetHomePosition(me->GetPositionX(),me->GetPositionY(),me->GetPositionZ(),me->GetOrientation());

            uiPhase = PHASE_SHANNOX_HAS_SPEER;

            _EnterCombat();
        }
        void JustDied(Unit* /*killer*/)
        {
            if (instance)
            {
                instance->SetBossState(DATA_MAGMAW, DONE);
                instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me); // Remove
            }

            if (Unit* head = vehicle->GetPassenger(0)) 
                head->ToCreature()->DisappearAndDie();

            if (sTar)
            {
                //sTarget->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
                if (Unit* hTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
                    sTarget->JumpTo(hTarget,10);
            }

            if(me->GetMap()->IsHeroic())
            {
                if (Creature* nefarian = me->FindNearestCreature(NPC_NEFARIAN_HELPER_HEROIC, 150.0f, true))
                {
                    nefarian->AI()->Talk(RAND(NEF_H_MAG_DEATH, NEF_H_MAG_DEATH_2));
                    nefarian->DespawnOrUnsummon(8000);
                }
            }

            summons.DespawnAll();
            _JustDied();
        }
 void JustDied(Unit* /*killer*/)
 {
     _JustDied();
     Talk(SAY_DEATH);
     instance->SetData(DATA_EARTHRAGER_PTAH, DONE);
     instance->SendEncounterUnit(ENCOUNTER_FRAME_REMOVE, me);
 }
Example #7
0
        void JustDied(Unit* /*killer*/)
        {
            if(!IsHeroic())
                Talk(SAY_DEATH);
            else
                Talk(SAY_DEATH_H);
            removeCorruption();
            summons.DespawnAll();

            if (instance)
            {
                instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_CORRUPTION_SICKNESS);
                instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_CORRUPTION_ABSOLUTE);
                instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_CORRUPTION_ABSOLUTE_TRIGGERED);
                instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_CORRUPTION_MALFORMATION);
                instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_CORRUPTION_MALFORMATION_TRIGGERED);
                instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_CORRUPTION_SICKNESS_TRIGGERED);
                instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_RIDE_VEHICLE_HARDCODED);

                instance->SetBossState(DATA_CHOGALL, DONE);
                instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me); // Remove
            }

            if(Creature* trigger = me->FindNearestCreature(NPC_CHOGALL_COG_TRIGGER, 200.0f, true))
                trigger->DisappearAndDie();

            if (me->GetMap()->IsHeroic())
                if (GameObject* sinestraDoor = me->FindNearestGameObject(GO_CHOGALL_FLOOR, 200.0f))
                    sinestraDoor->SetGoState(GO_STATE_ACTIVE);

            _JustDied();
        }
 void JustDied(Unit* /*killer*/)
 {
     summons.clear();
     i = 0;
     Talk(SAY_DEATH);
     m_pInstance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me); // Remove
 }
Example #9
0
        void JustDied(Unit* attacker)
        {
            Talk(TALK_DEATH);
            _JustDied();

            pInstance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me);
            pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_NULLIFICATION_BARRIER_PLAYERS);
            pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_INVERSION);

            if (GameObject* inversionGob = pInstance->instance->GetGameObject(pInstance->GetData64(GOB_INVERSION)))
                inversionGob->Delete();

            if (GameObject* cancelGob = pInstance->instance->GetGameObject(pInstance->GetData64(GOB_CANCEL)))
                cancelGob->Delete();

            if (Creature* lorewalkerCho = GetClosestCreatureWithEntry(me, 61348, 100.0f, true))
            {
                if (lorewalkerCho->AI())
                {
                    if (lorewalkerCho->GetPositionX() >= 3994.0f && lorewalkerCho->GetPositionX() <= 3996.0f &&
                            lorewalkerCho->GetPositionY() >= 1339.0f && lorewalkerCho->GetPositionY() <= 1341.0f &&
                            lorewalkerCho->GetPositionZ() >= 460.0f && lorewalkerCho->GetPositionZ() <= 463.0f)
                    {
                        lorewalkerCho->AI()->Talk(9);
                        lorewalkerCho->AI()->DoAction(ACTION_CONTINUE_ESCORT);
                    }
                }
            }
        }
Example #10
0
        void EnterCombat(Unit* attacker)
        {
            if (pInstance)
            {
                pInstance->SendEncounterUnit(ENCOUNTER_FRAME_ENGAGE, me);
                DoZoneInCombat();
            }

            DespawnCreaturesInArea(CREATURE_LESSER_SHA_PUDDLE, me);
            DespawnCreaturesInArea(CREATURE_CONTAMINATED_PUDDLE, me);
            DespawnCreaturesInArea(342652, me);

            me->SetPower(POWER_ENERGY, 100);
            me->SetInt32Value(UNIT_FIELD_POWER1, 100);
            me->SetMaxPower(POWER_ENERGY, 100);
            me->SetInt32Value(UNIT_FIELD_MAXPOWER1, 100);

            me->CastSpell(me, SPELL_SEEPING_SHA_CIRCLE);
            me->CastSpell(me, SPELL_SEEPING_SHA_VISUAL);

            if (me->GetMap()->IsHeroic())
            {
                me->AddAura(143574, me);

                if (AuraPtr aura = me->GetAura(143574))
                {
                    aura->SetStackAmount(100);
                }
            }

            // 1st phase
            events.ScheduleEvent(EVENT_SHA_BOLT, 8000, GROUP_TEARS_OF_THE_VALE);
            events.ScheduleEvent(EVENT_SWIRL, 20000, GROUP_TEARS_OF_THE_VALE);
            events.ScheduleEvent(EVENT_CORRSIVE_BLAST, urand(12000, 14000), GROUP_TEARS_OF_THE_VALE);
        }
Example #11
0
            void JustReachedHome()
            {
                _JustReachedHome();
                if (pInstance)
                    pInstance->SetBossState(DATA_STONE_GUARD, FAIL);
                me->RemoveAurasDueToSpell(SPELL_AMETHYST_PETRIFICATION);
                me->RemoveAurasDueToSpell(SPELL_JADE_PETRIFICATION);
                me->RemoveAurasDueToSpell(SPELL_COBALT_PETRIFICATION);
                me->RemoveAurasDueToSpell(SPELL_JASPER_PETRIFICATION);

                for (uint32 entry: guardiansEntry)
                {
                    if (pInstance)
                    {
                        if (Creature* gardian = me->GetMap()->GetCreature(pInstance->GetData64(entry)))
                        {
                            pInstance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, gardian);
                            gardian->RemoveAurasDueToSpell(SPELL_AMETHYST_PETRIFICATION);
                            gardian->RemoveAurasDueToSpell(SPELL_JADE_PETRIFICATION);
                            gardian->RemoveAurasDueToSpell(SPELL_COBALT_PETRIFICATION);
                            gardian->RemoveAurasDueToSpell(SPELL_JASPER_PETRIFICATION);
                        }
                    }
                }

                if (pInstance)
                {
                    pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_JASPER_CHAINS);
                    pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_TOTALY_PETRIFIED);
                    pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_COBALT_PETRIFICATION_BAR);
                    pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_JASPER_PETRIFICATION_BAR);
                    pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_JADE_PETRIFICATION_BAR);
                    pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_AMETHYST_PETRIFICATION_BAR);
                }
            }
            void Reset()
            {
                _Reset();

                if (pInstance->GetBossState(DATA_GARAJAL) != DONE)
                    pInstance->SetBossState(DATA_GARAJAL, NOT_STARTED);

                pInstance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me);

                pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_VOODOO_DOLL_VISUAL);
                pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_VOODOO_DOLL_SHARE);
                pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_CLONE_VISUAL);
                pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_CROSSED_OVER);
                pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_LIFE_FRAGILE_THREAD);
                pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_SOUL_CUT_DAMAGE);
                pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_SOUL_CUT_SUICIDE);
                pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_BANISHMENT);

                events.ScheduleEvent(EVENT_SECONDARY_ATTACK,        urand(5000, 10000));
                events.ScheduleEvent(EVENT_SUMMON_TOTEM,            urand(27500, 32500));
                events.ScheduleEvent(EVENT_SUMMON_SHADOWY_MINION,   urand(10000, 15000));
                events.ScheduleEvent(EVENT_BANISHMENT,              90000);
                events.ScheduleEvent(EVENT_VOODOO_DOLL,             2500);
                events.ScheduleEvent(EVENT_FINAL_DESTINATION,       360000); // 6 min

                me->AddAura(SPELL_STRONG_MOJO, me);
                me->CastSpell(me, SPELL_TAP_THE_SPIRIT_WORLD, true);
            }
            void JustDied(Unit* attacker)
            {
                me->CastSpell(me, SPELL_RELEASE_SPIRIT, false);

                events.Reset();
                pInstance->SetBossState(DATA_GARAJAL, DONE);
                pInstance->SaveToDB();

                pInstance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me);

                pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_VOODOO_DOLL_VISUAL);
                pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_VOODOO_DOLL_SHARE);
                pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_CLONE_VISUAL);
                pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_CROSSED_OVER);
                pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_LIFE_FRAGILE_THREAD);

                if (Creature* lorewalkerCho = GetClosestCreatureWithEntry(me, 61348, 200.0f, true))
                {
                    if (lorewalkerCho->AI())
                    {
                        {
                            lorewalkerCho->AI()->DoAction(ACTION_CONTINUE_ESCORT);
                            lorewalkerCho->AI()->DoAction(ACTION_RUN);
                        }
                    }
                }
            }
Example #14
0
 void JustDied(Unit* /*killer*/) override
 {
     pInstance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me);
     if (pInstance)
         if (Creature* raigonn = Unit::GetCreature(*me, pInstance->GetData64(DATA_RAIGONN)))
             if (raigonn->IsAIEnabled)
                 raigonn->AI()->DoAction(ACTION_WEAK_SPOT_DEAD);
 }
            void EnterEvadeMode()
            {
                me->GetMotionMaster()->MoveTargetedHome();
                me->SetHealth(me->GetMaxHealth());

                if (m_pInstance)
                   m_pInstance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me); // Remove
            }
 void JustDied(Unit* u)
 {
     if (instance)
     {
         instance->SetData(DATA_ZAO, DONE);
         instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me);
     }
 }
Example #17
0
 void EnterCombat(Unit* /*who*/)
 {
     if (instance)
     {
         instance->SetData(DATA_ASAAD, IN_PROGRESS);
         instance->SendEncounterUnit(ENCOUNTER_FRAME_ADD, me);
     }
 }
Example #18
0
            void DoAction(int32 const action)
            {
                switch (action)
                {
                    case ACTION_ENTER_COMBAT:
                    {
                        for (uint32 entry: guardiansEntry)
                            if (Creature* guardian = me->GetMap()->GetCreature(pInstance->GetData64(entry)))
                                if (guardian->isAlive())
                                    pInstance->SendEncounterUnit(ENCOUNTER_FRAME_ENGAGE, guardian);

                        events.ScheduleEvent(EVENT_PETRIFICATION, 15000);
                        fightInProgress = true;
                        break;
                    }
                    case ACTION_GUARDIAN_DIED:
                    {
                        if (!fightInProgress)
                            break;

                        totalGuardian = 0;
                        for (uint32 entry: guardiansEntry)
                            if (Creature* guardian = me->GetMap()->GetCreature(pInstance->GetData64(entry)))
                                if (guardian->isAlive())
                                    ++totalGuardian;

                        if (--totalGuardian) // break if a guardian is still alive
                            break;

                        for (uint32 entry: guardiansEntry)
                            if (Creature* guardian = me->GetMap()->GetCreature(pInstance->GetData64(entry)))
                                pInstance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, guardian);
                        
                        pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_TOTALY_PETRIFIED);
                        pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_JASPER_CHAINS);
                        pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_JASPER_PETRIFICATION_BAR);
                        pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_JADE_PETRIFICATION_BAR);
                        pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_AMETHYST_PETRIFICATION_BAR);
                        pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_COBALT_PETRIFICATION_BAR);
                        pInstance->SetBossState(DATA_STONE_GUARD, DONE);
                        fightInProgress = false;
                        break;
                    }
                }
            }
 void JustDied(Unit* /*killer*/)
 {
     if (IsHeroic())
     {
         Talk(SAY_DEATH_HEROIC);
         instance->SetBossState(DATA_RAGNAROS, DONE);
         instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me);
     }
 }
Example #20
0
        void JustDied(Unit* /*killer*/)
        {
            _JustDied();
            Talk(SAY_DEATH);
            summons.DespawnAll();

            if (instance)
               instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me);
        }
Example #21
0
            void EnterCombat(Unit* /*Ent*/)
            {
                Talk(SAY_AGGRO);
                instance->SetData(DATA_TEMPLE_GUARDIAN_ANHUUR, IN_PROGRESS);
                instance->SendEncounterUnit(ENCOUNTER_FRAME_ADD, me);

                events.ScheduleEvent(EVENT_REKOCKING, 8000);
                events.ScheduleEvent(EVENT_FLAMES, 5000);
                DoZoneInCombat();
            }
 void EnterCombat(Unit* /*who*/)
 {
     me->SetReactState(REACT_AGGRESSIVE);
     instance->SetBossState(DATA_RAGNAROS, IN_PROGRESS);
     instance->SendEncounterUnit(ENCOUNTER_FRAME_ENGAGE, me);
     events.ScheduleEvent(EVENT_SULFURAS_SMASH_TRIGGER, 30000, 0, PHASE_1);
     events.ScheduleEvent(EVENT_MAGMA_TRAP, 15000, 0, PHASE_1);
     events.ScheduleEvent(EVENT_HAND_OF_RAGNAROS, 25000, 0, PHASE_1);
     events.ScheduleEvent(EVENT_WRATH_OF_RAGNAROS, 6000, 0, PHASE_1);
 }
Example #23
0
 void EnterCombat(Unit* attacker)
 {
     if (pInstance)
     {
         pInstance->SetBossState(DATA_SHA_OF_FEAR, IN_PROGRESS);
         pInstance->SendEncounterUnit(ENCOUNTER_FRAME_ENGAGE, me);
         DoZoneInCombat();
         Talk(TALK_AGGRO);
     }
 }
Example #24
0
		void EnterCombat(Unit* /*who*/)
		{
			instance->SetBossState(DATA_PORTALS_ON_OFF, IN_PROGRESS);
			events.ScheduleEvent(PHASE_1, 1);

			if(instance)
				instance->SendEncounterUnit(ENCOUNTER_FRAME_ENGAGE, me); // Add
			events.ScheduleEvent(EVENT_SAY_TRALL_START, 5000);
			_EnterCombat();
		}
Example #25
0
 void JustDied(Unit* killer)
 {
     if (pInstance)
     {
         summons.DespawnAll();
         pInstance->SetBossState(DATA_SHA_OF_FEAR, DONE);
         pInstance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me);
         _JustDied();
     }
 }
Example #26
0
 void Reset()
 {
     ChillingBreathTimer = 15000;
     
     if (instance)
     {
         instance->SendEncounterUnit(ENCOUNTER_FRAME_REMOVE, me);
         instance->SetData(DATA_ALTAIRUS, NOT_STARTED);
     }
 }
Example #27
0
        void Reset()
        {
            ChainLightningTimer = 15000;

            if (instance)
            {
                instance->SetData(DATA_ASAAD, NOT_STARTED);
                instance->SendEncounterUnit(ENCOUNTER_FRAME_REMOVE, me);
            }
        }
        void EnterEvadeMode()
        {
            Reset();

            me->GetMotionMaster()->MoveTargetedHome();
            instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me); // Remove
            instance->SetBossState(BOSS_WARLORD, FAIL);
            instance->SetData(DATA_PORTALS_ON_OFF, DONE);

            _EnterEvadeMode();
        }
            void EnterCombat(Unit* attacker)
            {
                pInstance->SetBossState(DATA_GARAJAL, IN_PROGRESS);
                pInstance->SendEncounterUnit(ENCOUNTER_FRAME_ENGAGE, me);
                Talk(TALK_AGGRO);

                me->RemoveAura(SPELL_STRONG_MOJO);
                me->RemoveAura(SPELL_TAP_THE_SPIRIT_WORLD);

                me->InterruptNonMeleeSpells(false);
            }
 void EnterCombat(Unit * /*who*/)
 {
     Talk(SAY_AGGRO);
     instance->SetData(DATA_EARTHRAGER_PTAH, IN_PROGRESS);
     instance->SendEncounterUnit(ENCOUNTER_FRAME_ADD, me);
     events.ScheduleEvent(EVENT_FLAME_BOLT, 7500);
     events.ScheduleEvent(EVENT_RAGING_SMASH, urand(4000, 10000));
     events.ScheduleEvent(EVENT_EARTH_POINT, 8000);
     events.ScheduleEvent(EVENT_SUMMON, 50000);
     events.ScheduleEvent(EVENT_DUST_MOVE, 15000);
 }