Пример #1
0
        void Reset()
        {
            me->SetFullHealth();//dunno why it does not resets health at evade..
            me->setActive(true);
            if (instance)
            {
                KalecgosGUID = instance->GetData64(DATA_KALECGOS_DRAGON);
                instance->SetData(DATA_KALECGOS_EVENT, NOT_STARTED);
            }
            if (KalecGUID)
            {
                if (Creature* Kalec = Unit::GetCreature(*me, KalecGUID))
                    Kalec->setDeathState(JUST_DIED);
                KalecGUID = 0;
            }

            ShadowBoltTimer = 7000 + rand()%3 * 1000;
            AgonyCurseTimer = 20000;
            CorruptionStrikeTimer = 13000;
            CheckTimer = 1000;
            ResetThreat = 1000;
            isEnraged = false;
            isBanished = false;

            me->CastSpell(me, AURA_DEMONIC_VISUAL, true);
            TeleportAllPlayersBack();
        }
Пример #2
0
        void JustDied(Unit* /*killer*/) override
        {
            Talk(SAY_SATH_DEATH);
            me->SetPosition(me->GetPositionX(), me->GetPositionY(), DRAGON_REALM_Z, me->GetOrientation());
            TeleportAllPlayersBack();
            if (Creature* Kalecgos = ObjectAccessor::GetCreature(*me, KalecgosGUID))
            {
                CAST_AI(boss_kalecgos::boss_kalecgosAI, Kalecgos->AI())->TalkTimer = 1;
                CAST_AI(boss_kalecgos::boss_kalecgosAI, Kalecgos->AI())->isFriendly = true;
            }

            instance->SetBossState(DATA_KALECGOS, DONE);
        }
Пример #3
0
        void JustDied(Unit* /*killer*/)
        {
            DoScriptText(SAY_SATH_DEATH, me);
            me->SetPosition(me->GetPositionX(), me->GetPositionY(), DRAGON_REALM_Z, me->GetOrientation());
            TeleportAllPlayersBack();
            if (Creature* Kalecgos = Unit::GetCreature(*me, KalecgosGUID))
            {
                CAST_AI(boss_kalecgos::boss_kalecgosAI, Kalecgos->AI())->TalkTimer = 1;
                CAST_AI(boss_kalecgos::boss_kalecgosAI, Kalecgos->AI())->isFriendly = true;
            }

            if (instance)
                instance->SetData(DATA_KALECGOS_EVENT, DONE);
        }
Пример #4
0
 void KilledUnit(Unit* target)
 {
     if (target->GetGUID() == KalecGUID)
     {
         TeleportAllPlayersBack();
         if (Creature* Kalecgos = Unit::GetCreature(*me, KalecgosGUID))
         {
             CAST_AI(boss_kalecgos::boss_kalecgosAI, Kalecgos->AI())->TalkTimer = 1;
             CAST_AI(boss_kalecgos::boss_kalecgosAI, Kalecgos->AI())->isFriendly = false;
         }
         EnterEvadeMode();
         return;
     }
     DoScriptText(RAND(SAY_SATH_SLAY1, SAY_SATH_SLAY2), me);
 }
Пример #5
0
 void KilledUnit(Unit* target) override
 {
     if (target->GetGUID() == KalecGUID)
     {
         TeleportAllPlayersBack();
         if (Creature* Kalecgos = ObjectAccessor::GetCreature(*me, KalecgosGUID))
         {
             CAST_AI(boss_kalecgos::boss_kalecgosAI, Kalecgos->AI())->TalkTimer = 1;
             CAST_AI(boss_kalecgos::boss_kalecgosAI, Kalecgos->AI())->isFriendly = false;
         }
         EnterEvadeMode();
         return;
     }
     Talk(SAY_SATH_SLAY);
 }
Пример #6
0
        void JustDied(Unit * /*killer*/)
        {
            DoScriptText(SAY_SATH_DEATH, me);
            me->Relocate(me->GetPositionX(), me->GetPositionY(), DRAGON_REALM_Z, me->GetOrientation());
            me->RemoveAurasDueToSpell(AURA_SPECTRAL_INVISIBILITY);
            TeleportAllPlayersBack();
            if(Unit *Kalecgos = Unit::GetUnit(*me, KalecgosGUID))
            {
                CAST_AI(boss_kalecgos::boss_kalecgosAI,((Creature*)Kalecgos)->AI())->TalkTimer = 1;
                CAST_AI(boss_kalecgos::boss_kalecgosAI,((Creature*)Kalecgos)->AI())->isFriendly = true;
            }

            if(pInstance)
                pInstance->SetData(DATA_KALECGOS_EVENT, DONE);
        }
Пример #7
0
        void Reset() override
        {
            me->SetFullHealth();//dunno why it does not resets health at evade..
            me->setActive(true);
            KalecgosGUID = instance->GetGuidData(DATA_KALECGOS_DRAGON);
            instance->SetBossState(DATA_KALECGOS, NOT_STARTED);
            if (KalecGUID)
            {
                if (Creature* Kalec = ObjectAccessor::GetCreature(*me, KalecGUID))
                    Kalec->setDeathState(JUST_DIED);
                KalecGUID.Clear();
            }

            Initialize();

            me->CastSpell(me, AURA_DEMONIC_VISUAL, true);
            TeleportAllPlayersBack();
        }
Пример #8
0
 void KilledUnit(Unit *target)
 {
     if(target->GetGUID() == KalecGUID)
     {
         TeleportAllPlayersBack();
         if(Unit *Kalecgos = Unit::GetUnit(*me, KalecgosGUID))
         {
             CAST_AI(boss_kalecgos::boss_kalecgosAI,((Creature*)Kalecgos)->AI())->TalkTimer = 1;
             CAST_AI(boss_kalecgos::boss_kalecgosAI,((Creature*)Kalecgos)->AI())->isFriendly = false;
         }
         EnterEvadeMode();
         return;
     }
     switch(rand()%2)
     {
     case 0: DoScriptText(SAY_SATH_SLAY1, me); break;
     case 1: DoScriptText(SAY_SATH_SLAY2, me); break;
     }
 }