mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2025-01-08 07:27:39 +01:00
Fixed modifier weights and chances not being respected properly
The system should now work as intended
This commit is contained in:
parent
34c123309b
commit
59c8976d8d
@ -69,7 +69,7 @@ public class MMOItemBuilder {
|
||||
for (TemplateModifier modifier : rollModifiers(template)) {
|
||||
// roll modifier chance
|
||||
// only apply if enough item weight
|
||||
if (!modifier.rollChance() && modifier.getWeight() > capacity)
|
||||
if (!modifier.rollChance() || modifier.getWeight() > capacity)
|
||||
continue;
|
||||
|
||||
capacity -= modifier.getWeight();
|
||||
|
@ -60,6 +60,7 @@ public class TemplateModifier {
|
||||
weight = config.getDouble("weight", parent.weight);
|
||||
nameModifier = parent.nameModifier;
|
||||
data = parent.data;
|
||||
System.out.println("Got modifier from file.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user