コード例 #1
0
 void JustReachedHome() override
 {
     if (m_pInstance)
     {
         if (m_pInstance->GetData(TYPE_FACTION_CHAMPIONS) != FAIL)
             m_pInstance->SetData(TYPE_FACTION_CHAMPIONS, FAIL);
     }
 }
コード例 #2
0
    void Aggro(Unit* /*pWho*/) override
    {
        DoScriptText(SAY_AGGRO, m_creature);
        DoCastSpellIfCan(m_creature, SPELL_SURGE_OF_LIGHT);

        if (m_pInstance && m_pInstance->GetData(TYPE_TWIN_VALKYR) != IN_PROGRESS)
            m_pInstance->SetData(TYPE_TWIN_VALKYR, IN_PROGRESS);
    }
コード例 #3
0
    void JustDied(Unit* /*pKiller*/) override
    {
        DoScriptText(SAY_DEATH, m_creature);

        if (m_pInstance && m_pInstance->GetData(TYPE_TWIN_VALKYR) != DONE)
            m_pInstance->SetData(TYPE_TWIN_VALKYR, DONE);

        DoCastSpellIfCan(m_creature, SPELL_CLEAR_VALKYR_ESSENCE, CAST_TRIGGERED);
        DoCastSpellIfCan(m_creature, SPELL_CLEAR_VALKYR_TOUCH, CAST_TRIGGERED);
    }
コード例 #4
0
 void Aggro(Unit* pWho) override
 {
     if (m_pInstance)
     {
         if (m_pInstance->GetData(TYPE_FACTION_CHAMPIONS) != IN_PROGRESS)
         {
             m_pInstance->SetData(TYPE_FACTION_CHAMPIONS, IN_PROGRESS);
             m_pInstance->DoSetCrusadersInCombat(pWho);
         }
     }
 }
コード例 #5
0
    void EnterEvadeMode() override
    {
        if (m_pInstance && m_pInstance->GetData(TYPE_TWIN_VALKYR) != FAIL)
            m_pInstance->SetData(TYPE_TWIN_VALKYR, FAIL);

        DoCastSpellIfCan(m_creature, SPELL_CLEAR_VALKYR_ESSENCE, CAST_TRIGGERED);
        DoCastSpellIfCan(m_creature, SPELL_CLEAR_VALKYR_TOUCH, CAST_TRIGGERED);

        // cleanup handled by creature linking
        m_creature->ForcedDespawn();
    }