1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-11-25 20:16:13 +01:00

Merge pull request #373 from HimaJyun/eachitem-softlimit

each item SoftLimit
This commit is contained in:
montlikadani 2019-02-27 17:19:28 +01:00 committed by GitHub
commit b79f761524
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 1 deletions

View File

@ -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);

View File

@ -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