mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2025-01-22 09:31:20 +01:00
!Random enchants cannot go lower than min level
This commit is contained in:
parent
bc0beb087c
commit
1d2743d5f2
@ -43,7 +43,7 @@ public class RandomEnchantListData implements RandomStatData {
|
||||
@Override
|
||||
public StatData randomize(GeneratedItemBuilder builder) {
|
||||
EnchantListData list = new EnchantListData();
|
||||
enchants.forEach((enchant, formula) -> list.addEnchant(enchant, (int) formula.calculate(builder.getLevel())));
|
||||
enchants.forEach((enchant, formula) -> list.addEnchant(enchant, (int) Math.max(formula.calculate(builder.getLevel()), enchant.getStartLevel())));
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user