Jump to content

[C++] Fix Bug inmune


Recommended Posts

Nos dirijimos a Item.cpp 

    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);


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);


Creditos: xP3NG3Rx 

Link to comment
Share on other sites

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...