Esempio n. 1
0
    void DamageTaken(Unit* /*pDoneBy*/, uint32& uiDamage, DamageEffectType /*damagetype*/) override
    {
        if (uiDamage > m_creature->GetHealth())
        {
            uiDamage = 0;

            if (m_bIsBanished)
                return;

            // banish Sathrovarr and eject the players
            if (DoCastSpellIfCan(m_creature, SPELL_BANISH, CAST_TRIGGERED) == CAST_OK)
                m_bIsBanished = true;

            if (!m_pInstance)
                return;

            if (Creature* pKalecgos = m_pInstance->GetSingleCreatureFromStorage(NPC_KALECGOS_DRAGON))
            {
                if (boss_kalecgosAI* pKalecgosAI = dynamic_cast<boss_kalecgosAI*>(pKalecgos->AI()))
                    pKalecgosAI->m_bIsUncorrupted = true;
            }

            m_pInstance->DoEjectSpectralPlayers();
        }
    }
Esempio n. 2
0
 void JustDied(Unit* /*pKiller*/) override
 {
     if (m_pInstance)
     {
         m_pInstance->DoEjectSpectralPlayers();
         m_pInstance->SetData(TYPE_KALECGOS, FAIL);
     }
 }
Esempio n. 3
0
 void JustReachedHome() override
 {
     if (m_pInstance)
     {
         m_pInstance->DoEjectSpectralPlayers();
         m_pInstance->SetData(TYPE_KALECGOS, FAIL);
     }
 }