Config for max player free teleport level.
This commit is contained in:
@ -272,6 +272,7 @@ public final class Config
|
||||
public static int MAX_PETITIONS_PER_PLAYER;
|
||||
public static int MAX_PETITIONS_PENDING;
|
||||
public static boolean ALT_GAME_FREE_TELEPORT;
|
||||
public static int MAX_FREE_TELEPORT_LEVEL;
|
||||
public static int DELETE_DAYS;
|
||||
public static String PARTY_XP_CUTOFF_METHOD;
|
||||
public static double PARTY_XP_CUTOFF_PERCENT;
|
||||
@ -1623,6 +1624,7 @@ public final class Config
|
||||
MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
||||
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
||||
ALT_GAME_FREE_TELEPORT = Character.getBoolean("AltFreeTeleporting", false);
|
||||
MAX_FREE_TELEPORT_LEVEL = Character.getInt("MaxFreeTeleportLevel", 0);
|
||||
DELETE_DAYS = Character.getInt("DeleteCharAfterDays", 1);
|
||||
PARTY_XP_CUTOFF_METHOD = Character.getString("PartyXpCutoffMethod", "level").toLowerCase();
|
||||
PARTY_XP_CUTOFF_PERCENT = Character.getDouble("PartyXpCutoffPercent", 3);
|
||||
|
@ -228,7 +228,7 @@ public final class L2TeleporterInstance extends L2Npc
|
||||
{
|
||||
if (type == TeleportType.NORMAL)
|
||||
{
|
||||
if (!player.isSubClassActive() && (player.getLevel() < 77))
|
||||
if (!player.isSubClassActive() && (player.getLevel() < (Config.MAX_FREE_TELEPORT_LEVEL + 1)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -246,7 +246,7 @@ public final class L2TeleporterInstance extends L2Npc
|
||||
|
||||
protected boolean shouldPayFee(L2PcInstance player, TeleportType type, TeleportLocation loc)
|
||||
{
|
||||
return (!Config.ALT_GAME_FREE_TELEPORT && ((player.getLevel() > 76) || player.isSubClassActive()) && ((loc.getFeeId() != 0) && (loc.getFeeCount() > 0)));
|
||||
return (!Config.ALT_GAME_FREE_TELEPORT && ((player.getLevel() > Config.MAX_FREE_TELEPORT_LEVEL) || player.isSubClassActive()) && ((loc.getFeeId() != 0) && (loc.getFeeCount() > 0)));
|
||||
}
|
||||
|
||||
protected int parseNextInt(StringTokenizer st, int defaultVal)
|
||||
|
Reference in New Issue
Block a user