DinoDevs / GladiatusCrazyAddon

This was "A browser addon for the Gladiatus browser game."

Home Page:https://gladiatus.dinodevs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong sorting order for items with negative bonus

Arctomachine opened this issue · comments

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)

  • OS: Windows
  • Browser Firefox
  • Version 111
  • Installed GCA version 4.3.7

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.