void instance_ulduar::OnCreatureCreate(Creature* pCreature)
{
    switch(pCreature->GetEntry())
    {
        case NPC_WARD_OF_LIFE:
            for (uint8 i = urand(3, 5); i > 0; --i)
                pCreature->SummonCreature(NPC_WRITHING_LASHER, pCreature->GetPositionX(), pCreature->GetPositionY(), pCreature->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 3000);
            // not break
        case NPC_WRITHING_LASHER:
            pCreature->SetInCombatWithZone();
            return;
        case NPC_KEEPER_OF_NORGANNON:
        case NPC_BRANN_BRONZEBEARD:
            if (GetData(TYPE_LEVIATHAN_DIFFICULTY) != NONE_DIFFICULTY)
                pCreature->SetVisibility(VISIBILITY_OFF);
            break;
        case NPC_LEVIATHAN:
            pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
            break;
        case NPC_IGNIS:
            break;
        case NPC_IRON_CONSTRUCT:
            m_lIronConstructsGuids.push_back(pCreature->GetObjectGuid());
            return;
        case NPC_RAZORSCALE:
        case NPC_COMMANDER:
        case NPC_XT002:
        // Assembly of Iron
        case NPC_STEELBREAKER:
        case NPC_MOLGEIM:
        case NPC_BRUNDIR:
        // Kologarn
        case NPC_KOLOGARN:
        case NPC_KOLOGARN_BRIDGE_DUMMY:
        // Auriaya
        case NPC_AURIAYA:
        case NPC_FERAL_DEFENDER:
        // Mimiron
        case NPC_AERIAL_UNIT:
        case NPC_VX001:
        case NPC_MIMIRON:
        case NPC_LEVIATHAN_MK:
        // Hodir
        case NPC_HODIR:
        case NPC_HELPER_DRUID:
        case NPC_HELPER_MAGE:
        case NPC_HELPER_SHAMAN:
        case NPC_HELPER_PRIEST:
        //Thorim
        case NPC_THORIM:
        case NPC_RUNIC_COLOSSUS:
            break;
        case NPC_THUNDER_ORB:
        {
            if (pCreature->GetPositionZ() > 425.0f)
            {
                m_lUpperOrbs.push_back(pCreature->GetObjectGuid());
            }
            else
            {
                m_lLowerOrbs.push_back(pCreature->GetObjectGuid());
            }
            return;
        }
        case NPC_RIGHT_HAND_TRIGGER:
        case NPC_LEFT_HAND_TRIGGER:
            SortHandTrigger(pCreature);
            return;
        case NPC_RUNE_GIANT:
        case NPC_JORMUNGAR_BEHEMOTH:
        case NPC_FREYA:
        case NPC_BRIGHTLEAF:
        case NPC_IRONBRACH:
        case NPC_STONEBARK:
        case NPC_VEZAX:
        case NPC_ANIMUS:
        case NPC_YOGGSARON:
        case NPC_SARA:
        case NPC_YOGG_BRAIN:
        case NPC_ALGALON:
            break;
        case NPC_OMINOUS_CLOUD:
            m_lCloudGuids.push_back(pCreature->GetObjectGuid());
            return;
        case NPC_SANCTUM_SENTRY:
            m_lSanctumSentryGuids.push_back(pCreature->GetObjectGuid());
            return;

        // used to handle the keepers images
        // set to invisible by default and only made visible if the encounter is done
        case HODIR_IMAGE:
            pCreature->SetVisibility(VISIBILITY_OFF);
            if (m_auiEncounter[TYPE_HODIR] == DONE)
                pCreature->SetVisibility(VISIBILITY_ON);
            break;
        case FREYA_IMAGE:
            pCreature->SetVisibility(VISIBILITY_OFF);
            if (m_auiEncounter[TYPE_FREYA] == DONE)
                pCreature->SetVisibility(VISIBILITY_ON);
            break;
        case THORIM_IMAGE:
            pCreature->SetVisibility(VISIBILITY_OFF);
            if (m_auiEncounter[TYPE_THORIM] == DONE)
                pCreature->SetVisibility(VISIBILITY_ON);
            break;
        case MIMIRON_IMAGE:
            pCreature->SetVisibility(VISIBILITY_OFF);
            if (m_auiEncounter[TYPE_MIMIRON] == DONE)
                pCreature->SetVisibility(VISIBILITY_ON);
            break;
        default:
            return;
    }
    m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid();
}
void instance_ulduar::OnCreatureCreate(Creature* pCreature)
{
    switch(pCreature->GetEntry())
    {
    case NPC_LEVIATHAN:
    case NPC_IGNIS:
        break;
    case NPC_IRON_CONSTRUCT:
        m_lIronConstructsGuids.push_back(pCreature->GetObjectGuid());
        return;
    case NPC_RAZORSCALE:
    case NPC_COMMANDER:
    case NPC_XT002:
     // Assembly of Iron
    case NPC_STEELBREAKER:
    case NPC_MOLGEIM:
    case NPC_BRUNDIR:
    // Kologarn
    case NPC_KOLOGARN:
    case NPC_KOLOGARN_BRIDGE_DUMMY:
    // Auriaya
    case NPC_AURIAYA:
    case NPC_FERAL_DEFENDER:
    // Mimiron
    case NPC_AERIAL_UNIT:
    case NPC_VX001:
    case NPC_MIMIRON:
    case NPC_LEVIATHAN_MK:
    // Hodir
    case NPC_HODIR:
    case NPC_HELPER_DRUID:
    case NPC_HELPER_MAGE:
    case NPC_HELPER_SHAMAN:
    case NPC_HELPER_PRIEST:
    //Thorim
    case NPC_THORIM:
    case NPC_RUNIC_COLOSSUS:
        break;
    case NPC_THUNDER_ORB:
    {
        if (pCreature->GetPositionZ() > 425.0f)
        {
            m_lUpperOrbs.push_back(pCreature->GetObjectGuid());
        }
        else
        {
            m_lLowerOrbs.push_back(pCreature->GetObjectGuid());
        }
        return;
    }
    case NPC_RIGHT_HAND_TRIGGER:
    case NPC_LEFT_HAND_TRIGGER:
        SortHandTrigger(pCreature);
        return;
    case NPC_RUNE_GIANT:
    case NPC_JORMUNGAR_BEHEMOTH:
    case NPC_FREYA:
    case NPC_BRIGHTLEAF:
    case NPC_IRONBRACH:
    case NPC_STONEBARK:
    case NPC_VEZAX:
    case NPC_ANIMUS:
    case NPC_YOGGSARON:
    case NPC_SARA:
    case NPC_YOGG_BRAIN:
    case NPC_ALGALON:
        break;
    case NPC_OMINOUS_CLOUD:
        m_lCloudGuids.push_back(pCreature->GetObjectGuid());
        return;
    case NPC_SANCTUM_SENTRY:
        m_lSanctumSentryGuids.push_back(pCreature->GetObjectGuid());
        return;

        // used to handle the keepers images
        // set to invisible by default and only made visible if the encounter is done
    case HODIR_IMAGE:
        pCreature->SetVisibility(VISIBILITY_OFF);
        if(m_auiEncounter[8] == DONE)
            pCreature->SetVisibility(VISIBILITY_ON);
        break;
    case FREYA_IMAGE:
        pCreature->SetVisibility(VISIBILITY_OFF);
        if(m_auiEncounter[10] == DONE)
            pCreature->SetVisibility(VISIBILITY_ON);
        break;
    case THORIM_IMAGE:
        pCreature->SetVisibility(VISIBILITY_OFF);
        if(m_auiEncounter[9] == DONE)
            pCreature->SetVisibility(VISIBILITY_ON);
        break;
    case MIMIRON_IMAGE:
        pCreature->SetVisibility(VISIBILITY_OFF);
        if(m_auiEncounter[7] == DONE)
            pCreature->SetVisibility(VISIBILITY_ON);
        break;
    default:
        return;
    }
    m_mNpcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid();
}