Browse Source

2x xp for solo players without a group

lakebane-master
FatBoy-DOTC 8 months ago
parent
commit
17aee68575
  1. 4
      src/engine/objects/PlayerCharacter.java

4
src/engine/objects/PlayerCharacter.java

@ -2899,7 +2899,9 @@ public class PlayerCharacter extends AbstractCharacter { @@ -2899,7 +2899,9 @@ public class PlayerCharacter extends AbstractCharacter {
public synchronized void grantXP(int xp) {
xp *= Float.parseFloat(ConfigManager.MB_NORMAL_EXP_RATE.getValue());
if(GroupManager.getGroup(this) == null)
xp *= 2;
// Stop players from getting experience past the cap
if (this.exp + xp >= Experience.getBaseExperience(MBServerStatics.LEVELCAP))
xp = Experience.getBaseExperience(MBServerStatics.LEVELCAP) - this.exp + 1;

Loading…
Cancel
Save