mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2025-02-08 12:21:21 +01:00
Fixed item tier modifier capacity
This commit is contained in:
parent
1150685c35
commit
22ea1c05a9
@ -47,7 +47,7 @@ public class ItemTier {
|
|||||||
}
|
}
|
||||||
|
|
||||||
chance = config.getDouble("generation.chance");
|
chance = config.getDouble("generation.chance");
|
||||||
capacity = config.contains("generation.capacity") ? new NumericStatFormula(config.getConfigurationSection("")) : null;
|
capacity = config.contains("generation.capacity") ? new NumericStatFormula(config.getConfigurationSection("generation.capacity")) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getId() {
|
public String getId() {
|
||||||
@ -79,22 +79,26 @@ public class ItemTier {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return The chance of being chosen when a random tier is selected while
|
* @return The chance of the tier being chosen when generating a random item
|
||||||
* calling an mmoitem template to generate an item.
|
|
||||||
*/
|
*/
|
||||||
public double getGenerationChance() {
|
public double getGenerationChance() {
|
||||||
return chance;
|
return chance;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return If the item tier has capacity ie if this tier can be applied onto
|
* @return If the item tier has a modifier capacity ie if this tier let
|
||||||
* item templates.
|
* generated items have modifiers
|
||||||
*/
|
*/
|
||||||
public boolean hasCapacity() {
|
public boolean hasCapacity() {
|
||||||
return capacity != null;
|
return capacity != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public NumericStatFormula getCapacity() {
|
/**
|
||||||
|
* @return The formula for modifier capacity which can be then rolled to
|
||||||
|
* generate a random amount of modifier capacity when generating a
|
||||||
|
* random item
|
||||||
|
*/
|
||||||
|
public NumericStatFormula getModifierCapacity() {
|
||||||
return capacity;
|
return capacity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user