More party members = more XP share bonus

Sorry, broke your party settings in config.yml. So now when there are
more party members near, the party share bonus is increased. :)
This commit is contained in:
TfT_02
2013-02-04 17:20:45 +01:00
parent ac1d556895
commit 6d5ce1357e
3 changed files with 11 additions and 3 deletions

View File

@ -50,7 +50,11 @@ public final class ShareHandler {
}
double partySize = nearMembers.size() + 1;
double splitXp = xp / partySize * Config.getInstance().getPartyShareBonus();
double shareBonus = Config.getInstance().getPartyShareBonusBase() + partySize * Config.getInstance().getPartyShareBonusIncrease();
if (shareBonus > Config.getInstance().getPartyShareBonusCap()) {
shareBonus = Config.getInstance().getPartyShareBonusCap();
}
double splitXp = xp / partySize * shareBonus;
int roundedXp = (int) Math.ceil(splitXp);
for (Player member : nearMembers) {