Changed Classic max level logic.

This commit is contained in:
MobiusDev
2015-04-30 22:30:01 +00:00
parent 9dceacb328
commit 7129d00210
6 changed files with 18 additions and 87 deletions

View File

@ -83,6 +83,10 @@ public class PcStat extends PlayableStat
{
return false;
}
if (Config.SERVER_CLASSIC_SUPPORT && (getActiveChar().getLevel() >= Config.MAX_CLASSIC_PLAYER_LEVEL))
{
return false;
}
if (!super.addExp(value))
{
@ -457,9 +461,9 @@ public class PcStat extends PlayableStat
@Override
public final void setLevel(byte value)
{
if (value > (ExperienceData.getInstance().getMaxLevel() - 1))
if (value > (Config.SERVER_CLASSIC_SUPPORT ? Config.MAX_CLASSIC_PLAYER_LEVEL : ExperienceData.getInstance().getMaxLevel() - 1))
{
value = (byte) (ExperienceData.getInstance().getMaxLevel() - 1);
value = Config.SERVER_CLASSIC_SUPPORT ? Config.MAX_CLASSIC_PLAYER_LEVEL : (byte) (ExperienceData.getInstance().getMaxLevel() - 1);
}
if (getActiveChar().isSubClassActive())