Add per-skill XP boost perks.

Fixes #1412
This commit is contained in:
GJ
2013-09-03 09:24:58 -04:00
parent 7eec53d621
commit a639a37637
6 changed files with 338 additions and 22 deletions

View File

@@ -43,20 +43,20 @@ public final class PerksUtils {
return ticks;
}
public static float handleXpPerks(Player player, float xp) {
if (Permissions.quadrupleXp(player)) {
public static float handleXpPerks(Player player, float xp, SkillType skill) {
if (Permissions.quadrupleXp(player, skill)) {
xp *= 4;
}
else if (Permissions.tripleXp(player)) {
else if (Permissions.tripleXp(player, skill)) {
xp *= 3;
}
else if (Permissions.doubleAndOneHalfXp(player)) {
else if (Permissions.doubleAndOneHalfXp(player, skill)) {
xp *= 2.5;
}
else if (Permissions.doubleXp(player)) {
else if (Permissions.doubleXp(player, skill)) {
xp *= 2;
}
else if (Permissions.oneAndOneHalfXp(player)) {
else if (Permissions.oneAndOneHalfXp(player, skill)) {
xp *= 1.5;
}