Changed Classic max level logic.
This commit is contained in:
@@ -25,7 +25,6 @@ import org.w3c.dom.Document;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.util.data.xml.IXmlReader;
|
||||
|
||||
/**
|
||||
@@ -51,7 +50,7 @@ public final class ExperienceData implements IXmlReader
|
||||
public void load()
|
||||
{
|
||||
_expTable.clear();
|
||||
parseDatapackFile(Config.SERVER_CLASSIC_SUPPORT ? "data/stats/classic_experience.xml" : "data/stats/experience.xml");
|
||||
parseDatapackFile("data/stats/experience.xml");
|
||||
LOGGER.info(getClass().getSimpleName() + ": Loaded " + _expTable.size() + " levels.");
|
||||
LOGGER.info(getClass().getSimpleName() + ": Max Player Level is: " + (MAX_LEVEL - 1));
|
||||
LOGGER.info(getClass().getSimpleName() + ": Max Pet Level is: " + (MAX_PET_LEVEL - 1));
|
||||
|
@@ -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())
|
||||
|
Reference in New Issue
Block a user