Jump to content

Dizziness bug fix Help?


Recommended Posts

In the functions CItem::EquipTo and CItem::Unequip (in item.cpp)
SET_BIT(dwImmuneFlag, m_pOwner->GetWear(i)->m_pProto->dwImmuneFlag);
Replace with:
SET_BIT(dwImmuneFlag, m_pOwner->GetWear(i)->GetRealImmuneFlag());
Then add the function referred up there to item.cpp:
DWORD CItem::GetRealImmuneFlag() 
{
    DWORD dwImmuneFlag = m_pProto->dwImmuneFlag;
    for (int i = 0; i < ITEM_ATTRIBUTE_MAX_NUM; ++i)
    {
        if (GetAttributeType(i))
        {
            const TPlayerItemAttribute& ia = GetAttribute(i);
 
            if (ia.bType == APPLY_IMMUNE_STUN && !IS_SET(dwImmuneFlag, IMMUNE_STUN))
                SET_BIT(dwImmuneFlag, IMMUNE_STUN);
            else if (ia.bType == APPLY_IMMUNE_FALL && !IS_SET(dwImmuneFlag, IMMUNE_FALL))
                SET_BIT(dwImmuneFlag, IMMUNE_FALL);
            else if (ia.bType == APPLY_IMMUNE_SLOW && !IS_SET(dwImmuneFlag, IMMUNE_SLOW))
                SET_BIT(dwImmuneFlag, IMMUNE_SLOW);
        }
    }
 
    return dwImmuneFlag;
}
 
As a new function, it also needs to have an entry on item.h, so find:
long        GetLimitValue(DWORD idx) const { return m_pProto ? m_pProto->aLimits[idx].lValue : 0;    }
 
And add afterwards:
DWORD        GetRealImmuneFlag();

 

 

 

Vectors (:

Link to comment
Share on other sites

  • 3 weeks later...
  • Premium

 

In the functions CItem::EquipTo and CItem::Unequip (in item.cpp)

SET_BIT(dwImmuneFlag, m_pOwner->GetWear(i)->m_pProto->dwImmuneFlag);

Replace with:
SET_BIT(dwImmuneFlag, m_pOwner->GetWear(i)->GetRealImmuneFlag());
Then add the function referred up there to item.cpp:
DWORD CItem::GetRealImmuneFlag() 
{
    DWORD dwImmuneFlag = m_pProto->dwImmuneFlag;
    for (int i = 0; i < ITEM_ATTRIBUTE_MAX_NUM; ++i)
    {
        if (GetAttributeType(i))
        {
            const TPlayerItemAttribute& ia = GetAttribute(i);
 
            if (ia.bType == APPLY_IMMUNE_STUN && !IS_SET(dwImmuneFlag, IMMUNE_STUN))
                SET_BIT(dwImmuneFlag, IMMUNE_STUN);
            else if (ia.bType == APPLY_IMMUNE_FALL && !IS_SET(dwImmuneFlag, IMMUNE_FALL))
                SET_BIT(dwImmuneFlag, IMMUNE_FALL);
            else if (ia.bType == APPLY_IMMUNE_SLOW && !IS_SET(dwImmuneFlag, IMMUNE_SLOW))
                SET_BIT(dwImmuneFlag, IMMUNE_SLOW);
        }
    }
 
    return dwImmuneFlag;
}
 
As a new function, it also needs to have an entry on item.h, so find:
long        GetLimitValue(DWORD idx) const { return m_pProto ? m_pProto->aLimits[idx].lValue : 0;    }
 
And add afterwards:
DWORD        GetRealImmuneFlag();

 

 

 

 

is not the solution

Link to comment
Share on other sites

rant

 

Why do you have to do it via skype? Seriously, a forum is supposedly a place where people help each other, and a point of reference for the future.

I get so pissed off every time I see a thread ending with 'skype', and there are so many. That essentially makes the thread garbage. A question, with no solution, shows up on search results and clutters the forum.

 

Is it so hard to actually provide a solution here? Or following up the problem with the person? Or is it just that you want to make people pay and you are ashamed to tell them in forum 'hey, it'll be 10€ and I make this'...

 

/rant

 

Ah, wait. One more thing. Vectors, you could at least try to change the text a bit it's not so obvious you are copypasting from ?

 

Now to the thread.

 

is not the solution

You realize you didn't really explain what's the problem... right? - Ok this seems like I'm still complaining about stuff but I really am not. I'm just stating what's happening.

 

People made assumptions and tried to get your problem fixed. It does sound like it is the immune bug and what Vectors posted really is a solution for the immune bug, so there are two choices for you:

- Explain what's the problem. Just try, some lines, it's ok if it's with google translate (it's not, but it's better than nothing xD)

- Explain why is it not working. Does it fail compiling? Does the bug persist?

 

Until you do that, chances are you are not going to get much help, because there's nothing concrete to help you with!

  • Love 2
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.