From c2d86ff1dde018e8bbf3b3457f8f4da2d2ebea79 Mon Sep 17 00:00:00 2001 From: HimaJyun Date: Wed, 27 Feb 2019 07:09:51 +0900 Subject: [PATCH] each item SoftLimit --- .../com/gamingmesh/jobs/config/ConfigManager.java | 12 +++++++++++- src/main/resources/jobConfig.yml | 6 ++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gamingmesh/jobs/config/ConfigManager.java b/src/main/java/com/gamingmesh/jobs/config/ConfigManager.java index cddf38db..e30eeb99 100644 --- a/src/main/java/com/gamingmesh/jobs/config/ConfigManager.java +++ b/src/main/java/com/gamingmesh/jobs/config/ConfigManager.java @@ -1191,8 +1191,18 @@ public class ConfigManager { } } + Integer itemSoftIncomeLimit = softIncomeLimit; + if(section.isInt("softIncomeLimit")) + itemSoftIncomeLimit = section.getInt("softIncomeLimit"); + Integer itemSoftExpLimit = softExpLimit; + if(section.isInt("softExpLimit")) + itemSoftExpLimit = section.getInt("softExpLimit"); + Integer itemSoftPointsLimit = softPointsLimit; + if(section.isInt("softPointsLimit")) + itemSoftPointsLimit = section.getInt("softPointsLimit"); + jobInfo.add(new JobInfo(actionType, id, meta, type + subType, income, incomeEquation, experience, expEquation, pointsEquation, points, fromlevel, - untilLevel, section.getCurrentPath(), softIncomeLimit, softExpLimit, softPointsLimit)); + untilLevel, section.getCurrentPath(), itemSoftIncomeLimit, itemSoftExpLimit, itemSoftPointsLimit)); } } job.setJobInfo(actionType, jobInfo); diff --git a/src/main/resources/jobConfig.yml b/src/main/resources/jobConfig.yml index 8ff84ccf..6557032c 100644 --- a/src/main/resources/jobConfig.yml +++ b/src/main/resources/jobConfig.yml @@ -211,6 +211,12 @@ Jobs: # if not given, then there is no limit # this can be used for any action until-level: 30 + # (OPTIONAL) Soft limits will allow to stop income/exp/point payment increase at some particular level but allow further general leveling. + # In example if player is level 70, he will get paid as he would be at level 50, exp gain will be as he would be at lvl 40 and point gain will be as at level 60 + # This only applies after players level is higher than provided particular limit. + softIncomeLimit: 50 + softExpLimit: 40 + softPointsLimit: 60 gravel: # you can use minuses to take away money if the player break this block income: -1.0