Fixed -luck items can trick Fame Based Point systems.

hanghost

Active Member
Jan 13, 2017
28
0
Hello everyone

This line of code can be found in a few places throughout the repository when it comes to storing fame based points:

pm.VASTotalMonsterFame += (int)(bc.Fame * (1 + Math.Sqrt(pm.RealLuck) / 100))/10;

Assuming that someone puts on a -luck item (can be found using the new RunicGenerator or just by browsing the Mysterious Wisp wares). The above starts giving -thousands of millions of points and makes the system trick into dropping the item by eventually overflowing i guess.

Regards,
Andrei.
 

Tasanar

Moderator
ServUO Developer
Oct 16, 2014
4,482
108
32
trueuo.com
Shard Name
Heritage
Donate
Donate money to this user
I can confirm this bug.

confirmed.png

So first I made a test character with a -100 luck item. I could not get it to bug out. However with -1000 luck it DID bug out.

Since you can get a whole suit of items with -100 luck there needs to be something added where if luck < 0 luck = 0.
 

hanghost

Active Member
Jan 13, 2017
28
0
After checking the latest repository code, you might need more than -250 luck (so 3 items) depending on your settings due to how RealLuck is calculated but only if you are in Felucca.