mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2024-12-22 04:37:42 +01:00
fixed item tier selection when building mmoitems
This commit is contained in:
parent
f1d529a6c7
commit
e1bad4d9f6
@ -45,10 +45,10 @@ public class MMOItemBuilder {
|
||||
this.level = level;
|
||||
this.tier = tier;
|
||||
|
||||
/*
|
||||
* Capacity is not final as it keeps lowering as modifiers are selected and
|
||||
* applied
|
||||
*/
|
||||
// Either use provided tier or look into the template base data
|
||||
tier = tier != null ? tier : template.getBaseItemData().containsKey(ItemStats.TIER) ? MMOItems.plugin.getTiers().getOrThrow(template.getBaseItemData().get(ItemStats.TIER).toString()) : null;
|
||||
|
||||
// Capacity is not final as it keeps lowering as modifiers are selected
|
||||
double capacity = (tier != null && tier.hasCapacity() ? tier.getModifierCapacity() : MMOItems.plugin.getLanguage().defaultItemCapacity).calculate(level);
|
||||
mmoitem = new MMOItem(template.getType(), template.getId());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user