Metin2 [C ++] Repair Fainting Resistance

Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Blaze

Elite
Elite
VIP
Joined
Jan 28, 2019
Messages
507
Credits
635
1. Open item.cpp (This file can be found in the source game).

2. We search for the function in it 2 times (Simply in this file there are 2 the same functions, please edit them both) :

Code:
Expand Collapse Copy
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);
3. And these two functions you replace:
Code:
Expand Collapse Copy
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);
 
Back
Top