Пример #1
0
BossInformation const* instance_violet_hold::GetBossInformation(uint32 uiEntry/* = 0*/)
{
    uint32 mEntry = uiEntry;
    if (!mEntry)
    {
        if (GetCurrentPortalNumber() == 6 && m_vRandomBosses.size() >= 1)
            mEntry = m_vRandomBosses[0]->uiEntry;
        else if (GetCurrentPortalNumber() == 12 && m_vRandomBosses.size() >= 2)
            mEntry = m_vRandomBosses[1]->uiEntry;
    }

    if (!mEntry)
        return NULL;

    for (uint8 i = 0; i < MAX_MINIBOSSES; ++i)
    {
        if (aBossInformation[i].uiEntry == mEntry)
            return &aBossInformation[i];
    }

    return NULL;
}
Пример #2
0
void instance_violet_hold::SetPortalId()
{
    if (IsCurrentPortalForTrash())
    {
        // Find another Trash portal position
        uint8 uiTemp = m_uiPortalId + urand(1, m_uiMaxCountPortalLoc - 1);
        // Decrease m_uiMaxCountPortalLoc so that the center position is skipped
        uiTemp %= m_uiMaxCountPortalLoc - 1;

        debug_log("SD2: instance_violet_hold: SetPortalId %u, old was id %u.", uiTemp, m_uiPortalId);

        m_uiPortalId = uiTemp;
    }
    else if (GetCurrentPortalNumber() == 18)
    {
        debug_log("SD2: instance_violet_hold: SetPortalId %u (Cyanigosa), old was id %u.", 0, m_uiPortalId);
        m_uiPortalId = 0;
    }
    else
    {
        debug_log("SD2: instance_violet_hold: SetPortalId %u (is boss), old was id %u.", m_uiMaxCountPortalLoc, m_uiPortalId);
        m_uiPortalId = m_uiMaxCountPortalLoc;
    }
}
Пример #3
0
void instance_violet_hold::SetPortalId()
{
    if (IsCurrentPortalForTrash())
    {
        int iTemp = rand()%(m_uiMaxCountPortalLoc - 1);

        if (iTemp >= m_uiPortalId)
            ++iTemp;

        debug_log("SD2: instance_violet_hold: SetPortalId %i, old was id %u.", iTemp, m_uiPortalId);

        m_uiPortalId = iTemp;
    }
    else if (GetCurrentPortalNumber() == 18)
    {
        debug_log("SD2: instance_violet_hold: SetPortalId %u (Cyanigosa), old was id %u.", 0, m_uiPortalId);
        m_uiPortalId = 0;
    }
    else
    {
        debug_log("SD2: instance_violet_hold: SetPortalId %u (is boss), old was id %u.", m_uiMaxCountPortalLoc, m_uiPortalId);
        m_uiPortalId = m_uiMaxCountPortalLoc;
    }
}