DinoDevs / GladiatusCrazyAddon

This was "A browser addon for the Gladiatus browser game."
https://gladiatus.dinodevs.com
GNU General Public License v3.0
41 stars 29 forks source link

Wrong sorting order for items with negative bonus #445

Closed Arctomachine closed 1 year ago

Arctomachine commented 1 year ago

Describe the bug Sorting items at auction uses absolute values. That makes items with negative bonus appear among items with positive bonus, above zero.

Screenshots (optional) Here is example. This item has -1 bonus, but it appears above item with 0 bonus. image

Console errors (optional) No errors

Browser info (optional)

Arctomachine commented 1 year ago

It seems this bug only concerns sorting by damage due to specific regex used. It tries to match number - number on weapons and take second number, while there are also non-weapon items with number and -number. Positive values are parsed correctly, but negative number do not take - into account.

GreatApo commented 1 year ago

Nice thanks