Addition of teleport while siege in progress configuration.
Thanks to Iris.
This commit is contained in:
parent
3036d26dcd
commit
7be02a8eee
@ -750,10 +750,14 @@ RandomRespawnInTownEnabled = True
|
||||
# Default: True
|
||||
OffsetOnTeleportEnabled = True
|
||||
|
||||
# Maximum offset for base teleport location when OffsetOnTeleportEnabled is enabled .
|
||||
# Maximum offset for base teleport location when OffsetOnTeleportEnabled is enabled.
|
||||
# Default: 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.
|
||||
# The MaxPetitionsPerPlayer is the amount of petitions a player can make.
|
||||
# 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 OFFSET_ON_TELEPORT_ENABLED;
|
||||
public static int MAX_OFFSET_ON_TELEPORT;
|
||||
public static boolean TELEPORT_WHILE_SIEGE_IN_PROGRESS;
|
||||
public static boolean PETITIONING_ALLOWED;
|
||||
public static int MAX_PETITIONS_PER_PLAYER;
|
||||
public static int MAX_PETITIONS_PENDING;
|
||||
@ -1854,6 +1855,7 @@ public class Config
|
||||
RANDOM_RESPAWN_IN_TOWN_ENABLED = Character.getBoolean("RandomRespawnInTownEnabled", true);
|
||||
OFFSET_ON_TELEPORT_ENABLED = Character.getBoolean("OffsetOnTeleportEnabled", true);
|
||||
MAX_OFFSET_ON_TELEPORT = Character.getInt("MaxOffsetOnTeleport", 50);
|
||||
TELEPORT_WHILE_SIEGE_IN_PROGRESS = Character.getBoolean("TeleportWhileSiegeInProgress", true);
|
||||
PETITIONING_ALLOWED = Character.getBoolean("PetitioningAllowed", true);
|
||||
MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
||||
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
||||
|
@ -206,19 +206,22 @@ public class TeleportHolder
|
||||
}
|
||||
|
||||
// Check if castle is in siege
|
||||
for (int castleId : loc.getCastleId())
|
||||
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS)
|
||||
{
|
||||
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
||||
for (int castleId : loc.getCastleId())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
|
||||
return;
|
||||
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Validate conditions for NORMAL teleport
|
||||
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());
|
||||
msg.setFile(player, "data/html/teleporter/castleteleporter-busy.htm");
|
||||
|
@ -750,10 +750,14 @@ RandomRespawnInTownEnabled = True
|
||||
# Default: True
|
||||
OffsetOnTeleportEnabled = True
|
||||
|
||||
# Maximum offset for base teleport location when OffsetOnTeleportEnabled is enabled .
|
||||
# Maximum offset for base teleport location when OffsetOnTeleportEnabled is enabled.
|
||||
# Default: 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.
|
||||
# The MaxPetitionsPerPlayer is the amount of petitions a player can make.
|
||||
# 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 OFFSET_ON_TELEPORT_ENABLED;
|
||||
public static int MAX_OFFSET_ON_TELEPORT;
|
||||
public static boolean TELEPORT_WHILE_SIEGE_IN_PROGRESS;
|
||||
public static boolean PETITIONING_ALLOWED;
|
||||
public static int MAX_PETITIONS_PER_PLAYER;
|
||||
public static int MAX_PETITIONS_PENDING;
|
||||
@ -1870,6 +1871,7 @@ public class Config
|
||||
RANDOM_RESPAWN_IN_TOWN_ENABLED = Character.getBoolean("RandomRespawnInTownEnabled", true);
|
||||
OFFSET_ON_TELEPORT_ENABLED = Character.getBoolean("OffsetOnTeleportEnabled", true);
|
||||
MAX_OFFSET_ON_TELEPORT = Character.getInt("MaxOffsetOnTeleport", 50);
|
||||
TELEPORT_WHILE_SIEGE_IN_PROGRESS = Character.getBoolean("TeleportWhileSiegeInProgress", true);
|
||||
PETITIONING_ALLOWED = Character.getBoolean("PetitioningAllowed", true);
|
||||
MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
||||
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
||||
|
@ -206,19 +206,22 @@ public class TeleportHolder
|
||||
}
|
||||
|
||||
// Check if castle is in siege
|
||||
for (int castleId : loc.getCastleId())
|
||||
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS)
|
||||
{
|
||||
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
||||
for (int castleId : loc.getCastleId())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
|
||||
return;
|
||||
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Validate conditions for NORMAL teleport
|
||||
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());
|
||||
msg.setFile(player, "data/html/teleporter/castleteleporter-busy.htm");
|
||||
|
@ -750,10 +750,14 @@ RandomRespawnInTownEnabled = True
|
||||
# Default: True
|
||||
OffsetOnTeleportEnabled = True
|
||||
|
||||
# Maximum offset for base teleport location when OffsetOnTeleportEnabled is enabled .
|
||||
# Maximum offset for base teleport location when OffsetOnTeleportEnabled is enabled.
|
||||
# Default: 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.
|
||||
# The MaxPetitionsPerPlayer is the amount of petitions a player can make.
|
||||
# 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 OFFSET_ON_TELEPORT_ENABLED;
|
||||
public static int MAX_OFFSET_ON_TELEPORT;
|
||||
public static boolean TELEPORT_WHILE_SIEGE_IN_PROGRESS;
|
||||
public static boolean PETITIONING_ALLOWED;
|
||||
public static int MAX_PETITIONS_PER_PLAYER;
|
||||
public static int MAX_PETITIONS_PENDING;
|
||||
@ -1883,6 +1884,7 @@ public class Config
|
||||
RANDOM_RESPAWN_IN_TOWN_ENABLED = Character.getBoolean("RandomRespawnInTownEnabled", true);
|
||||
OFFSET_ON_TELEPORT_ENABLED = Character.getBoolean("OffsetOnTeleportEnabled", true);
|
||||
MAX_OFFSET_ON_TELEPORT = Character.getInt("MaxOffsetOnTeleport", 50);
|
||||
TELEPORT_WHILE_SIEGE_IN_PROGRESS = Character.getBoolean("TeleportWhileSiegeInProgress", true);
|
||||
PETITIONING_ALLOWED = Character.getBoolean("PetitioningAllowed", true);
|
||||
MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
||||
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
||||
|
@ -206,19 +206,22 @@ public class TeleportHolder
|
||||
}
|
||||
|
||||
// Check if castle is in siege
|
||||
for (int castleId : loc.getCastleId())
|
||||
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS)
|
||||
{
|
||||
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
||||
for (int castleId : loc.getCastleId())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
|
||||
return;
|
||||
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Validate conditions for NORMAL teleport
|
||||
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());
|
||||
msg.setFile(player, "data/html/teleporter/castleteleporter-busy.htm");
|
||||
|
@ -726,10 +726,14 @@ RandomRespawnInTownEnabled = True
|
||||
# Default: True
|
||||
OffsetOnTeleportEnabled = True
|
||||
|
||||
# Maximum offset for base teleport location when OffsetOnTeleportEnabled is enabled .
|
||||
# Maximum offset for base teleport location when OffsetOnTeleportEnabled is enabled.
|
||||
# Default: 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.
|
||||
# The MaxPetitionsPerPlayer is the amount of petitions a player can make.
|
||||
# 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 OFFSET_ON_TELEPORT_ENABLED;
|
||||
public static int MAX_OFFSET_ON_TELEPORT;
|
||||
public static boolean TELEPORT_WHILE_SIEGE_IN_PROGRESS;
|
||||
public static boolean PETITIONING_ALLOWED;
|
||||
public static int MAX_PETITIONS_PER_PLAYER;
|
||||
public static int MAX_PETITIONS_PENDING;
|
||||
@ -1864,6 +1865,7 @@ public class Config
|
||||
RANDOM_RESPAWN_IN_TOWN_ENABLED = Character.getBoolean("RandomRespawnInTownEnabled", true);
|
||||
OFFSET_ON_TELEPORT_ENABLED = Character.getBoolean("OffsetOnTeleportEnabled", true);
|
||||
MAX_OFFSET_ON_TELEPORT = Character.getInt("MaxOffsetOnTeleport", 50);
|
||||
TELEPORT_WHILE_SIEGE_IN_PROGRESS = Character.getBoolean("TeleportWhileSiegeInProgress", true);
|
||||
PETITIONING_ALLOWED = Character.getBoolean("PetitioningAllowed", true);
|
||||
MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
||||
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
||||
|
@ -206,19 +206,22 @@ public class TeleportHolder
|
||||
}
|
||||
|
||||
// Check if castle is in siege
|
||||
for (int castleId : loc.getCastleId())
|
||||
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS)
|
||||
{
|
||||
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
||||
for (int castleId : loc.getCastleId())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
|
||||
return;
|
||||
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Validate conditions for NORMAL teleport
|
||||
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());
|
||||
msg.setFile(player, "data/html/teleporter/castleteleporter-busy.htm");
|
||||
|
@ -726,10 +726,14 @@ RandomRespawnInTownEnabled = True
|
||||
# Default: True
|
||||
OffsetOnTeleportEnabled = True
|
||||
|
||||
# Maximum offset for base teleport location when OffsetOnTeleportEnabled is enabled .
|
||||
# Maximum offset for base teleport location when OffsetOnTeleportEnabled is enabled.
|
||||
# Default: 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.
|
||||
# The MaxPetitionsPerPlayer is the amount of petitions a player can make.
|
||||
# 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 OFFSET_ON_TELEPORT_ENABLED;
|
||||
public static int MAX_OFFSET_ON_TELEPORT;
|
||||
public static boolean TELEPORT_WHILE_SIEGE_IN_PROGRESS;
|
||||
public static boolean PETITIONING_ALLOWED;
|
||||
public static int MAX_PETITIONS_PER_PLAYER;
|
||||
public static int MAX_PETITIONS_PENDING;
|
||||
@ -1865,6 +1866,7 @@ public class Config
|
||||
RANDOM_RESPAWN_IN_TOWN_ENABLED = Character.getBoolean("RandomRespawnInTownEnabled", true);
|
||||
OFFSET_ON_TELEPORT_ENABLED = Character.getBoolean("OffsetOnTeleportEnabled", true);
|
||||
MAX_OFFSET_ON_TELEPORT = Character.getInt("MaxOffsetOnTeleport", 50);
|
||||
TELEPORT_WHILE_SIEGE_IN_PROGRESS = Character.getBoolean("TeleportWhileSiegeInProgress", true);
|
||||
PETITIONING_ALLOWED = Character.getBoolean("PetitioningAllowed", true);
|
||||
MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
||||
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
||||
|
@ -206,19 +206,22 @@ public class TeleportHolder
|
||||
}
|
||||
|
||||
// Check if castle is in siege
|
||||
for (int castleId : loc.getCastleId())
|
||||
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS)
|
||||
{
|
||||
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
||||
for (int castleId : loc.getCastleId())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
|
||||
return;
|
||||
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Validate conditions for NORMAL teleport
|
||||
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());
|
||||
msg.setFile(player, "data/html/teleporter/castleteleporter-busy.htm");
|
||||
|
@ -726,10 +726,14 @@ RandomRespawnInTownEnabled = True
|
||||
# Default: True
|
||||
OffsetOnTeleportEnabled = True
|
||||
|
||||
# Maximum offset for base teleport location when OffsetOnTeleportEnabled is enabled .
|
||||
# Maximum offset for base teleport location when OffsetOnTeleportEnabled is enabled.
|
||||
# Default: 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.
|
||||
# The MaxPetitionsPerPlayer is the amount of petitions a player can make.
|
||||
# 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 OFFSET_ON_TELEPORT_ENABLED;
|
||||
public static int MAX_OFFSET_ON_TELEPORT;
|
||||
public static boolean TELEPORT_WHILE_SIEGE_IN_PROGRESS;
|
||||
public static boolean PETITIONING_ALLOWED;
|
||||
public static int MAX_PETITIONS_PER_PLAYER;
|
||||
public static int MAX_PETITIONS_PENDING;
|
||||
@ -1872,6 +1873,7 @@ public class Config
|
||||
RANDOM_RESPAWN_IN_TOWN_ENABLED = Character.getBoolean("RandomRespawnInTownEnabled", true);
|
||||
OFFSET_ON_TELEPORT_ENABLED = Character.getBoolean("OffsetOnTeleportEnabled", true);
|
||||
MAX_OFFSET_ON_TELEPORT = Character.getInt("MaxOffsetOnTeleport", 50);
|
||||
TELEPORT_WHILE_SIEGE_IN_PROGRESS = Character.getBoolean("TeleportWhileSiegeInProgress", true);
|
||||
PETITIONING_ALLOWED = Character.getBoolean("PetitioningAllowed", true);
|
||||
MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
||||
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
||||
|
@ -206,19 +206,22 @@ public class TeleportHolder
|
||||
}
|
||||
|
||||
// Check if castle is in siege
|
||||
for (int castleId : loc.getCastleId())
|
||||
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS)
|
||||
{
|
||||
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
||||
for (int castleId : loc.getCastleId())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
|
||||
return;
|
||||
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Validate conditions for NORMAL teleport
|
||||
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());
|
||||
msg.setFile(player, "data/html/teleporter/castleteleporter-busy.htm");
|
||||
|
@ -746,10 +746,14 @@ RandomRespawnInTownEnabled = True
|
||||
# Default: True
|
||||
OffsetOnTeleportEnabled = True
|
||||
|
||||
# Maximum offset for base teleport location when OffsetOnTeleportEnabled is enabled .
|
||||
# Maximum offset for base teleport location when OffsetOnTeleportEnabled is enabled.
|
||||
# Default: 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.
|
||||
# The MaxPetitionsPerPlayer is the amount of petitions a player can make.
|
||||
# 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 OFFSET_ON_TELEPORT_ENABLED;
|
||||
public static int MAX_OFFSET_ON_TELEPORT;
|
||||
public static boolean TELEPORT_WHILE_SIEGE_IN_PROGRESS;
|
||||
public static boolean PETITIONING_ALLOWED;
|
||||
public static int MAX_PETITIONS_PER_PLAYER;
|
||||
public static int MAX_PETITIONS_PENDING;
|
||||
@ -1911,6 +1912,7 @@ public class Config
|
||||
RANDOM_RESPAWN_IN_TOWN_ENABLED = Character.getBoolean("RandomRespawnInTownEnabled", true);
|
||||
OFFSET_ON_TELEPORT_ENABLED = Character.getBoolean("OffsetOnTeleportEnabled", true);
|
||||
MAX_OFFSET_ON_TELEPORT = Character.getInt("MaxOffsetOnTeleport", 50);
|
||||
TELEPORT_WHILE_SIEGE_IN_PROGRESS = Character.getBoolean("TeleportWhileSiegeInProgress", true);
|
||||
PETITIONING_ALLOWED = Character.getBoolean("PetitioningAllowed", true);
|
||||
MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
||||
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
||||
|
@ -206,19 +206,22 @@ public class TeleportHolder
|
||||
}
|
||||
|
||||
// Check if castle is in siege
|
||||
for (int castleId : loc.getCastleId())
|
||||
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS)
|
||||
{
|
||||
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
||||
for (int castleId : loc.getCastleId())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
|
||||
return;
|
||||
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Validate conditions for NORMAL teleport
|
||||
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());
|
||||
msg.setFile(player, "data/html/teleporter/castleteleporter-busy.htm");
|
||||
|
@ -756,10 +756,14 @@ RandomRespawnInTownEnabled = True
|
||||
# Default: True
|
||||
OffsetOnTeleportEnabled = True
|
||||
|
||||
# Maximum offset for base teleport location when OffsetOnTeleportEnabled is enabled .
|
||||
# Maximum offset for base teleport location when OffsetOnTeleportEnabled is enabled.
|
||||
# Default: 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.
|
||||
# The MaxPetitionsPerPlayer is the amount of petitions a player can make.
|
||||
# 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 OFFSET_ON_TELEPORT_ENABLED;
|
||||
public static int MAX_OFFSET_ON_TELEPORT;
|
||||
public static boolean TELEPORT_WHILE_SIEGE_IN_PROGRESS;
|
||||
public static boolean PETITIONING_ALLOWED;
|
||||
public static int MAX_PETITIONS_PER_PLAYER;
|
||||
public static int MAX_PETITIONS_PENDING;
|
||||
@ -1923,6 +1924,7 @@ public class Config
|
||||
RANDOM_RESPAWN_IN_TOWN_ENABLED = Character.getBoolean("RandomRespawnInTownEnabled", true);
|
||||
OFFSET_ON_TELEPORT_ENABLED = Character.getBoolean("OffsetOnTeleportEnabled", true);
|
||||
MAX_OFFSET_ON_TELEPORT = Character.getInt("MaxOffsetOnTeleport", 50);
|
||||
TELEPORT_WHILE_SIEGE_IN_PROGRESS = Character.getBoolean("TeleportWhileSiegeInProgress", true);
|
||||
PETITIONING_ALLOWED = Character.getBoolean("PetitioningAllowed", true);
|
||||
MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
||||
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
||||
|
@ -206,19 +206,22 @@ public class TeleportHolder
|
||||
}
|
||||
|
||||
// Check if castle is in siege
|
||||
for (int castleId : loc.getCastleId())
|
||||
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS)
|
||||
{
|
||||
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
||||
for (int castleId : loc.getCastleId())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
|
||||
return;
|
||||
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Validate conditions for NORMAL teleport
|
||||
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());
|
||||
msg.setFile(player, "data/html/teleporter/castleteleporter-busy.htm");
|
||||
|
@ -63,11 +63,14 @@ public class ExRequestTeleport implements IClientIncomingPacket
|
||||
return;
|
||||
}
|
||||
|
||||
final Castle castle = CastleManager.getInstance().getCastle(teleport.getX(), teleport.getY(), teleport.getZ());
|
||||
if ((castle != null) && castle.getSiege().isInProgress())
|
||||
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS)
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
|
||||
return;
|
||||
final Castle castle = CastleManager.getInstance().getCastle(teleport.getX(), teleport.getY(), teleport.getZ());
|
||||
if ((castle != null) && castle.getSiege().isInProgress())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (player.getLevel() > Config.MAX_FREE_TELEPORT_LEVEL)
|
||||
|
@ -665,10 +665,14 @@ RandomRespawnInTownEnabled = True
|
||||
# Default: True
|
||||
OffsetOnTeleportEnabled = True
|
||||
|
||||
# Maximum offset for base teleport location when OffsetOnTeleportEnabled is enabled .
|
||||
# Maximum offset for base teleport location when OffsetOnTeleportEnabled is enabled.
|
||||
# Default: 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.
|
||||
# The MaxPetitionsPerPlayer is the amount of petitions a player can make.
|
||||
# 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 OFFSET_ON_TELEPORT_ENABLED;
|
||||
public static int MAX_OFFSET_ON_TELEPORT;
|
||||
public static boolean TELEPORT_WHILE_SIEGE_IN_PROGRESS;
|
||||
public static boolean PETITIONING_ALLOWED;
|
||||
public static int MAX_PETITIONS_PER_PLAYER;
|
||||
public static int MAX_PETITIONS_PENDING;
|
||||
@ -1780,6 +1781,7 @@ public class Config
|
||||
RANDOM_RESPAWN_IN_TOWN_ENABLED = Character.getBoolean("RandomRespawnInTownEnabled", true);
|
||||
OFFSET_ON_TELEPORT_ENABLED = Character.getBoolean("OffsetOnTeleportEnabled", true);
|
||||
MAX_OFFSET_ON_TELEPORT = Character.getInt("MaxOffsetOnTeleport", 50);
|
||||
TELEPORT_WHILE_SIEGE_IN_PROGRESS = Character.getBoolean("TeleportWhileSiegeInProgress", true);
|
||||
PETITIONING_ALLOWED = Character.getBoolean("PetitioningAllowed", true);
|
||||
MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
||||
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
||||
|
@ -206,19 +206,22 @@ public class TeleportHolder
|
||||
}
|
||||
|
||||
// Check if castle is in siege
|
||||
for (int castleId : loc.getCastleId())
|
||||
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS)
|
||||
{
|
||||
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
||||
for (int castleId : loc.getCastleId())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
|
||||
return;
|
||||
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Validate conditions for NORMAL teleport
|
||||
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());
|
||||
msg.setFile(player, "data/html/teleporter/castleteleporter-busy.htm");
|
||||
|
@ -665,10 +665,14 @@ RandomRespawnInTownEnabled = True
|
||||
# Default: True
|
||||
OffsetOnTeleportEnabled = True
|
||||
|
||||
# Maximum offset for base teleport location when OffsetOnTeleportEnabled is enabled .
|
||||
# Maximum offset for base teleport location when OffsetOnTeleportEnabled is enabled.
|
||||
# Default: 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.
|
||||
# The MaxPetitionsPerPlayer is the amount of petitions a player can make.
|
||||
# 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 OFFSET_ON_TELEPORT_ENABLED;
|
||||
public static int MAX_OFFSET_ON_TELEPORT;
|
||||
public static boolean TELEPORT_WHILE_SIEGE_IN_PROGRESS;
|
||||
public static boolean PETITIONING_ALLOWED;
|
||||
public static int MAX_PETITIONS_PER_PLAYER;
|
||||
public static int MAX_PETITIONS_PENDING;
|
||||
@ -1784,6 +1785,7 @@ public class Config
|
||||
RANDOM_RESPAWN_IN_TOWN_ENABLED = Character.getBoolean("RandomRespawnInTownEnabled", true);
|
||||
OFFSET_ON_TELEPORT_ENABLED = Character.getBoolean("OffsetOnTeleportEnabled", true);
|
||||
MAX_OFFSET_ON_TELEPORT = Character.getInt("MaxOffsetOnTeleport", 50);
|
||||
TELEPORT_WHILE_SIEGE_IN_PROGRESS = Character.getBoolean("TeleportWhileSiegeInProgress", true);
|
||||
PETITIONING_ALLOWED = Character.getBoolean("PetitioningAllowed", true);
|
||||
MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
||||
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
||||
|
@ -206,19 +206,22 @@ public class TeleportHolder
|
||||
}
|
||||
|
||||
// Check if castle is in siege
|
||||
for (int castleId : loc.getCastleId())
|
||||
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS)
|
||||
{
|
||||
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
||||
for (int castleId : loc.getCastleId())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
|
||||
return;
|
||||
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Validate conditions for NORMAL teleport
|
||||
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());
|
||||
msg.setFile(player, "data/html/teleporter/castleteleporter-busy.htm");
|
||||
|
@ -665,10 +665,14 @@ RandomRespawnInTownEnabled = True
|
||||
# Default: True
|
||||
OffsetOnTeleportEnabled = True
|
||||
|
||||
# Maximum offset for base teleport location when OffsetOnTeleportEnabled is enabled .
|
||||
# Maximum offset for base teleport location when OffsetOnTeleportEnabled is enabled.
|
||||
# Default: 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.
|
||||
# The MaxPetitionsPerPlayer is the amount of petitions a player can make.
|
||||
# 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 OFFSET_ON_TELEPORT_ENABLED;
|
||||
public static int MAX_OFFSET_ON_TELEPORT;
|
||||
public static boolean TELEPORT_WHILE_SIEGE_IN_PROGRESS;
|
||||
public static boolean PETITIONING_ALLOWED;
|
||||
public static int MAX_PETITIONS_PER_PLAYER;
|
||||
public static int MAX_PETITIONS_PENDING;
|
||||
@ -1784,6 +1785,7 @@ public class Config
|
||||
RANDOM_RESPAWN_IN_TOWN_ENABLED = Character.getBoolean("RandomRespawnInTownEnabled", true);
|
||||
OFFSET_ON_TELEPORT_ENABLED = Character.getBoolean("OffsetOnTeleportEnabled", true);
|
||||
MAX_OFFSET_ON_TELEPORT = Character.getInt("MaxOffsetOnTeleport", 50);
|
||||
TELEPORT_WHILE_SIEGE_IN_PROGRESS = Character.getBoolean("TeleportWhileSiegeInProgress", true);
|
||||
PETITIONING_ALLOWED = Character.getBoolean("PetitioningAllowed", true);
|
||||
MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
||||
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
||||
|
@ -206,19 +206,22 @@ public class TeleportHolder
|
||||
}
|
||||
|
||||
// Check if castle is in siege
|
||||
for (int castleId : loc.getCastleId())
|
||||
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS)
|
||||
{
|
||||
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
||||
for (int castleId : loc.getCastleId())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
|
||||
return;
|
||||
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Validate conditions for NORMAL teleport
|
||||
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());
|
||||
msg.setFile(player, "data/html/teleporter/castleteleporter-busy.htm");
|
||||
|
@ -665,10 +665,14 @@ RandomRespawnInTownEnabled = True
|
||||
# Default: True
|
||||
OffsetOnTeleportEnabled = True
|
||||
|
||||
# Maximum offset for base teleport location when OffsetOnTeleportEnabled is enabled .
|
||||
# Maximum offset for base teleport location when OffsetOnTeleportEnabled is enabled.
|
||||
# Default: 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.
|
||||
# The MaxPetitionsPerPlayer is the amount of petitions a player can make.
|
||||
# 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 OFFSET_ON_TELEPORT_ENABLED;
|
||||
public static int MAX_OFFSET_ON_TELEPORT;
|
||||
public static boolean TELEPORT_WHILE_SIEGE_IN_PROGRESS;
|
||||
public static boolean PETITIONING_ALLOWED;
|
||||
public static int MAX_PETITIONS_PER_PLAYER;
|
||||
public static int MAX_PETITIONS_PENDING;
|
||||
@ -1785,6 +1786,7 @@ public class Config
|
||||
RANDOM_RESPAWN_IN_TOWN_ENABLED = Character.getBoolean("RandomRespawnInTownEnabled", true);
|
||||
OFFSET_ON_TELEPORT_ENABLED = Character.getBoolean("OffsetOnTeleportEnabled", true);
|
||||
MAX_OFFSET_ON_TELEPORT = Character.getInt("MaxOffsetOnTeleport", 50);
|
||||
TELEPORT_WHILE_SIEGE_IN_PROGRESS = Character.getBoolean("TeleportWhileSiegeInProgress", true);
|
||||
PETITIONING_ALLOWED = Character.getBoolean("PetitioningAllowed", true);
|
||||
MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
||||
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
||||
|
@ -206,19 +206,22 @@ public class TeleportHolder
|
||||
}
|
||||
|
||||
// Check if castle is in siege
|
||||
for (int castleId : loc.getCastleId())
|
||||
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS)
|
||||
{
|
||||
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
||||
for (int castleId : loc.getCastleId())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
|
||||
return;
|
||||
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Validate conditions for NORMAL teleport
|
||||
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());
|
||||
msg.setFile(player, "data/html/teleporter/castleteleporter-busy.htm");
|
||||
|
@ -681,10 +681,14 @@ RandomRespawnInTownEnabled = True
|
||||
# Default: True
|
||||
OffsetOnTeleportEnabled = True
|
||||
|
||||
# Maximum offset for base teleport location when OffsetOnTeleportEnabled is enabled .
|
||||
# Maximum offset for base teleport location when OffsetOnTeleportEnabled is enabled.
|
||||
# Default: 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.
|
||||
# The MaxPetitionsPerPlayer is the amount of petitions a player can make.
|
||||
# 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 OFFSET_ON_TELEPORT_ENABLED;
|
||||
public static int MAX_OFFSET_ON_TELEPORT;
|
||||
public static boolean TELEPORT_WHILE_SIEGE_IN_PROGRESS;
|
||||
public static boolean PETITIONING_ALLOWED;
|
||||
public static int MAX_PETITIONS_PER_PLAYER;
|
||||
public static int MAX_PETITIONS_PENDING;
|
||||
@ -1794,6 +1795,7 @@ public class Config
|
||||
RANDOM_RESPAWN_IN_TOWN_ENABLED = Character.getBoolean("RandomRespawnInTownEnabled", true);
|
||||
OFFSET_ON_TELEPORT_ENABLED = Character.getBoolean("OffsetOnTeleportEnabled", true);
|
||||
MAX_OFFSET_ON_TELEPORT = Character.getInt("MaxOffsetOnTeleport", 50);
|
||||
TELEPORT_WHILE_SIEGE_IN_PROGRESS = Character.getBoolean("TeleportWhileSiegeInProgress", true);
|
||||
PETITIONING_ALLOWED = Character.getBoolean("PetitioningAllowed", true);
|
||||
MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
||||
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
||||
|
@ -206,19 +206,22 @@ public class TeleportHolder
|
||||
}
|
||||
|
||||
// Check if castle is in siege
|
||||
for (int castleId : loc.getCastleId())
|
||||
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS)
|
||||
{
|
||||
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
||||
for (int castleId : loc.getCastleId())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
|
||||
return;
|
||||
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Validate conditions for NORMAL teleport
|
||||
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());
|
||||
msg.setFile(player, "data/html/teleporter/castleteleporter-busy.htm");
|
||||
|
@ -681,10 +681,14 @@ RandomRespawnInTownEnabled = True
|
||||
# Default: True
|
||||
OffsetOnTeleportEnabled = True
|
||||
|
||||
# Maximum offset for base teleport location when OffsetOnTeleportEnabled is enabled .
|
||||
# Maximum offset for base teleport location when OffsetOnTeleportEnabled is enabled.
|
||||
# Default: 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.
|
||||
# The MaxPetitionsPerPlayer is the amount of petitions a player can make.
|
||||
# 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 OFFSET_ON_TELEPORT_ENABLED;
|
||||
public static int MAX_OFFSET_ON_TELEPORT;
|
||||
public static boolean TELEPORT_WHILE_SIEGE_IN_PROGRESS;
|
||||
public static boolean PETITIONING_ALLOWED;
|
||||
public static int MAX_PETITIONS_PER_PLAYER;
|
||||
public static int MAX_PETITIONS_PENDING;
|
||||
@ -1801,6 +1802,7 @@ public class Config
|
||||
RANDOM_RESPAWN_IN_TOWN_ENABLED = Character.getBoolean("RandomRespawnInTownEnabled", true);
|
||||
OFFSET_ON_TELEPORT_ENABLED = Character.getBoolean("OffsetOnTeleportEnabled", true);
|
||||
MAX_OFFSET_ON_TELEPORT = Character.getInt("MaxOffsetOnTeleport", 50);
|
||||
TELEPORT_WHILE_SIEGE_IN_PROGRESS = Character.getBoolean("TeleportWhileSiegeInProgress", true);
|
||||
PETITIONING_ALLOWED = Character.getBoolean("PetitioningAllowed", true);
|
||||
MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
||||
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
||||
|
@ -206,19 +206,22 @@ public class TeleportHolder
|
||||
}
|
||||
|
||||
// Check if castle is in siege
|
||||
for (int castleId : loc.getCastleId())
|
||||
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS)
|
||||
{
|
||||
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
||||
for (int castleId : loc.getCastleId())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
|
||||
return;
|
||||
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Validate conditions for NORMAL teleport
|
||||
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());
|
||||
msg.setFile(player, "data/html/teleporter/castleteleporter-busy.htm");
|
||||
|
@ -63,11 +63,14 @@ public class ExRequestTeleport implements IClientIncomingPacket
|
||||
return;
|
||||
}
|
||||
|
||||
final Castle castle = CastleManager.getInstance().getCastle(teleport.getX(), teleport.getY(), teleport.getZ());
|
||||
if ((castle != null) && castle.getSiege().isInProgress())
|
||||
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS)
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
|
||||
return;
|
||||
final Castle castle = CastleManager.getInstance().getCastle(teleport.getX(), teleport.getY(), teleport.getZ());
|
||||
if ((castle != null) && castle.getSiege().isInProgress())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (player.getLevel() > Config.MAX_FREE_TELEPORT_LEVEL)
|
||||
|
@ -666,10 +666,14 @@ RandomRespawnInTownEnabled = True
|
||||
# Default: True
|
||||
OffsetOnTeleportEnabled = True
|
||||
|
||||
# Maximum offset for base teleport location when OffsetOnTeleportEnabled is enabled .
|
||||
# Maximum offset for base teleport location when OffsetOnTeleportEnabled is enabled.
|
||||
# Default: 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.
|
||||
# The MaxPetitionsPerPlayer is the amount of petitions a player can make.
|
||||
# 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 OFFSET_ON_TELEPORT_ENABLED;
|
||||
public static int MAX_OFFSET_ON_TELEPORT;
|
||||
public static boolean TELEPORT_WHILE_SIEGE_IN_PROGRESS;
|
||||
public static boolean PETITIONING_ALLOWED;
|
||||
public static int MAX_PETITIONS_PER_PLAYER;
|
||||
public static int MAX_PETITIONS_PENDING;
|
||||
@ -1798,6 +1799,7 @@ public class Config
|
||||
RANDOM_RESPAWN_IN_TOWN_ENABLED = Character.getBoolean("RandomRespawnInTownEnabled", true);
|
||||
OFFSET_ON_TELEPORT_ENABLED = Character.getBoolean("OffsetOnTeleportEnabled", true);
|
||||
MAX_OFFSET_ON_TELEPORT = Character.getInt("MaxOffsetOnTeleport", 50);
|
||||
TELEPORT_WHILE_SIEGE_IN_PROGRESS = Character.getBoolean("TeleportWhileSiegeInProgress", true);
|
||||
PETITIONING_ALLOWED = Character.getBoolean("PetitioningAllowed", true);
|
||||
MAX_PETITIONS_PER_PLAYER = Character.getInt("MaxPetitionsPerPlayer", 5);
|
||||
MAX_PETITIONS_PENDING = Character.getInt("MaxPetitionsPending", 25);
|
||||
|
@ -206,19 +206,22 @@ public class TeleportHolder
|
||||
}
|
||||
|
||||
// Check if castle is in siege
|
||||
for (int castleId : loc.getCastleId())
|
||||
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS)
|
||||
{
|
||||
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
||||
for (int castleId : loc.getCastleId())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
|
||||
return;
|
||||
if (CastleManager.getInstance().getCastleById(castleId).getSiege().isInProgress())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Validate conditions for NORMAL teleport
|
||||
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());
|
||||
msg.setFile(player, "data/html/teleporter/castleteleporter-busy.htm");
|
||||
|
Loading…
Reference in New Issue
Block a user