Moulberry / NotEnoughUpdates

http://moulberry.github.io/projects
GNU Lesser General Public License v3.0
469 stars 58 forks source link

[Bug] Expand Pet Exp Requirement's Max Level detection works incorrectly on Golden Dragon #247

Open TheDGOfficial opened 2 years ago

TheDGOfficial commented 2 years ago

Mod Version: 2.0.0

Describe the bug When /neu -> Tooltip Tweaks -> Expand Pet Exp Requirement is enabled, NEU will show MAX LEVEL incorrectly for Lvl. 100+ Golden Dragon pets on the AH, whilst max level of Golden Dragon being Lvl. 200.

To Reproduce

  1. Turn on Expand Pet Exp Requirement from /neu -> Tooltip Tweaks if it is not already on
  2. Go on AH and search for Golden Dragon, look for ones that are Level 100+ but not Level 200, see it says MAX LEVEL even though they are not.

Expected behavior Only saying MAX LEVEL for the actual max level.

Attachments

(From AH) 2021-12-05_21 57 51

The code line adding the MAX LEVEL text: https://github.com/Moulberry/NotEnoughUpdates/blob/b11742988dec635b5c5da7c2363803cbfafb37b1/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java#L2411

Seeing this, it should be an issue with the /pv menu as well: https://github.com/Moulberry/NotEnoughUpdates/blob/b11742988dec635b5c5da7c2363803cbfafb37b1/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java#L2403

Looking at the code more I discovered it gets max level information from the file /config/NotEnoughUpdates/repo/constants/pets.json, and there is already a special entry for Golden Dragon there, so I don't know what is the exact reason this happening. It also maybe an issue on my end but I'm not sure.