コード例 #1
0
    void JustDied(Unit* /*pKiller*/) override
    {
        DoScriptText(SAY_DEATH, m_creature);

        if (m_pInstance)
            m_pInstance->SetData(TYPE_SELIN, DONE);
    }
コード例 #2
0
    void Aggro(Unit* /*pWho*/) override
    {
        DoScriptText(SAY_AGGRO, m_creature);

        if (m_pInstance)
            m_pInstance->SetData(TYPE_SELIN, IN_PROGRESS);
    }
コード例 #3
0
    void JustDied(Unit* pKiller)
    {
        DoScriptText(SAY_DEATH, m_creature);

        if (!m_pInstance)
            return;

        m_pInstance->SetData(TYPE_SELIN, DONE);             // Encounter complete!

        ShatterRemainingCrystals();
    }
コード例 #4
0
    void Aggro(Unit* pWho)
    {
        DoScriptText(SAY_AGGRO, m_creature);

        if (m_pInstance)
        {
            m_pInstance->SetData(TYPE_SELIN, IN_PROGRESS);

            if (m_lCrystalGuids.empty())
            {
                // Get and output crystals
                m_pInstance->GetFelCrystalList(m_lCrystalGuids);
                for (GUIDList::const_iterator itr = m_lCrystalGuids.begin(); itr != m_lCrystalGuids.end(); ++itr)
                    debug_log("SSC: Selin: Added Fel Crystal %s to list", ObjectGuid(*itr).GetString().c_str());
            }
        }
    }
コード例 #5
0
    void JustReachedHome()
    {
        if (m_pInstance)
        {
            m_pInstance->SetData(TYPE_SELIN, FAIL);

            for (GUIDList::const_iterator itr = m_lCrystalGuids.begin(); itr != m_lCrystalGuids.end(); ++itr)
            {
                if (Creature* pCrystal = m_creature->GetMap()->GetCreature(*itr))
                {
                    if (!pCrystal->isAlive())
                        pCrystal->Respawn();                // Let MaNGOS handle setting death state, etc.

                    // Only need to set unselectable flag. You can't attack unselectable units so non_attackable flag is not necessary here.
                    pCrystal->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
                }
            }
        }
    }
コード例 #6
0
 void JustReachedHome() override
 {
     if (m_pInstance)
         m_pInstance->SetData(TYPE_SELIN, FAIL);
 }