Jump to content

Fix for HP / MP Bug Overflow


Borgotov

Recommended Posts

It´s easy to fix.

 

Maybe ymir was sleeping when they inserted that function.

 

in char.cpp inside the function "void CHARACTER::ComputePoints()" search for:

if (GetHP() > GetMaxHP())
	PointChange(POINT_HP, GetMaxHP() - GetHP());

if (GetSP() > GetMaxSP())
        PointChange(POINT_SP, GetMaxSP() - GetSP());

then select that section and click ctrl + x 

 

and paste it above here still in the same function:

       UpdatePacket();
}

Have a nice day.

  • Love 1
Link to comment
Share on other sites

Nah... the whole points system was made by someone with weird concepts (has to have been... it's overcomplicated and poorly implemented all around the code with tons of checks and crap), so I would not call anything in it "easy" xD

 

Lectures aside, and unrelated to the complexity of this, I can think of something that would fail if you carry out that change. Let's say HP is bigger than Max HP (HP = 200, Max HP = 100), the affects/pet system are supposed to reduce the HP/SP (by for example 50) but all they do is set it to a value that it's still over the max, so the final HP will be 100, effectively ignoring the intended decrease.

  • Love 2
Link to comment
Share on other sites

  • 4 years later...
On 8/22/2014 at 6:54 PM, Think said:

Let's say HP is bigger than Max HP (HP = 200, Max HP = 100)

I have this exact bug when changing equipment with different values of Max HP/VIT. The fix in this post as well as the fix for tables.h is in my source but the bug is still there. I'm also trying to find a fix for the bug where character dies with negative HP instead of clean 0.

Link to comment
Share on other sites

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.