Addition of teleport while siege in progress configuration.
Thanks to Iris.
This commit is contained in:
@@ -754,6 +754,10 @@ OffsetOnTeleportEnabled = True
|
|||||||
# Default: 50
|
# Default: 50
|
||||||
MaxOffsetOnTeleport = 50
|
MaxOffsetOnTeleport = 50
|
||||||
|
|
||||||
|
# Enable teleporting while siege in progress.
|
||||||
|
# Default: False
|
||||||
|
TeleportWhileSiegeInProgress = False
|
||||||
|
|
||||||
# This option is to enable or disable the use of in game petitions.
|
# This option is to enable or disable the use of in game petitions.
|
||||||
# The MaxPetitionsPerPlayer is the amount of petitions a player can make.
|
# The MaxPetitionsPerPlayer is the amount of petitions a player can make.
|
||||||
# The MaximumPendingPetitions is the total amount of petitions in the server.
|
# The MaximumPendingPetitions is the total amount of petitions in the server.
|
||||||
|
|||||||
@@ -283,6 +283,7 @@ public class Config
|
|||||||
public static boolean RANDOM_RESPAWN_IN_TOWN_ENABLED;
|
public static boolean RANDOM_RESPAWN_IN_TOWN_ENABLED;
|
||||||
public static boolean OFFSET_ON_TELEPORT_ENABLED;
|
public static boolean OFFSET_ON_TELEPORT_ENABLED;
|
||||||
public static int MAX_OFFSET_ON_TELEPORT;
|
public static int MAX_OFFSET_ON_TELEPORT;
|
||||||
|
public static boolean TELEPORT_WHILE_SIEGE_IN_PROGRESS;
|
||||||
public static boolean PETITIONING_ALLOWED;
|
public static boolean PETITIONING_ALLOWED;
|
||||||
public static int MAX_PETITIONS_PER_PLAYER;
|
public static int MAX_PETITIONS_PER_PLAYER;
|
||||||
public static int MAX_PETITIONS_PENDING;
|
public static int MAX_PETITIONS_PENDING;
|
||||||
@@ -1854,6 +1855,7 @@ public class Config
|
|||||||
RANDOM_RESPAWN_IN_TOWN_ENABLED = Character.getBoolean("RandomRespawnInTownEnabled", true);
|
RANDOM_RESPAWN_IN_TOWN_ENABLED = Character.getBoolean("RandomRespawnInTownEnabled", true);
|
||||||
OFFSET_ON_TELEPORT_ENABLED = Character.getBoolean("OffsetOnTeleportEnabled", true);
|
OFFSET_ON_TELEPORT_ENABLED = Character.getBoolean("OffsetOnTeleportEnabled", true);
|
||||||
MAX_OFFSET_ON_TELEPORT = Character.getInt("MaxOffsetOnTeleport", 50);
|
MAX_OFFSET_ON_TELEPORT = Character.getInt("MaxOffsetOnTeleport", 50);
|
||||||
|
TELEPORT_WHILE_SIEGE_IN_PROGRESS = Character.getBoolean("TeleportWhileSiegeInProgress", true);
|
||||||
PETITIONING_ALLOWED = Character.getBoolean("PetitioningAllowed", true);
|
PETITIONING_ALLOWED = Character.getBoolean("PetitioningAllowed", true);
|
||||||
MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
||||||
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
||||||
|
|||||||
+4
-1
@@ -206,6 +206,8 @@ public class TeleportHolder
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check if castle is in siege
|
// Check if castle is in siege
|
||||||
|
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS)
|
||||||
|
{
|
||||||
for (int castleId : loc.getCastleId())
|
for (int castleId : loc.getCastleId())
|
||||||
{
|
{
|
||||||
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
||||||
@@ -214,11 +216,12 @@ public class TeleportHolder
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Validate conditions for NORMAL teleport
|
// Validate conditions for NORMAL teleport
|
||||||
if (isNormalTeleport())
|
if (isNormalTeleport())
|
||||||
{
|
{
|
||||||
if (npc.getCastle().getSiege().isInProgress())
|
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS && npc.getCastle().getSiege().isInProgress())
|
||||||
{
|
{
|
||||||
final NpcHtmlMessage msg = new NpcHtmlMessage(npc.getObjectId());
|
final NpcHtmlMessage msg = new NpcHtmlMessage(npc.getObjectId());
|
||||||
msg.setFile(player, "data/html/teleporter/castleteleporter-busy.htm");
|
msg.setFile(player, "data/html/teleporter/castleteleporter-busy.htm");
|
||||||
|
|||||||
@@ -754,6 +754,10 @@ OffsetOnTeleportEnabled = True
|
|||||||
# Default: 50
|
# Default: 50
|
||||||
MaxOffsetOnTeleport = 50
|
MaxOffsetOnTeleport = 50
|
||||||
|
|
||||||
|
# Enable teleporting while siege in progress.
|
||||||
|
# Default: False
|
||||||
|
TeleportWhileSiegeInProgress = False
|
||||||
|
|
||||||
# This option is to enable or disable the use of in game petitions.
|
# This option is to enable or disable the use of in game petitions.
|
||||||
# The MaxPetitionsPerPlayer is the amount of petitions a player can make.
|
# The MaxPetitionsPerPlayer is the amount of petitions a player can make.
|
||||||
# The MaximumPendingPetitions is the total amount of petitions in the server.
|
# The MaximumPendingPetitions is the total amount of petitions in the server.
|
||||||
|
|||||||
@@ -289,6 +289,7 @@ public class Config
|
|||||||
public static boolean RANDOM_RESPAWN_IN_TOWN_ENABLED;
|
public static boolean RANDOM_RESPAWN_IN_TOWN_ENABLED;
|
||||||
public static boolean OFFSET_ON_TELEPORT_ENABLED;
|
public static boolean OFFSET_ON_TELEPORT_ENABLED;
|
||||||
public static int MAX_OFFSET_ON_TELEPORT;
|
public static int MAX_OFFSET_ON_TELEPORT;
|
||||||
|
public static boolean TELEPORT_WHILE_SIEGE_IN_PROGRESS;
|
||||||
public static boolean PETITIONING_ALLOWED;
|
public static boolean PETITIONING_ALLOWED;
|
||||||
public static int MAX_PETITIONS_PER_PLAYER;
|
public static int MAX_PETITIONS_PER_PLAYER;
|
||||||
public static int MAX_PETITIONS_PENDING;
|
public static int MAX_PETITIONS_PENDING;
|
||||||
@@ -1870,6 +1871,7 @@ public class Config
|
|||||||
RANDOM_RESPAWN_IN_TOWN_ENABLED = Character.getBoolean("RandomRespawnInTownEnabled", true);
|
RANDOM_RESPAWN_IN_TOWN_ENABLED = Character.getBoolean("RandomRespawnInTownEnabled", true);
|
||||||
OFFSET_ON_TELEPORT_ENABLED = Character.getBoolean("OffsetOnTeleportEnabled", true);
|
OFFSET_ON_TELEPORT_ENABLED = Character.getBoolean("OffsetOnTeleportEnabled", true);
|
||||||
MAX_OFFSET_ON_TELEPORT = Character.getInt("MaxOffsetOnTeleport", 50);
|
MAX_OFFSET_ON_TELEPORT = Character.getInt("MaxOffsetOnTeleport", 50);
|
||||||
|
TELEPORT_WHILE_SIEGE_IN_PROGRESS = Character.getBoolean("TeleportWhileSiegeInProgress", true);
|
||||||
PETITIONING_ALLOWED = Character.getBoolean("PetitioningAllowed", true);
|
PETITIONING_ALLOWED = Character.getBoolean("PetitioningAllowed", true);
|
||||||
MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
||||||
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
||||||
|
|||||||
+4
-1
@@ -206,6 +206,8 @@ public class TeleportHolder
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check if castle is in siege
|
// Check if castle is in siege
|
||||||
|
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS)
|
||||||
|
{
|
||||||
for (int castleId : loc.getCastleId())
|
for (int castleId : loc.getCastleId())
|
||||||
{
|
{
|
||||||
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
||||||
@@ -214,11 +216,12 @@ public class TeleportHolder
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Validate conditions for NORMAL teleport
|
// Validate conditions for NORMAL teleport
|
||||||
if (isNormalTeleport())
|
if (isNormalTeleport())
|
||||||
{
|
{
|
||||||
if (npc.getCastle().getSiege().isInProgress())
|
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS && npc.getCastle().getSiege().isInProgress())
|
||||||
{
|
{
|
||||||
final NpcHtmlMessage msg = new NpcHtmlMessage(npc.getObjectId());
|
final NpcHtmlMessage msg = new NpcHtmlMessage(npc.getObjectId());
|
||||||
msg.setFile(player, "data/html/teleporter/castleteleporter-busy.htm");
|
msg.setFile(player, "data/html/teleporter/castleteleporter-busy.htm");
|
||||||
|
|||||||
@@ -754,6 +754,10 @@ OffsetOnTeleportEnabled = True
|
|||||||
# Default: 50
|
# Default: 50
|
||||||
MaxOffsetOnTeleport = 50
|
MaxOffsetOnTeleport = 50
|
||||||
|
|
||||||
|
# Enable teleporting while siege in progress.
|
||||||
|
# Default: False
|
||||||
|
TeleportWhileSiegeInProgress = False
|
||||||
|
|
||||||
# This option is to enable or disable the use of in game petitions.
|
# This option is to enable or disable the use of in game petitions.
|
||||||
# The MaxPetitionsPerPlayer is the amount of petitions a player can make.
|
# The MaxPetitionsPerPlayer is the amount of petitions a player can make.
|
||||||
# The MaximumPendingPetitions is the total amount of petitions in the server.
|
# The MaximumPendingPetitions is the total amount of petitions in the server.
|
||||||
|
|||||||
@@ -289,6 +289,7 @@ public class Config
|
|||||||
public static boolean RANDOM_RESPAWN_IN_TOWN_ENABLED;
|
public static boolean RANDOM_RESPAWN_IN_TOWN_ENABLED;
|
||||||
public static boolean OFFSET_ON_TELEPORT_ENABLED;
|
public static boolean OFFSET_ON_TELEPORT_ENABLED;
|
||||||
public static int MAX_OFFSET_ON_TELEPORT;
|
public static int MAX_OFFSET_ON_TELEPORT;
|
||||||
|
public static boolean TELEPORT_WHILE_SIEGE_IN_PROGRESS;
|
||||||
public static boolean PETITIONING_ALLOWED;
|
public static boolean PETITIONING_ALLOWED;
|
||||||
public static int MAX_PETITIONS_PER_PLAYER;
|
public static int MAX_PETITIONS_PER_PLAYER;
|
||||||
public static int MAX_PETITIONS_PENDING;
|
public static int MAX_PETITIONS_PENDING;
|
||||||
@@ -1883,6 +1884,7 @@ public class Config
|
|||||||
RANDOM_RESPAWN_IN_TOWN_ENABLED = Character.getBoolean("RandomRespawnInTownEnabled", true);
|
RANDOM_RESPAWN_IN_TOWN_ENABLED = Character.getBoolean("RandomRespawnInTownEnabled", true);
|
||||||
OFFSET_ON_TELEPORT_ENABLED = Character.getBoolean("OffsetOnTeleportEnabled", true);
|
OFFSET_ON_TELEPORT_ENABLED = Character.getBoolean("OffsetOnTeleportEnabled", true);
|
||||||
MAX_OFFSET_ON_TELEPORT = Character.getInt("MaxOffsetOnTeleport", 50);
|
MAX_OFFSET_ON_TELEPORT = Character.getInt("MaxOffsetOnTeleport", 50);
|
||||||
|
TELEPORT_WHILE_SIEGE_IN_PROGRESS = Character.getBoolean("TeleportWhileSiegeInProgress", true);
|
||||||
PETITIONING_ALLOWED = Character.getBoolean("PetitioningAllowed", true);
|
PETITIONING_ALLOWED = Character.getBoolean("PetitioningAllowed", true);
|
||||||
MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
||||||
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
||||||
|
|||||||
+4
-1
@@ -206,6 +206,8 @@ public class TeleportHolder
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check if castle is in siege
|
// Check if castle is in siege
|
||||||
|
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS)
|
||||||
|
{
|
||||||
for (int castleId : loc.getCastleId())
|
for (int castleId : loc.getCastleId())
|
||||||
{
|
{
|
||||||
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
||||||
@@ -214,11 +216,12 @@ public class TeleportHolder
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Validate conditions for NORMAL teleport
|
// Validate conditions for NORMAL teleport
|
||||||
if (isNormalTeleport())
|
if (isNormalTeleport())
|
||||||
{
|
{
|
||||||
if (npc.getCastle().getSiege().isInProgress())
|
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS && npc.getCastle().getSiege().isInProgress())
|
||||||
{
|
{
|
||||||
final NpcHtmlMessage msg = new NpcHtmlMessage(npc.getObjectId());
|
final NpcHtmlMessage msg = new NpcHtmlMessage(npc.getObjectId());
|
||||||
msg.setFile(player, "data/html/teleporter/castleteleporter-busy.htm");
|
msg.setFile(player, "data/html/teleporter/castleteleporter-busy.htm");
|
||||||
|
|||||||
@@ -730,6 +730,10 @@ OffsetOnTeleportEnabled = True
|
|||||||
# Default: 50
|
# Default: 50
|
||||||
MaxOffsetOnTeleport = 50
|
MaxOffsetOnTeleport = 50
|
||||||
|
|
||||||
|
# Enable teleporting while siege in progress.
|
||||||
|
# Default: False
|
||||||
|
TeleportWhileSiegeInProgress = False
|
||||||
|
|
||||||
# This option is to enable or disable the use of in game petitions.
|
# This option is to enable or disable the use of in game petitions.
|
||||||
# The MaxPetitionsPerPlayer is the amount of petitions a player can make.
|
# The MaxPetitionsPerPlayer is the amount of petitions a player can make.
|
||||||
# The MaximumPendingPetitions is the total amount of petitions in the server.
|
# The MaximumPendingPetitions is the total amount of petitions in the server.
|
||||||
|
|||||||
@@ -283,6 +283,7 @@ public class Config
|
|||||||
public static boolean RANDOM_RESPAWN_IN_TOWN_ENABLED;
|
public static boolean RANDOM_RESPAWN_IN_TOWN_ENABLED;
|
||||||
public static boolean OFFSET_ON_TELEPORT_ENABLED;
|
public static boolean OFFSET_ON_TELEPORT_ENABLED;
|
||||||
public static int MAX_OFFSET_ON_TELEPORT;
|
public static int MAX_OFFSET_ON_TELEPORT;
|
||||||
|
public static boolean TELEPORT_WHILE_SIEGE_IN_PROGRESS;
|
||||||
public static boolean PETITIONING_ALLOWED;
|
public static boolean PETITIONING_ALLOWED;
|
||||||
public static int MAX_PETITIONS_PER_PLAYER;
|
public static int MAX_PETITIONS_PER_PLAYER;
|
||||||
public static int MAX_PETITIONS_PENDING;
|
public static int MAX_PETITIONS_PENDING;
|
||||||
@@ -1864,6 +1865,7 @@ public class Config
|
|||||||
RANDOM_RESPAWN_IN_TOWN_ENABLED = Character.getBoolean("RandomRespawnInTownEnabled", true);
|
RANDOM_RESPAWN_IN_TOWN_ENABLED = Character.getBoolean("RandomRespawnInTownEnabled", true);
|
||||||
OFFSET_ON_TELEPORT_ENABLED = Character.getBoolean("OffsetOnTeleportEnabled", true);
|
OFFSET_ON_TELEPORT_ENABLED = Character.getBoolean("OffsetOnTeleportEnabled", true);
|
||||||
MAX_OFFSET_ON_TELEPORT = Character.getInt("MaxOffsetOnTeleport", 50);
|
MAX_OFFSET_ON_TELEPORT = Character.getInt("MaxOffsetOnTeleport", 50);
|
||||||
|
TELEPORT_WHILE_SIEGE_IN_PROGRESS = Character.getBoolean("TeleportWhileSiegeInProgress", true);
|
||||||
PETITIONING_ALLOWED = Character.getBoolean("PetitioningAllowed", true);
|
PETITIONING_ALLOWED = Character.getBoolean("PetitioningAllowed", true);
|
||||||
MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
||||||
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
||||||
|
|||||||
+4
-1
@@ -206,6 +206,8 @@ public class TeleportHolder
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check if castle is in siege
|
// Check if castle is in siege
|
||||||
|
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS)
|
||||||
|
{
|
||||||
for (int castleId : loc.getCastleId())
|
for (int castleId : loc.getCastleId())
|
||||||
{
|
{
|
||||||
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
||||||
@@ -214,11 +216,12 @@ public class TeleportHolder
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Validate conditions for NORMAL teleport
|
// Validate conditions for NORMAL teleport
|
||||||
if (isNormalTeleport())
|
if (isNormalTeleport())
|
||||||
{
|
{
|
||||||
if (npc.getCastle().getSiege().isInProgress())
|
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS && npc.getCastle().getSiege().isInProgress())
|
||||||
{
|
{
|
||||||
final NpcHtmlMessage msg = new NpcHtmlMessage(npc.getObjectId());
|
final NpcHtmlMessage msg = new NpcHtmlMessage(npc.getObjectId());
|
||||||
msg.setFile(player, "data/html/teleporter/castleteleporter-busy.htm");
|
msg.setFile(player, "data/html/teleporter/castleteleporter-busy.htm");
|
||||||
|
|||||||
@@ -730,6 +730,10 @@ OffsetOnTeleportEnabled = True
|
|||||||
# Default: 50
|
# Default: 50
|
||||||
MaxOffsetOnTeleport = 50
|
MaxOffsetOnTeleport = 50
|
||||||
|
|
||||||
|
# Enable teleporting while siege in progress.
|
||||||
|
# Default: False
|
||||||
|
TeleportWhileSiegeInProgress = False
|
||||||
|
|
||||||
# This option is to enable or disable the use of in game petitions.
|
# This option is to enable or disable the use of in game petitions.
|
||||||
# The MaxPetitionsPerPlayer is the amount of petitions a player can make.
|
# The MaxPetitionsPerPlayer is the amount of petitions a player can make.
|
||||||
# The MaximumPendingPetitions is the total amount of petitions in the server.
|
# The MaximumPendingPetitions is the total amount of petitions in the server.
|
||||||
|
|||||||
@@ -290,6 +290,7 @@ public class Config
|
|||||||
public static boolean RANDOM_RESPAWN_IN_TOWN_ENABLED;
|
public static boolean RANDOM_RESPAWN_IN_TOWN_ENABLED;
|
||||||
public static boolean OFFSET_ON_TELEPORT_ENABLED;
|
public static boolean OFFSET_ON_TELEPORT_ENABLED;
|
||||||
public static int MAX_OFFSET_ON_TELEPORT;
|
public static int MAX_OFFSET_ON_TELEPORT;
|
||||||
|
public static boolean TELEPORT_WHILE_SIEGE_IN_PROGRESS;
|
||||||
public static boolean PETITIONING_ALLOWED;
|
public static boolean PETITIONING_ALLOWED;
|
||||||
public static int MAX_PETITIONS_PER_PLAYER;
|
public static int MAX_PETITIONS_PER_PLAYER;
|
||||||
public static int MAX_PETITIONS_PENDING;
|
public static int MAX_PETITIONS_PENDING;
|
||||||
@@ -1865,6 +1866,7 @@ public class Config
|
|||||||
RANDOM_RESPAWN_IN_TOWN_ENABLED = Character.getBoolean("RandomRespawnInTownEnabled", true);
|
RANDOM_RESPAWN_IN_TOWN_ENABLED = Character.getBoolean("RandomRespawnInTownEnabled", true);
|
||||||
OFFSET_ON_TELEPORT_ENABLED = Character.getBoolean("OffsetOnTeleportEnabled", true);
|
OFFSET_ON_TELEPORT_ENABLED = Character.getBoolean("OffsetOnTeleportEnabled", true);
|
||||||
MAX_OFFSET_ON_TELEPORT = Character.getInt("MaxOffsetOnTeleport", 50);
|
MAX_OFFSET_ON_TELEPORT = Character.getInt("MaxOffsetOnTeleport", 50);
|
||||||
|
TELEPORT_WHILE_SIEGE_IN_PROGRESS = Character.getBoolean("TeleportWhileSiegeInProgress", true);
|
||||||
PETITIONING_ALLOWED = Character.getBoolean("PetitioningAllowed", true);
|
PETITIONING_ALLOWED = Character.getBoolean("PetitioningAllowed", true);
|
||||||
MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
||||||
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
||||||
|
|||||||
+4
-1
@@ -206,6 +206,8 @@ public class TeleportHolder
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check if castle is in siege
|
// Check if castle is in siege
|
||||||
|
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS)
|
||||||
|
{
|
||||||
for (int castleId : loc.getCastleId())
|
for (int castleId : loc.getCastleId())
|
||||||
{
|
{
|
||||||
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
||||||
@@ -214,11 +216,12 @@ public class TeleportHolder
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Validate conditions for NORMAL teleport
|
// Validate conditions for NORMAL teleport
|
||||||
if (isNormalTeleport())
|
if (isNormalTeleport())
|
||||||
{
|
{
|
||||||
if (npc.getCastle().getSiege().isInProgress())
|
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS && npc.getCastle().getSiege().isInProgress())
|
||||||
{
|
{
|
||||||
final NpcHtmlMessage msg = new NpcHtmlMessage(npc.getObjectId());
|
final NpcHtmlMessage msg = new NpcHtmlMessage(npc.getObjectId());
|
||||||
msg.setFile(player, "data/html/teleporter/castleteleporter-busy.htm");
|
msg.setFile(player, "data/html/teleporter/castleteleporter-busy.htm");
|
||||||
|
|||||||
@@ -730,6 +730,10 @@ OffsetOnTeleportEnabled = True
|
|||||||
# Default: 50
|
# Default: 50
|
||||||
MaxOffsetOnTeleport = 50
|
MaxOffsetOnTeleport = 50
|
||||||
|
|
||||||
|
# Enable teleporting while siege in progress.
|
||||||
|
# Default: False
|
||||||
|
TeleportWhileSiegeInProgress = False
|
||||||
|
|
||||||
# This option is to enable or disable the use of in game petitions.
|
# This option is to enable or disable the use of in game petitions.
|
||||||
# The MaxPetitionsPerPlayer is the amount of petitions a player can make.
|
# The MaxPetitionsPerPlayer is the amount of petitions a player can make.
|
||||||
# The MaximumPendingPetitions is the total amount of petitions in the server.
|
# The MaximumPendingPetitions is the total amount of petitions in the server.
|
||||||
|
|||||||
@@ -290,6 +290,7 @@ public class Config
|
|||||||
public static boolean RANDOM_RESPAWN_IN_TOWN_ENABLED;
|
public static boolean RANDOM_RESPAWN_IN_TOWN_ENABLED;
|
||||||
public static boolean OFFSET_ON_TELEPORT_ENABLED;
|
public static boolean OFFSET_ON_TELEPORT_ENABLED;
|
||||||
public static int MAX_OFFSET_ON_TELEPORT;
|
public static int MAX_OFFSET_ON_TELEPORT;
|
||||||
|
public static boolean TELEPORT_WHILE_SIEGE_IN_PROGRESS;
|
||||||
public static boolean PETITIONING_ALLOWED;
|
public static boolean PETITIONING_ALLOWED;
|
||||||
public static int MAX_PETITIONS_PER_PLAYER;
|
public static int MAX_PETITIONS_PER_PLAYER;
|
||||||
public static int MAX_PETITIONS_PENDING;
|
public static int MAX_PETITIONS_PENDING;
|
||||||
@@ -1872,6 +1873,7 @@ public class Config
|
|||||||
RANDOM_RESPAWN_IN_TOWN_ENABLED = Character.getBoolean("RandomRespawnInTownEnabled", true);
|
RANDOM_RESPAWN_IN_TOWN_ENABLED = Character.getBoolean("RandomRespawnInTownEnabled", true);
|
||||||
OFFSET_ON_TELEPORT_ENABLED = Character.getBoolean("OffsetOnTeleportEnabled", true);
|
OFFSET_ON_TELEPORT_ENABLED = Character.getBoolean("OffsetOnTeleportEnabled", true);
|
||||||
MAX_OFFSET_ON_TELEPORT = Character.getInt("MaxOffsetOnTeleport", 50);
|
MAX_OFFSET_ON_TELEPORT = Character.getInt("MaxOffsetOnTeleport", 50);
|
||||||
|
TELEPORT_WHILE_SIEGE_IN_PROGRESS = Character.getBoolean("TeleportWhileSiegeInProgress", true);
|
||||||
PETITIONING_ALLOWED = Character.getBoolean("PetitioningAllowed", true);
|
PETITIONING_ALLOWED = Character.getBoolean("PetitioningAllowed", true);
|
||||||
MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
||||||
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
||||||
|
|||||||
+4
-1
@@ -206,6 +206,8 @@ public class TeleportHolder
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check if castle is in siege
|
// Check if castle is in siege
|
||||||
|
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS)
|
||||||
|
{
|
||||||
for (int castleId : loc.getCastleId())
|
for (int castleId : loc.getCastleId())
|
||||||
{
|
{
|
||||||
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
||||||
@@ -214,11 +216,12 @@ public class TeleportHolder
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Validate conditions for NORMAL teleport
|
// Validate conditions for NORMAL teleport
|
||||||
if (isNormalTeleport())
|
if (isNormalTeleport())
|
||||||
{
|
{
|
||||||
if (npc.getCastle().getSiege().isInProgress())
|
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS && npc.getCastle().getSiege().isInProgress())
|
||||||
{
|
{
|
||||||
final NpcHtmlMessage msg = new NpcHtmlMessage(npc.getObjectId());
|
final NpcHtmlMessage msg = new NpcHtmlMessage(npc.getObjectId());
|
||||||
msg.setFile(player, "data/html/teleporter/castleteleporter-busy.htm");
|
msg.setFile(player, "data/html/teleporter/castleteleporter-busy.htm");
|
||||||
|
|||||||
@@ -750,6 +750,10 @@ OffsetOnTeleportEnabled = True
|
|||||||
# Default: 50
|
# Default: 50
|
||||||
MaxOffsetOnTeleport = 50
|
MaxOffsetOnTeleport = 50
|
||||||
|
|
||||||
|
# Enable teleporting while siege in progress.
|
||||||
|
# Default: False
|
||||||
|
TeleportWhileSiegeInProgress = False
|
||||||
|
|
||||||
# This option is to enable or disable the use of in game petitions.
|
# This option is to enable or disable the use of in game petitions.
|
||||||
# The MaxPetitionsPerPlayer is the amount of petitions a player can make.
|
# The MaxPetitionsPerPlayer is the amount of petitions a player can make.
|
||||||
# The MaximumPendingPetitions is the total amount of petitions in the server.
|
# The MaximumPendingPetitions is the total amount of petitions in the server.
|
||||||
|
|||||||
@@ -291,6 +291,7 @@ public class Config
|
|||||||
public static boolean RANDOM_RESPAWN_IN_TOWN_ENABLED;
|
public static boolean RANDOM_RESPAWN_IN_TOWN_ENABLED;
|
||||||
public static boolean OFFSET_ON_TELEPORT_ENABLED;
|
public static boolean OFFSET_ON_TELEPORT_ENABLED;
|
||||||
public static int MAX_OFFSET_ON_TELEPORT;
|
public static int MAX_OFFSET_ON_TELEPORT;
|
||||||
|
public static boolean TELEPORT_WHILE_SIEGE_IN_PROGRESS;
|
||||||
public static boolean PETITIONING_ALLOWED;
|
public static boolean PETITIONING_ALLOWED;
|
||||||
public static int MAX_PETITIONS_PER_PLAYER;
|
public static int MAX_PETITIONS_PER_PLAYER;
|
||||||
public static int MAX_PETITIONS_PENDING;
|
public static int MAX_PETITIONS_PENDING;
|
||||||
@@ -1911,6 +1912,7 @@ public class Config
|
|||||||
RANDOM_RESPAWN_IN_TOWN_ENABLED = Character.getBoolean("RandomRespawnInTownEnabled", true);
|
RANDOM_RESPAWN_IN_TOWN_ENABLED = Character.getBoolean("RandomRespawnInTownEnabled", true);
|
||||||
OFFSET_ON_TELEPORT_ENABLED = Character.getBoolean("OffsetOnTeleportEnabled", true);
|
OFFSET_ON_TELEPORT_ENABLED = Character.getBoolean("OffsetOnTeleportEnabled", true);
|
||||||
MAX_OFFSET_ON_TELEPORT = Character.getInt("MaxOffsetOnTeleport", 50);
|
MAX_OFFSET_ON_TELEPORT = Character.getInt("MaxOffsetOnTeleport", 50);
|
||||||
|
TELEPORT_WHILE_SIEGE_IN_PROGRESS = Character.getBoolean("TeleportWhileSiegeInProgress", true);
|
||||||
PETITIONING_ALLOWED = Character.getBoolean("PetitioningAllowed", true);
|
PETITIONING_ALLOWED = Character.getBoolean("PetitioningAllowed", true);
|
||||||
MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
||||||
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
||||||
|
|||||||
+4
-1
@@ -206,6 +206,8 @@ public class TeleportHolder
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check if castle is in siege
|
// Check if castle is in siege
|
||||||
|
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS)
|
||||||
|
{
|
||||||
for (int castleId : loc.getCastleId())
|
for (int castleId : loc.getCastleId())
|
||||||
{
|
{
|
||||||
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
||||||
@@ -214,11 +216,12 @@ public class TeleportHolder
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Validate conditions for NORMAL teleport
|
// Validate conditions for NORMAL teleport
|
||||||
if (isNormalTeleport())
|
if (isNormalTeleport())
|
||||||
{
|
{
|
||||||
if (npc.getCastle().getSiege().isInProgress())
|
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS && npc.getCastle().getSiege().isInProgress())
|
||||||
{
|
{
|
||||||
final NpcHtmlMessage msg = new NpcHtmlMessage(npc.getObjectId());
|
final NpcHtmlMessage msg = new NpcHtmlMessage(npc.getObjectId());
|
||||||
msg.setFile(player, "data/html/teleporter/castleteleporter-busy.htm");
|
msg.setFile(player, "data/html/teleporter/castleteleporter-busy.htm");
|
||||||
|
|||||||
@@ -760,6 +760,10 @@ OffsetOnTeleportEnabled = True
|
|||||||
# Default: 50
|
# Default: 50
|
||||||
MaxOffsetOnTeleport = 50
|
MaxOffsetOnTeleport = 50
|
||||||
|
|
||||||
|
# Enable teleporting while siege in progress.
|
||||||
|
# Default: False
|
||||||
|
TeleportWhileSiegeInProgress = False
|
||||||
|
|
||||||
# This option is to enable or disable the use of in game petitions.
|
# This option is to enable or disable the use of in game petitions.
|
||||||
# The MaxPetitionsPerPlayer is the amount of petitions a player can make.
|
# The MaxPetitionsPerPlayer is the amount of petitions a player can make.
|
||||||
# The MaximumPendingPetitions is the total amount of petitions in the server.
|
# The MaximumPendingPetitions is the total amount of petitions in the server.
|
||||||
|
|||||||
@@ -292,6 +292,7 @@ public class Config
|
|||||||
public static boolean RANDOM_RESPAWN_IN_TOWN_ENABLED;
|
public static boolean RANDOM_RESPAWN_IN_TOWN_ENABLED;
|
||||||
public static boolean OFFSET_ON_TELEPORT_ENABLED;
|
public static boolean OFFSET_ON_TELEPORT_ENABLED;
|
||||||
public static int MAX_OFFSET_ON_TELEPORT;
|
public static int MAX_OFFSET_ON_TELEPORT;
|
||||||
|
public static boolean TELEPORT_WHILE_SIEGE_IN_PROGRESS;
|
||||||
public static boolean PETITIONING_ALLOWED;
|
public static boolean PETITIONING_ALLOWED;
|
||||||
public static int MAX_PETITIONS_PER_PLAYER;
|
public static int MAX_PETITIONS_PER_PLAYER;
|
||||||
public static int MAX_PETITIONS_PENDING;
|
public static int MAX_PETITIONS_PENDING;
|
||||||
@@ -1923,6 +1924,7 @@ public class Config
|
|||||||
RANDOM_RESPAWN_IN_TOWN_ENABLED = Character.getBoolean("RandomRespawnInTownEnabled", true);
|
RANDOM_RESPAWN_IN_TOWN_ENABLED = Character.getBoolean("RandomRespawnInTownEnabled", true);
|
||||||
OFFSET_ON_TELEPORT_ENABLED = Character.getBoolean("OffsetOnTeleportEnabled", true);
|
OFFSET_ON_TELEPORT_ENABLED = Character.getBoolean("OffsetOnTeleportEnabled", true);
|
||||||
MAX_OFFSET_ON_TELEPORT = Character.getInt("MaxOffsetOnTeleport", 50);
|
MAX_OFFSET_ON_TELEPORT = Character.getInt("MaxOffsetOnTeleport", 50);
|
||||||
|
TELEPORT_WHILE_SIEGE_IN_PROGRESS = Character.getBoolean("TeleportWhileSiegeInProgress", true);
|
||||||
PETITIONING_ALLOWED = Character.getBoolean("PetitioningAllowed", true);
|
PETITIONING_ALLOWED = Character.getBoolean("PetitioningAllowed", true);
|
||||||
MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
||||||
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
||||||
|
|||||||
+4
-1
@@ -206,6 +206,8 @@ public class TeleportHolder
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check if castle is in siege
|
// Check if castle is in siege
|
||||||
|
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS)
|
||||||
|
{
|
||||||
for (int castleId : loc.getCastleId())
|
for (int castleId : loc.getCastleId())
|
||||||
{
|
{
|
||||||
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
||||||
@@ -214,11 +216,12 @@ public class TeleportHolder
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Validate conditions for NORMAL teleport
|
// Validate conditions for NORMAL teleport
|
||||||
if (isNormalTeleport())
|
if (isNormalTeleport())
|
||||||
{
|
{
|
||||||
if (npc.getCastle().getSiege().isInProgress())
|
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS && npc.getCastle().getSiege().isInProgress())
|
||||||
{
|
{
|
||||||
final NpcHtmlMessage msg = new NpcHtmlMessage(npc.getObjectId());
|
final NpcHtmlMessage msg = new NpcHtmlMessage(npc.getObjectId());
|
||||||
msg.setFile(player, "data/html/teleporter/castleteleporter-busy.htm");
|
msg.setFile(player, "data/html/teleporter/castleteleporter-busy.htm");
|
||||||
|
|||||||
+3
@@ -63,12 +63,15 @@ public class ExRequestTeleport implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS)
|
||||||
|
{
|
||||||
final Castle castle = CastleManager.getInstance().getCastle(teleport.getX(), teleport.getY(), teleport.getZ());
|
final Castle castle = CastleManager.getInstance().getCastle(teleport.getX(), teleport.getY(), teleport.getZ());
|
||||||
if ((castle != null) && castle.getSiege().isInProgress())
|
if ((castle != null) && castle.getSiege().isInProgress())
|
||||||
{
|
{
|
||||||
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
|
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (player.getLevel() > Config.MAX_FREE_TELEPORT_LEVEL)
|
if (player.getLevel() > Config.MAX_FREE_TELEPORT_LEVEL)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -669,6 +669,10 @@ OffsetOnTeleportEnabled = True
|
|||||||
# Default: 50
|
# Default: 50
|
||||||
MaxOffsetOnTeleport = 50
|
MaxOffsetOnTeleport = 50
|
||||||
|
|
||||||
|
# Enable teleporting while siege in progress.
|
||||||
|
# Classic: True
|
||||||
|
TeleportWhileSiegeInProgress = True
|
||||||
|
|
||||||
# This option is to enable or disable the use of in game petitions.
|
# This option is to enable or disable the use of in game petitions.
|
||||||
# The MaxPetitionsPerPlayer is the amount of petitions a player can make.
|
# The MaxPetitionsPerPlayer is the amount of petitions a player can make.
|
||||||
# The MaximumPendingPetitions is the total amount of petitions in the server.
|
# The MaximumPendingPetitions is the total amount of petitions in the server.
|
||||||
|
|||||||
@@ -288,6 +288,7 @@ public class Config
|
|||||||
public static boolean RANDOM_RESPAWN_IN_TOWN_ENABLED;
|
public static boolean RANDOM_RESPAWN_IN_TOWN_ENABLED;
|
||||||
public static boolean OFFSET_ON_TELEPORT_ENABLED;
|
public static boolean OFFSET_ON_TELEPORT_ENABLED;
|
||||||
public static int MAX_OFFSET_ON_TELEPORT;
|
public static int MAX_OFFSET_ON_TELEPORT;
|
||||||
|
public static boolean TELEPORT_WHILE_SIEGE_IN_PROGRESS;
|
||||||
public static boolean PETITIONING_ALLOWED;
|
public static boolean PETITIONING_ALLOWED;
|
||||||
public static int MAX_PETITIONS_PER_PLAYER;
|
public static int MAX_PETITIONS_PER_PLAYER;
|
||||||
public static int MAX_PETITIONS_PENDING;
|
public static int MAX_PETITIONS_PENDING;
|
||||||
@@ -1780,6 +1781,7 @@ public class Config
|
|||||||
RANDOM_RESPAWN_IN_TOWN_ENABLED = Character.getBoolean("RandomRespawnInTownEnabled", true);
|
RANDOM_RESPAWN_IN_TOWN_ENABLED = Character.getBoolean("RandomRespawnInTownEnabled", true);
|
||||||
OFFSET_ON_TELEPORT_ENABLED = Character.getBoolean("OffsetOnTeleportEnabled", true);
|
OFFSET_ON_TELEPORT_ENABLED = Character.getBoolean("OffsetOnTeleportEnabled", true);
|
||||||
MAX_OFFSET_ON_TELEPORT = Character.getInt("MaxOffsetOnTeleport", 50);
|
MAX_OFFSET_ON_TELEPORT = Character.getInt("MaxOffsetOnTeleport", 50);
|
||||||
|
TELEPORT_WHILE_SIEGE_IN_PROGRESS = Character.getBoolean("TeleportWhileSiegeInProgress", true);
|
||||||
PETITIONING_ALLOWED = Character.getBoolean("PetitioningAllowed", true);
|
PETITIONING_ALLOWED = Character.getBoolean("PetitioningAllowed", true);
|
||||||
MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
||||||
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
||||||
|
|||||||
+4
-1
@@ -206,6 +206,8 @@ public class TeleportHolder
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check if castle is in siege
|
// Check if castle is in siege
|
||||||
|
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS)
|
||||||
|
{
|
||||||
for (int castleId : loc.getCastleId())
|
for (int castleId : loc.getCastleId())
|
||||||
{
|
{
|
||||||
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
||||||
@@ -214,11 +216,12 @@ public class TeleportHolder
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Validate conditions for NORMAL teleport
|
// Validate conditions for NORMAL teleport
|
||||||
if (isNormalTeleport())
|
if (isNormalTeleport())
|
||||||
{
|
{
|
||||||
if (npc.getCastle().getSiege().isInProgress())
|
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS && npc.getCastle().getSiege().isInProgress())
|
||||||
{
|
{
|
||||||
final NpcHtmlMessage msg = new NpcHtmlMessage(npc.getObjectId());
|
final NpcHtmlMessage msg = new NpcHtmlMessage(npc.getObjectId());
|
||||||
msg.setFile(player, "data/html/teleporter/castleteleporter-busy.htm");
|
msg.setFile(player, "data/html/teleporter/castleteleporter-busy.htm");
|
||||||
|
|||||||
@@ -669,6 +669,10 @@ OffsetOnTeleportEnabled = True
|
|||||||
# Default: 50
|
# Default: 50
|
||||||
MaxOffsetOnTeleport = 50
|
MaxOffsetOnTeleport = 50
|
||||||
|
|
||||||
|
# Enable teleporting while siege in progress.
|
||||||
|
# Classic: True
|
||||||
|
TeleportWhileSiegeInProgress = True
|
||||||
|
|
||||||
# This option is to enable or disable the use of in game petitions.
|
# This option is to enable or disable the use of in game petitions.
|
||||||
# The MaxPetitionsPerPlayer is the amount of petitions a player can make.
|
# The MaxPetitionsPerPlayer is the amount of petitions a player can make.
|
||||||
# The MaximumPendingPetitions is the total amount of petitions in the server.
|
# The MaximumPendingPetitions is the total amount of petitions in the server.
|
||||||
|
|||||||
@@ -288,6 +288,7 @@ public class Config
|
|||||||
public static boolean RANDOM_RESPAWN_IN_TOWN_ENABLED;
|
public static boolean RANDOM_RESPAWN_IN_TOWN_ENABLED;
|
||||||
public static boolean OFFSET_ON_TELEPORT_ENABLED;
|
public static boolean OFFSET_ON_TELEPORT_ENABLED;
|
||||||
public static int MAX_OFFSET_ON_TELEPORT;
|
public static int MAX_OFFSET_ON_TELEPORT;
|
||||||
|
public static boolean TELEPORT_WHILE_SIEGE_IN_PROGRESS;
|
||||||
public static boolean PETITIONING_ALLOWED;
|
public static boolean PETITIONING_ALLOWED;
|
||||||
public static int MAX_PETITIONS_PER_PLAYER;
|
public static int MAX_PETITIONS_PER_PLAYER;
|
||||||
public static int MAX_PETITIONS_PENDING;
|
public static int MAX_PETITIONS_PENDING;
|
||||||
@@ -1784,6 +1785,7 @@ public class Config
|
|||||||
RANDOM_RESPAWN_IN_TOWN_ENABLED = Character.getBoolean("RandomRespawnInTownEnabled", true);
|
RANDOM_RESPAWN_IN_TOWN_ENABLED = Character.getBoolean("RandomRespawnInTownEnabled", true);
|
||||||
OFFSET_ON_TELEPORT_ENABLED = Character.getBoolean("OffsetOnTeleportEnabled", true);
|
OFFSET_ON_TELEPORT_ENABLED = Character.getBoolean("OffsetOnTeleportEnabled", true);
|
||||||
MAX_OFFSET_ON_TELEPORT = Character.getInt("MaxOffsetOnTeleport", 50);
|
MAX_OFFSET_ON_TELEPORT = Character.getInt("MaxOffsetOnTeleport", 50);
|
||||||
|
TELEPORT_WHILE_SIEGE_IN_PROGRESS = Character.getBoolean("TeleportWhileSiegeInProgress", true);
|
||||||
PETITIONING_ALLOWED = Character.getBoolean("PetitioningAllowed", true);
|
PETITIONING_ALLOWED = Character.getBoolean("PetitioningAllowed", true);
|
||||||
MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
||||||
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
||||||
|
|||||||
+4
-1
@@ -206,6 +206,8 @@ public class TeleportHolder
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check if castle is in siege
|
// Check if castle is in siege
|
||||||
|
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS)
|
||||||
|
{
|
||||||
for (int castleId : loc.getCastleId())
|
for (int castleId : loc.getCastleId())
|
||||||
{
|
{
|
||||||
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
||||||
@@ -214,11 +216,12 @@ public class TeleportHolder
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Validate conditions for NORMAL teleport
|
// Validate conditions for NORMAL teleport
|
||||||
if (isNormalTeleport())
|
if (isNormalTeleport())
|
||||||
{
|
{
|
||||||
if (npc.getCastle().getSiege().isInProgress())
|
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS && npc.getCastle().getSiege().isInProgress())
|
||||||
{
|
{
|
||||||
final NpcHtmlMessage msg = new NpcHtmlMessage(npc.getObjectId());
|
final NpcHtmlMessage msg = new NpcHtmlMessage(npc.getObjectId());
|
||||||
msg.setFile(player, "data/html/teleporter/castleteleporter-busy.htm");
|
msg.setFile(player, "data/html/teleporter/castleteleporter-busy.htm");
|
||||||
|
|||||||
@@ -669,6 +669,10 @@ OffsetOnTeleportEnabled = True
|
|||||||
# Default: 50
|
# Default: 50
|
||||||
MaxOffsetOnTeleport = 50
|
MaxOffsetOnTeleport = 50
|
||||||
|
|
||||||
|
# Enable teleporting while siege in progress.
|
||||||
|
# Classic: True
|
||||||
|
TeleportWhileSiegeInProgress = True
|
||||||
|
|
||||||
# This option is to enable or disable the use of in game petitions.
|
# This option is to enable or disable the use of in game petitions.
|
||||||
# The MaxPetitionsPerPlayer is the amount of petitions a player can make.
|
# The MaxPetitionsPerPlayer is the amount of petitions a player can make.
|
||||||
# The MaximumPendingPetitions is the total amount of petitions in the server.
|
# The MaximumPendingPetitions is the total amount of petitions in the server.
|
||||||
|
|||||||
@@ -288,6 +288,7 @@ public class Config
|
|||||||
public static boolean RANDOM_RESPAWN_IN_TOWN_ENABLED;
|
public static boolean RANDOM_RESPAWN_IN_TOWN_ENABLED;
|
||||||
public static boolean OFFSET_ON_TELEPORT_ENABLED;
|
public static boolean OFFSET_ON_TELEPORT_ENABLED;
|
||||||
public static int MAX_OFFSET_ON_TELEPORT;
|
public static int MAX_OFFSET_ON_TELEPORT;
|
||||||
|
public static boolean TELEPORT_WHILE_SIEGE_IN_PROGRESS;
|
||||||
public static boolean PETITIONING_ALLOWED;
|
public static boolean PETITIONING_ALLOWED;
|
||||||
public static int MAX_PETITIONS_PER_PLAYER;
|
public static int MAX_PETITIONS_PER_PLAYER;
|
||||||
public static int MAX_PETITIONS_PENDING;
|
public static int MAX_PETITIONS_PENDING;
|
||||||
@@ -1784,6 +1785,7 @@ public class Config
|
|||||||
RANDOM_RESPAWN_IN_TOWN_ENABLED = Character.getBoolean("RandomRespawnInTownEnabled", true);
|
RANDOM_RESPAWN_IN_TOWN_ENABLED = Character.getBoolean("RandomRespawnInTownEnabled", true);
|
||||||
OFFSET_ON_TELEPORT_ENABLED = Character.getBoolean("OffsetOnTeleportEnabled", true);
|
OFFSET_ON_TELEPORT_ENABLED = Character.getBoolean("OffsetOnTeleportEnabled", true);
|
||||||
MAX_OFFSET_ON_TELEPORT = Character.getInt("MaxOffsetOnTeleport", 50);
|
MAX_OFFSET_ON_TELEPORT = Character.getInt("MaxOffsetOnTeleport", 50);
|
||||||
|
TELEPORT_WHILE_SIEGE_IN_PROGRESS = Character.getBoolean("TeleportWhileSiegeInProgress", true);
|
||||||
PETITIONING_ALLOWED = Character.getBoolean("PetitioningAllowed", true);
|
PETITIONING_ALLOWED = Character.getBoolean("PetitioningAllowed", true);
|
||||||
MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
||||||
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
||||||
|
|||||||
+4
-1
@@ -206,6 +206,8 @@ public class TeleportHolder
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check if castle is in siege
|
// Check if castle is in siege
|
||||||
|
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS)
|
||||||
|
{
|
||||||
for (int castleId : loc.getCastleId())
|
for (int castleId : loc.getCastleId())
|
||||||
{
|
{
|
||||||
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
||||||
@@ -214,11 +216,12 @@ public class TeleportHolder
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Validate conditions for NORMAL teleport
|
// Validate conditions for NORMAL teleport
|
||||||
if (isNormalTeleport())
|
if (isNormalTeleport())
|
||||||
{
|
{
|
||||||
if (npc.getCastle().getSiege().isInProgress())
|
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS && npc.getCastle().getSiege().isInProgress())
|
||||||
{
|
{
|
||||||
final NpcHtmlMessage msg = new NpcHtmlMessage(npc.getObjectId());
|
final NpcHtmlMessage msg = new NpcHtmlMessage(npc.getObjectId());
|
||||||
msg.setFile(player, "data/html/teleporter/castleteleporter-busy.htm");
|
msg.setFile(player, "data/html/teleporter/castleteleporter-busy.htm");
|
||||||
|
|||||||
@@ -669,6 +669,10 @@ OffsetOnTeleportEnabled = True
|
|||||||
# Default: 50
|
# Default: 50
|
||||||
MaxOffsetOnTeleport = 50
|
MaxOffsetOnTeleport = 50
|
||||||
|
|
||||||
|
# Enable teleporting while siege in progress.
|
||||||
|
# Classic: True
|
||||||
|
TeleportWhileSiegeInProgress = True
|
||||||
|
|
||||||
# This option is to enable or disable the use of in game petitions.
|
# This option is to enable or disable the use of in game petitions.
|
||||||
# The MaxPetitionsPerPlayer is the amount of petitions a player can make.
|
# The MaxPetitionsPerPlayer is the amount of petitions a player can make.
|
||||||
# The MaximumPendingPetitions is the total amount of petitions in the server.
|
# The MaximumPendingPetitions is the total amount of petitions in the server.
|
||||||
|
|||||||
@@ -288,6 +288,7 @@ public class Config
|
|||||||
public static boolean RANDOM_RESPAWN_IN_TOWN_ENABLED;
|
public static boolean RANDOM_RESPAWN_IN_TOWN_ENABLED;
|
||||||
public static boolean OFFSET_ON_TELEPORT_ENABLED;
|
public static boolean OFFSET_ON_TELEPORT_ENABLED;
|
||||||
public static int MAX_OFFSET_ON_TELEPORT;
|
public static int MAX_OFFSET_ON_TELEPORT;
|
||||||
|
public static boolean TELEPORT_WHILE_SIEGE_IN_PROGRESS;
|
||||||
public static boolean PETITIONING_ALLOWED;
|
public static boolean PETITIONING_ALLOWED;
|
||||||
public static int MAX_PETITIONS_PER_PLAYER;
|
public static int MAX_PETITIONS_PER_PLAYER;
|
||||||
public static int MAX_PETITIONS_PENDING;
|
public static int MAX_PETITIONS_PENDING;
|
||||||
@@ -1785,6 +1786,7 @@ public class Config
|
|||||||
RANDOM_RESPAWN_IN_TOWN_ENABLED = Character.getBoolean("RandomRespawnInTownEnabled", true);
|
RANDOM_RESPAWN_IN_TOWN_ENABLED = Character.getBoolean("RandomRespawnInTownEnabled", true);
|
||||||
OFFSET_ON_TELEPORT_ENABLED = Character.getBoolean("OffsetOnTeleportEnabled", true);
|
OFFSET_ON_TELEPORT_ENABLED = Character.getBoolean("OffsetOnTeleportEnabled", true);
|
||||||
MAX_OFFSET_ON_TELEPORT = Character.getInt("MaxOffsetOnTeleport", 50);
|
MAX_OFFSET_ON_TELEPORT = Character.getInt("MaxOffsetOnTeleport", 50);
|
||||||
|
TELEPORT_WHILE_SIEGE_IN_PROGRESS = Character.getBoolean("TeleportWhileSiegeInProgress", true);
|
||||||
PETITIONING_ALLOWED = Character.getBoolean("PetitioningAllowed", true);
|
PETITIONING_ALLOWED = Character.getBoolean("PetitioningAllowed", true);
|
||||||
MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
||||||
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
||||||
|
|||||||
+4
-1
@@ -206,6 +206,8 @@ public class TeleportHolder
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check if castle is in siege
|
// Check if castle is in siege
|
||||||
|
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS)
|
||||||
|
{
|
||||||
for (int castleId : loc.getCastleId())
|
for (int castleId : loc.getCastleId())
|
||||||
{
|
{
|
||||||
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
||||||
@@ -214,11 +216,12 @@ public class TeleportHolder
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Validate conditions for NORMAL teleport
|
// Validate conditions for NORMAL teleport
|
||||||
if (isNormalTeleport())
|
if (isNormalTeleport())
|
||||||
{
|
{
|
||||||
if (npc.getCastle().getSiege().isInProgress())
|
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS && npc.getCastle().getSiege().isInProgress())
|
||||||
{
|
{
|
||||||
final NpcHtmlMessage msg = new NpcHtmlMessage(npc.getObjectId());
|
final NpcHtmlMessage msg = new NpcHtmlMessage(npc.getObjectId());
|
||||||
msg.setFile(player, "data/html/teleporter/castleteleporter-busy.htm");
|
msg.setFile(player, "data/html/teleporter/castleteleporter-busy.htm");
|
||||||
|
|||||||
@@ -685,6 +685,10 @@ OffsetOnTeleportEnabled = True
|
|||||||
# Default: 50
|
# Default: 50
|
||||||
MaxOffsetOnTeleport = 50
|
MaxOffsetOnTeleport = 50
|
||||||
|
|
||||||
|
# Enable teleporting while siege in progress.
|
||||||
|
# Classic: True
|
||||||
|
TeleportWhileSiegeInProgress = True
|
||||||
|
|
||||||
# This option is to enable or disable the use of in game petitions.
|
# This option is to enable or disable the use of in game petitions.
|
||||||
# The MaxPetitionsPerPlayer is the amount of petitions a player can make.
|
# The MaxPetitionsPerPlayer is the amount of petitions a player can make.
|
||||||
# The MaximumPendingPetitions is the total amount of petitions in the server.
|
# The MaximumPendingPetitions is the total amount of petitions in the server.
|
||||||
|
|||||||
@@ -288,6 +288,7 @@ public class Config
|
|||||||
public static boolean RANDOM_RESPAWN_IN_TOWN_ENABLED;
|
public static boolean RANDOM_RESPAWN_IN_TOWN_ENABLED;
|
||||||
public static boolean OFFSET_ON_TELEPORT_ENABLED;
|
public static boolean OFFSET_ON_TELEPORT_ENABLED;
|
||||||
public static int MAX_OFFSET_ON_TELEPORT;
|
public static int MAX_OFFSET_ON_TELEPORT;
|
||||||
|
public static boolean TELEPORT_WHILE_SIEGE_IN_PROGRESS;
|
||||||
public static boolean PETITIONING_ALLOWED;
|
public static boolean PETITIONING_ALLOWED;
|
||||||
public static int MAX_PETITIONS_PER_PLAYER;
|
public static int MAX_PETITIONS_PER_PLAYER;
|
||||||
public static int MAX_PETITIONS_PENDING;
|
public static int MAX_PETITIONS_PENDING;
|
||||||
@@ -1794,6 +1795,7 @@ public class Config
|
|||||||
RANDOM_RESPAWN_IN_TOWN_ENABLED = Character.getBoolean("RandomRespawnInTownEnabled", true);
|
RANDOM_RESPAWN_IN_TOWN_ENABLED = Character.getBoolean("RandomRespawnInTownEnabled", true);
|
||||||
OFFSET_ON_TELEPORT_ENABLED = Character.getBoolean("OffsetOnTeleportEnabled", true);
|
OFFSET_ON_TELEPORT_ENABLED = Character.getBoolean("OffsetOnTeleportEnabled", true);
|
||||||
MAX_OFFSET_ON_TELEPORT = Character.getInt("MaxOffsetOnTeleport", 50);
|
MAX_OFFSET_ON_TELEPORT = Character.getInt("MaxOffsetOnTeleport", 50);
|
||||||
|
TELEPORT_WHILE_SIEGE_IN_PROGRESS = Character.getBoolean("TeleportWhileSiegeInProgress", true);
|
||||||
PETITIONING_ALLOWED = Character.getBoolean("PetitioningAllowed", true);
|
PETITIONING_ALLOWED = Character.getBoolean("PetitioningAllowed", true);
|
||||||
MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
||||||
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
||||||
|
|||||||
+4
-1
@@ -206,6 +206,8 @@ public class TeleportHolder
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check if castle is in siege
|
// Check if castle is in siege
|
||||||
|
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS)
|
||||||
|
{
|
||||||
for (int castleId : loc.getCastleId())
|
for (int castleId : loc.getCastleId())
|
||||||
{
|
{
|
||||||
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
||||||
@@ -214,11 +216,12 @@ public class TeleportHolder
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Validate conditions for NORMAL teleport
|
// Validate conditions for NORMAL teleport
|
||||||
if (isNormalTeleport())
|
if (isNormalTeleport())
|
||||||
{
|
{
|
||||||
if (npc.getCastle().getSiege().isInProgress())
|
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS && npc.getCastle().getSiege().isInProgress())
|
||||||
{
|
{
|
||||||
final NpcHtmlMessage msg = new NpcHtmlMessage(npc.getObjectId());
|
final NpcHtmlMessage msg = new NpcHtmlMessage(npc.getObjectId());
|
||||||
msg.setFile(player, "data/html/teleporter/castleteleporter-busy.htm");
|
msg.setFile(player, "data/html/teleporter/castleteleporter-busy.htm");
|
||||||
|
|||||||
@@ -685,6 +685,10 @@ OffsetOnTeleportEnabled = True
|
|||||||
# Default: 50
|
# Default: 50
|
||||||
MaxOffsetOnTeleport = 50
|
MaxOffsetOnTeleport = 50
|
||||||
|
|
||||||
|
# Enable teleporting while siege in progress.
|
||||||
|
# Classic: True
|
||||||
|
TeleportWhileSiegeInProgress = True
|
||||||
|
|
||||||
# This option is to enable or disable the use of in game petitions.
|
# This option is to enable or disable the use of in game petitions.
|
||||||
# The MaxPetitionsPerPlayer is the amount of petitions a player can make.
|
# The MaxPetitionsPerPlayer is the amount of petitions a player can make.
|
||||||
# The MaximumPendingPetitions is the total amount of petitions in the server.
|
# The MaximumPendingPetitions is the total amount of petitions in the server.
|
||||||
|
|||||||
@@ -289,6 +289,7 @@ public class Config
|
|||||||
public static boolean RANDOM_RESPAWN_IN_TOWN_ENABLED;
|
public static boolean RANDOM_RESPAWN_IN_TOWN_ENABLED;
|
||||||
public static boolean OFFSET_ON_TELEPORT_ENABLED;
|
public static boolean OFFSET_ON_TELEPORT_ENABLED;
|
||||||
public static int MAX_OFFSET_ON_TELEPORT;
|
public static int MAX_OFFSET_ON_TELEPORT;
|
||||||
|
public static boolean TELEPORT_WHILE_SIEGE_IN_PROGRESS;
|
||||||
public static boolean PETITIONING_ALLOWED;
|
public static boolean PETITIONING_ALLOWED;
|
||||||
public static int MAX_PETITIONS_PER_PLAYER;
|
public static int MAX_PETITIONS_PER_PLAYER;
|
||||||
public static int MAX_PETITIONS_PENDING;
|
public static int MAX_PETITIONS_PENDING;
|
||||||
@@ -1801,6 +1802,7 @@ public class Config
|
|||||||
RANDOM_RESPAWN_IN_TOWN_ENABLED = Character.getBoolean("RandomRespawnInTownEnabled", true);
|
RANDOM_RESPAWN_IN_TOWN_ENABLED = Character.getBoolean("RandomRespawnInTownEnabled", true);
|
||||||
OFFSET_ON_TELEPORT_ENABLED = Character.getBoolean("OffsetOnTeleportEnabled", true);
|
OFFSET_ON_TELEPORT_ENABLED = Character.getBoolean("OffsetOnTeleportEnabled", true);
|
||||||
MAX_OFFSET_ON_TELEPORT = Character.getInt("MaxOffsetOnTeleport", 50);
|
MAX_OFFSET_ON_TELEPORT = Character.getInt("MaxOffsetOnTeleport", 50);
|
||||||
|
TELEPORT_WHILE_SIEGE_IN_PROGRESS = Character.getBoolean("TeleportWhileSiegeInProgress", true);
|
||||||
PETITIONING_ALLOWED = Character.getBoolean("PetitioningAllowed", true);
|
PETITIONING_ALLOWED = Character.getBoolean("PetitioningAllowed", true);
|
||||||
MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
||||||
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
||||||
|
|||||||
+4
-1
@@ -206,6 +206,8 @@ public class TeleportHolder
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check if castle is in siege
|
// Check if castle is in siege
|
||||||
|
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS)
|
||||||
|
{
|
||||||
for (int castleId : loc.getCastleId())
|
for (int castleId : loc.getCastleId())
|
||||||
{
|
{
|
||||||
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
||||||
@@ -214,11 +216,12 @@ public class TeleportHolder
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Validate conditions for NORMAL teleport
|
// Validate conditions for NORMAL teleport
|
||||||
if (isNormalTeleport())
|
if (isNormalTeleport())
|
||||||
{
|
{
|
||||||
if (npc.getCastle().getSiege().isInProgress())
|
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS && npc.getCastle().getSiege().isInProgress())
|
||||||
{
|
{
|
||||||
final NpcHtmlMessage msg = new NpcHtmlMessage(npc.getObjectId());
|
final NpcHtmlMessage msg = new NpcHtmlMessage(npc.getObjectId());
|
||||||
msg.setFile(player, "data/html/teleporter/castleteleporter-busy.htm");
|
msg.setFile(player, "data/html/teleporter/castleteleporter-busy.htm");
|
||||||
|
|||||||
+3
@@ -63,12 +63,15 @@ public class ExRequestTeleport implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS)
|
||||||
|
{
|
||||||
final Castle castle = CastleManager.getInstance().getCastle(teleport.getX(), teleport.getY(), teleport.getZ());
|
final Castle castle = CastleManager.getInstance().getCastle(teleport.getX(), teleport.getY(), teleport.getZ());
|
||||||
if ((castle != null) && castle.getSiege().isInProgress())
|
if ((castle != null) && castle.getSiege().isInProgress())
|
||||||
{
|
{
|
||||||
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
|
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (player.getLevel() > Config.MAX_FREE_TELEPORT_LEVEL)
|
if (player.getLevel() > Config.MAX_FREE_TELEPORT_LEVEL)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -670,6 +670,10 @@ OffsetOnTeleportEnabled = True
|
|||||||
# Default: 50
|
# Default: 50
|
||||||
MaxOffsetOnTeleport = 50
|
MaxOffsetOnTeleport = 50
|
||||||
|
|
||||||
|
# Enable teleporting while siege in progress.
|
||||||
|
# Default: False
|
||||||
|
TeleportWhileSiegeInProgress = False
|
||||||
|
|
||||||
# This option is to enable or disable the use of in game petitions.
|
# This option is to enable or disable the use of in game petitions.
|
||||||
# The MaxPetitionsPerPlayer is the amount of petitions a player can make.
|
# The MaxPetitionsPerPlayer is the amount of petitions a player can make.
|
||||||
# The MaximumPendingPetitions is the total amount of petitions in the server.
|
# The MaximumPendingPetitions is the total amount of petitions in the server.
|
||||||
|
|||||||
@@ -289,6 +289,7 @@ public class Config
|
|||||||
public static boolean RANDOM_RESPAWN_IN_TOWN_ENABLED;
|
public static boolean RANDOM_RESPAWN_IN_TOWN_ENABLED;
|
||||||
public static boolean OFFSET_ON_TELEPORT_ENABLED;
|
public static boolean OFFSET_ON_TELEPORT_ENABLED;
|
||||||
public static int MAX_OFFSET_ON_TELEPORT;
|
public static int MAX_OFFSET_ON_TELEPORT;
|
||||||
|
public static boolean TELEPORT_WHILE_SIEGE_IN_PROGRESS;
|
||||||
public static boolean PETITIONING_ALLOWED;
|
public static boolean PETITIONING_ALLOWED;
|
||||||
public static int MAX_PETITIONS_PER_PLAYER;
|
public static int MAX_PETITIONS_PER_PLAYER;
|
||||||
public static int MAX_PETITIONS_PENDING;
|
public static int MAX_PETITIONS_PENDING;
|
||||||
@@ -1798,6 +1799,7 @@ public class Config
|
|||||||
RANDOM_RESPAWN_IN_TOWN_ENABLED = Character.getBoolean("RandomRespawnInTownEnabled", true);
|
RANDOM_RESPAWN_IN_TOWN_ENABLED = Character.getBoolean("RandomRespawnInTownEnabled", true);
|
||||||
OFFSET_ON_TELEPORT_ENABLED = Character.getBoolean("OffsetOnTeleportEnabled", true);
|
OFFSET_ON_TELEPORT_ENABLED = Character.getBoolean("OffsetOnTeleportEnabled", true);
|
||||||
MAX_OFFSET_ON_TELEPORT = Character.getInt("MaxOffsetOnTeleport", 50);
|
MAX_OFFSET_ON_TELEPORT = Character.getInt("MaxOffsetOnTeleport", 50);
|
||||||
|
TELEPORT_WHILE_SIEGE_IN_PROGRESS = Character.getBoolean("TeleportWhileSiegeInProgress", true);
|
||||||
PETITIONING_ALLOWED = Character.getBoolean("PetitioningAllowed", true);
|
PETITIONING_ALLOWED = Character.getBoolean("PetitioningAllowed", true);
|
||||||
MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
||||||
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
||||||
|
|||||||
+4
-1
@@ -206,6 +206,8 @@ public class TeleportHolder
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check if castle is in siege
|
// Check if castle is in siege
|
||||||
|
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS)
|
||||||
|
{
|
||||||
for (int castleId : loc.getCastleId())
|
for (int castleId : loc.getCastleId())
|
||||||
{
|
{
|
||||||
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
||||||
@@ -214,11 +216,12 @@ public class TeleportHolder
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Validate conditions for NORMAL teleport
|
// Validate conditions for NORMAL teleport
|
||||||
if (isNormalTeleport())
|
if (isNormalTeleport())
|
||||||
{
|
{
|
||||||
if (npc.getCastle().getSiege().isInProgress())
|
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS && npc.getCastle().getSiege().isInProgress())
|
||||||
{
|
{
|
||||||
final NpcHtmlMessage msg = new NpcHtmlMessage(npc.getObjectId());
|
final NpcHtmlMessage msg = new NpcHtmlMessage(npc.getObjectId());
|
||||||
msg.setFile(player, "data/html/teleporter/castleteleporter-busy.htm");
|
msg.setFile(player, "data/html/teleporter/castleteleporter-busy.htm");
|
||||||
|
|||||||
Reference in New Issue
Block a user