StygianCore icon indicating copy to clipboard operation
StygianCore copied to clipboard

Random Enchants quality settings not applied

Open akanix42 opened this issue 5 years ago • 2 comments

I haven't modified the default configuration, but I'm regularly getting gray items with enchantments. When I look in mod_randomenchants.conf.dist, it is set to:

RandomEnchants.HighQuality = 4
RandomEnchants.LowQuality = 3

However, when I look at the source code:

if ((Quality < LowQuality && Quality > HighQuality) || (Class != 2 && Class != 4))

I believe the first test should be (Quality < LowQuality || Quality > HighQuality) as otherwise it will always be false as long as LowQuality <= HighQuality (and it seems unlikely to me that the alternative, where HighQuality < LowQuality, is what you intended).

akanix42 avatar Mar 16 '19 21:03 akanix42

Thanks for the report! Yes, as indicated in the source, this needed further testing to ensure it was performing as intended. If you want to test it and open a PR that would be excellent, if not, I'll test it when I get the time and push it out on the next release.

StygianTheBest avatar Mar 18 '19 14:03 StygianTheBest

I'm merging many reported issues with this module.

  • #61
  • #56

StygianTheBest avatar Jul 01 '19 21:07 StygianTheBest