コード例 #1
0
void instance_blackrock_spire::OnCreatureDeath(Creature* pCreature)
{
    switch (pCreature->GetEntry())
    {
        case NPC_DRAKKISATH:
            // Just open the doors, don't save anything because it's the last boss
            DoUseDoorOrButton(GO_DRAKKISATH_DOOR_1);
            DoUseDoorOrButton(GO_DRAKKISATH_DOOR_2);
            break;
        case NPC_CHROMATIC_WHELP:
        case NPC_CHROMATIC_DRAGON:
        case NPC_BLACKHAND_HANDLER:
            // check if it's summoned - some npcs with the same entry are already spawned in the instance
            if (!pCreature->IsTemporarySummon())
                break;
            --m_uiStadiumMobsAlive;
            if (m_uiStadiumMobsAlive == 0)
                DoSendNextStadiumWave();
            break;
        case NPC_GYTH:
        case NPC_REND_BLACKHAND:
            --m_uiStadiumMobsAlive;
            if (m_uiStadiumMobsAlive == 0)
                StartNextDialogueText(SAY_NEFARIUS_VICTORY);
            break;
    }
}
コード例 #2
0
void instance_blackrock_spire::Update(uint32 uiDiff)
{
    DialogueUpdate(uiDiff);

    if (m_uiStadiumEventTimer)
    {
        if (m_uiStadiumEventTimer <= uiDiff)
            DoSendNextStadiumWave();
        else
            m_uiStadiumEventTimer -= uiDiff;
    }

    if (m_uiFlamewreathEventTimer)
    {
        if (m_uiFlamewreathEventTimer <= uiDiff)
            DoSendNextFlamewreathWave();
        else
            m_uiFlamewreathEventTimer -= uiDiff;
    }

    // unlock dragon spine door
    if (m_uiDragonspineDoorTimer)
    {
        if (m_uiDragonspineDoorTimer <= uiDiff)
        {
            switch (m_uiDragonspineGoCount)
            {
                case 0:
                    DoUseDoorOrButton(GO_BRAZIER_1);
                    DoUseDoorOrButton(GO_BRAZIER_2);
                    break;
                case 1:
                    DoUseDoorOrButton(GO_BRAZIER_3);
                    DoUseDoorOrButton(GO_BRAZIER_4);
                    break;
                case 2:
                    DoUseDoorOrButton(GO_BRAZIER_5);
                    DoUseDoorOrButton(GO_BRAZIER_6);
                    break;
                case 3:
                    DoUseDoorOrButton(GO_DRAGONSPINE);
                    break;
            }
            ++m_uiDragonspineGoCount;

            if (m_uiDragonspineGoCount >= 4)
                m_uiDragonspineDoorTimer = 0;
            else
                m_uiDragonspineDoorTimer = 1000;
        }
        else
            m_uiDragonspineDoorTimer -= uiDiff;
    }
}
コード例 #3
0
void instance_blackrock_spire::OnCreatureDeath(Creature* pCreature)
{
    switch (pCreature->GetEntry())
    {
        case NPC_BLACKHAND_SUMMONER:
        case NPC_BLACKHAND_VETERAN:
            // Handle Runes
            if (m_auiEncounter[TYPE_ROOM_EVENT] == IN_PROGRESS)
            {
                uint8 uiNotEmptyRoomsCount = 0;
                for (uint8 i = 0; i < MAX_ROOMS; ++i)
                {
                    if (m_aRoomRuneGuid[i])                 // This check is used, to ensure which runes still need processing
                    {
                        m_alRoomEventMobGUIDSorted[i].remove(pCreature->GetObjectGuid());
                        if (m_alRoomEventMobGUIDSorted[i].empty())
                        {
                            DoUseDoorOrButton(m_aRoomRuneGuid[i]);
                            m_aRoomRuneGuid[i].Clear();
                        }
                        else
                            ++uiNotEmptyRoomsCount;         // found an not empty room
                    }
                }
                if (!uiNotEmptyRoomsCount)
                    SetData(TYPE_ROOM_EVENT, DONE);
            }
            break;
        case NPC_SOLAKAR_FLAMEWREATH:
            SetData(TYPE_FLAMEWREATH, DONE);
            break;
        case NPC_DRAKKISATH:
            SetData(TYPE_DRAKKISATH, DONE);
            DoUseDoorOrButton(GO_DRAKKISATH_DOOR_1);
            DoUseDoorOrButton(GO_DRAKKISATH_DOOR_2);
            break;
        case NPC_CHROMATIC_WHELP:
        case NPC_CHROMATIC_DRAGON:
        case NPC_BLACKHAND_HANDLER:
            // check if it's summoned - some npcs with the same entry are already spawned in the instance
            if (!pCreature->IsTemporarySummon())
                break;
            --m_uiStadiumMobsAlive;
            if (m_uiStadiumMobsAlive == 0)
                DoSendNextStadiumWave();
            break;
        case NPC_GYTH:
        case NPC_REND_BLACKHAND:
            --m_uiStadiumMobsAlive;
            if (m_uiStadiumMobsAlive == 0)
                StartNextDialogueText(SAY_NEFARIUS_VICTORY);
            break;
    }
}
コード例 #4
0
void instance_blackrock_spire::Update(uint32 uiDiff)
{
    DialogueUpdate(uiDiff);

    if (m_uiStadiumEventTimer)
    {
        if (m_uiStadiumEventTimer <= uiDiff)
            DoSendNextStadiumWave();
        else
            m_uiStadiumEventTimer -= uiDiff;
    }
}
コード例 #5
0
void instance_blackrock_spire::OnCreatureDeath(Creature* pCreature)
{
    switch (pCreature->GetEntry())
    {
        case NPC_BLACKHAND_SUMMONER:
        case NPC_BLACKHAND_VETERAN:
            // Handle Runes
            if (m_auiEncounter[TYPE_ROOM_EVENT] == IN_PROGRESS)
            {
                uint8 uiNotEmptyRoomsCount = 0;
                for (uint8 i = 0; i < MAX_ROOMS; ++i)
                {
                    if (m_aRoomRuneGuid[i])                 // This check is used, to ensure which runes still need processing
                    {
                        m_alRoomEventMobGUIDSorted[i].remove(pCreature->GetObjectGuid());
                        if (m_alRoomEventMobGUIDSorted[i].empty())
                        {
                            DoUseDoorOrButton(m_aRoomRuneGuid[i]);
                            m_aRoomRuneGuid[i].Clear();
                        }
                        else
                            ++uiNotEmptyRoomsCount;         // found an not empty room
                    }
                }
                if (!uiNotEmptyRoomsCount)
                    SetData(TYPE_ROOM_EVENT, DONE);
            }
            break;
        case NPC_SOLAKAR_FLAMEWREATH:
            SetData(TYPE_FLAMEWREATH, DONE);
            break;
        case NPC_DRAKKISATH:
            SetData(TYPE_DRAKKISATH, DONE);
            DoUseDoorOrButton(GO_DRAKKISATH_DOOR_1);
            DoUseDoorOrButton(GO_DRAKKISATH_DOOR_2);
            break;
        case NPC_CHROMATIC_WHELP:
        case NPC_CHROMATIC_DRAGON:
        case NPC_BLACKHAND_HANDLER:
            // check if it's summoned - some npcs with the same entry are already spawned in the instance
            if (!pCreature->IsTemporarySummon())
                break;

            // 5% chance for Rend or Lord Victor Nefarius to taunt players when one of the creature is killed (% is guesswork)
            // Lord Victor Nefarius
            if (urand(0, 100) < 5)
            {
                if (Creature* pNefarius = GetSingleCreatureFromStorage(NPC_LORD_VICTOR_NEFARIUS))
                {
                    switch (urand(0, 7))
                    {
                        case 0: DoScriptText(SAY_NEFARIUS_TAUNT1, pNefarius); break;
                        case 1: DoScriptText(SAY_NEFARIUS_TAUNT2, pNefarius); break;
                        case 2: DoScriptText(SAY_NEFARIUS_TAUNT3, pNefarius); break;
                        case 3: DoScriptText(SAY_NEFARIUS_TAUNT4, pNefarius); break;
                        case 4: DoScriptText(SAY_NEFARIUS_TAUNT5, pNefarius); break;
                        case 5: DoScriptText(SAY_NEFARIUS_TAUNT6, pNefarius); break;
                        case 6: DoScriptText(SAY_NEFARIUS_TAUNT7, pNefarius); break;
                        case 7: DoScriptText(SAY_NEFARIUS_TAUNT8, pNefarius); break;
                    }
                }
            }
            // Warchief Rend Blackhand
            if (urand(0, 100) < 5)
            {
                if (Creature* pRend = GetSingleCreatureFromStorage(NPC_REND_BLACKHAND))
                {
                    switch (urand(0, 3))
                    {
                        case 0: DoScriptText(SAY_REND_TAUNT1, pRend); break;
                        case 1: DoScriptText(SAY_REND_TAUNT2, pRend); break;
                        case 2: DoScriptText(SAY_REND_TAUNT3, pRend); break;
                        case 3: DoScriptText(SAY_REND_TAUNT4, pRend); break;
                    }
                }
            }
            --m_uiStadiumMobsAlive;
            if (m_uiStadiumMobsAlive == 0)
                DoSendNextStadiumWave();
            break;
        case NPC_GYTH:
        case NPC_REND_BLACKHAND:
            --m_uiStadiumMobsAlive;
            if (m_uiStadiumMobsAlive == 0)
                StartNextDialogueText(SAY_NEFARIUS_VICTORY);
            break;
    }
}