Changed Classic max level logic.
This commit is contained in:
@@ -176,6 +176,7 @@ public final class Config
|
||||
public static byte BASE_SUBCLASS_LEVEL;
|
||||
public static byte BASE_DUALCLASS_LEVEL;
|
||||
public static byte MAX_SUBCLASS_LEVEL;
|
||||
public static byte MAX_CLASSIC_PLAYER_LEVEL;
|
||||
public static int MAX_PVTSTORESELL_SLOTS_DWARF;
|
||||
public static int MAX_PVTSTORESELL_SLOTS_OTHER;
|
||||
public static int MAX_PVTSTOREBUY_SLOTS_DWARF;
|
||||
@@ -1542,6 +1543,7 @@ public final class Config
|
||||
BASE_SUBCLASS_LEVEL = Character.getByte("BaseSubclassLevel", (byte) 40);
|
||||
BASE_DUALCLASS_LEVEL = Character.getByte("BaseDualclassLevel", (byte) 85);
|
||||
MAX_SUBCLASS_LEVEL = Character.getByte("MaxSubclassLevel", (byte) 80);
|
||||
MAX_CLASSIC_PLAYER_LEVEL = Character.getByte("MaxClassicPlayerLevel", (byte) 75);
|
||||
MAX_PVTSTORESELL_SLOTS_DWARF = Character.getInt("MaxPvtStoreSellSlotsDwarf", 4);
|
||||
MAX_PVTSTORESELL_SLOTS_OTHER = Character.getInt("MaxPvtStoreSellSlotsOther", 3);
|
||||
MAX_PVTSTOREBUY_SLOTS_DWARF = Character.getInt("MaxPvtStoreBuySlotsDwarf", 5);
|
||||
|
@@ -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