Skip to content

Commit

Permalink
each item SoftLimit
Browse files Browse the repository at this point in the history
  • Loading branch information
HimaJyun committed Feb 26, 2019
1 parent a7f9b0d commit c2d86ff
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/main/java/com/gamingmesh/jobs/config/ConfigManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -1191,8 +1191,18 @@ else if (actionType == ActionType.DRINK) {
}
}

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);
Expand Down
6 changes: 6 additions & 0 deletions src/main/resources/jobConfig.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c2d86ff

Please sign in to comment.