mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2025-04-01 17:45:52 +02:00
The Item Level can now be set to a fixed value.
This commit is contained in:
parent
73a412f2f0
commit
c0432bc599
src/main
@ -46,8 +46,9 @@ public class ItemModInstance {
|
||||
public void reforge(RPGPlayer player) {
|
||||
MMOItemTemplate template = MMOItems.plugin.getTemplates().getTemplate(getMMO().getType(), getMMO().getId());
|
||||
if(player == null) {
|
||||
int level = getMMO().hasData(ItemStats.ITEM_LEVEL) ? (int)
|
||||
((DoubleData) getMMO().getData(ItemStats.ITEM_LEVEL)).getValue() : 0;
|
||||
final int iLevel = MMOItems.plugin.getConfig().getInt("item-revision.default-item-level", -1);
|
||||
int level = iLevel == -1 ? (getMMO().hasData(ItemStats.ITEM_LEVEL) ? (int)
|
||||
((DoubleData) getMMO().getData(ItemStats.ITEM_LEVEL)).getValue() : 0) : iLevel;
|
||||
ItemTier tier = getMMO().hasData(ItemStats.TIER) ?
|
||||
MMOItems.plugin.getTiers().get(getMMO().getData(ItemStats.TIER).toString()) : null;
|
||||
mmoItem = template.newBuilder(level, tier).build();
|
||||
|
@ -8,7 +8,7 @@
|
||||
# a Spigot Plugin by Team Requiem
|
||||
|
||||
# DO NOT TOUCH
|
||||
config-version: 3
|
||||
config-version: 4
|
||||
|
||||
# Notifies players with the 'mmoitems.update-notify' perm node when
|
||||
# they join the server if a new update is available for download.
|
||||
@ -250,10 +250,12 @@ disable-vanilla-recipes: [ ]
|
||||
|
||||
# Options for the Item Revision System
|
||||
item-revision:
|
||||
# You will most likely always want this to be one.
|
||||
# This is simply to assign revision numbers to already
|
||||
# existing items that do not already have one.
|
||||
default-revision-number: 1
|
||||
# This is the value to set the Item Level to when
|
||||
# items are updated by the revision system.
|
||||
# This can be set to -1 to use the items previous level.
|
||||
# Please note, that this value has no effect if
|
||||
# ´reroll-when-updated´ is set to true.
|
||||
default-item-level: -1
|
||||
# Whether the updated items should reroll stats
|
||||
# according to the players current level or if
|
||||
# they should keep the level and tier from when
|
||||
|
Loading…
Reference in New Issue
Block a user