Jump to content

[C++] Fix Bug inmune


MiGueLiT0

Mensajes recomendados

Nos dirijimos a Item.cpp 
BUSCAMOS: 

    DWORD dwImmuneFlag = 0;

    for (int i = 0; i < WEAR_MAX_NUM; ++i)
        if (m_pOwner->GetWear(i))
            SET_BIT(dwImmuneFlag, m_pOwner->GetWear(i)->m_pProto->dwImmuneFlag);

    m_pOwner->SetImmuneFlag(dwImmuneFlag);

Eso lo reemplazamos por:

 

    

DWORD dwImmuneFlag = 0;
    LPITEM item = NULL;

    for (int i = 0; i < WEAR_MAX_NUM; ++i)
    {
        if (item=m_pOwner->GetWear(i))
        {
            if (item->GetImmuneFlag() != 0)
                SET_BIT(dwImmuneFlag, item->GetImmuneFlag());
            if (item->GetAttributeCount() > 0)
            {
                if (item->HasAttr(APPLY_IMMUNE_STUN))
                    SET_BIT(dwImmuneFlag, IMMUNE_STUN);
                if (item->HasAttr(APPLY_IMMUNE_SLOW))
                    SET_BIT(dwImmuneFlag, IMMUNE_SLOW);
                if (item->HasAttr(APPLY_IMMUNE_FALL))
                    SET_BIT(dwImmuneFlag, IMMUNE_FALL);
            }
        }
    }

    m_pOwner->SetImmuneFlag(dwImmuneFlag); 

Creditos: xP3NG3Rx 

Enlace para comentar
Compartir en otros sitios

  • 2 weeks later...
  • 5 months later...

Unirse a la conversación

Puedes publicar ahora y registrarte más tarde. Si tienes una cuenta, regístrate para publicar con su cuenta.

Guest
Responder a este tema...

×   Has pegado contenido con formato .   Eliminar formato

  Only 75 emoji are allowed.

×   Tu enlace se ha incorporado automáticamente.   Mostrar un enlace en su lugar

×   Se ha restaurado el contenido anterior. .   Borrar editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recientemente navegando por este tema   0 miembros

    • No hay usuarios registrados visitando esta página.
×
×
  • Crear nuevo...