Karma configurations for teleporting.

This commit is contained in:
MobiusDevelopment 2020-12-08 04:54:21 +00:00
parent 3544f9961a
commit 8358c6d33b
4 changed files with 28 additions and 0 deletions

View File

@ -64,6 +64,13 @@ public class ExRequestTeleport implements IClientIncomingPacket
return;
}
// Karma related configurations.
if ((!Config.ALT_GAME_KARMA_PLAYER_CAN_TELEPORT || !Config.ALT_GAME_KARMA_PLAYER_CAN_USE_GK) && (player.getReputation() < 0))
{
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_RIGHT_NOW);
return;
}
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS)
{
final Castle castle = CastleManager.getInstance().getCastle(teleport.getX(), teleport.getY(), teleport.getZ());

View File

@ -65,6 +65,13 @@ public class ExRequestTeleport implements IClientIncomingPacket
return;
}
// Karma related configurations.
if ((!Config.ALT_GAME_KARMA_PLAYER_CAN_TELEPORT || !Config.ALT_GAME_KARMA_PLAYER_CAN_USE_GK) && (player.getReputation() < 0))
{
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_RIGHT_NOW);
return;
}
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS)
{
final Castle castle = CastleManager.getInstance().getCastle(teleport.getX(), teleport.getY(), teleport.getZ());

View File

@ -64,6 +64,13 @@ public class ExRequestTeleport implements IClientIncomingPacket
return;
}
// Karma related configurations.
if ((!Config.ALT_GAME_KARMA_PLAYER_CAN_TELEPORT || !Config.ALT_GAME_KARMA_PLAYER_CAN_USE_GK) && (player.getReputation() < 0))
{
player.sendMessage("You cannot teleport right now.");
return;
}
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS)
{
final Castle castle = CastleManager.getInstance().getCastle(teleport.getX(), teleport.getY(), teleport.getZ());

View File

@ -65,6 +65,13 @@ public class ExRequestTeleport implements IClientIncomingPacket
return;
}
// Karma related configurations.
if ((!Config.ALT_GAME_KARMA_PLAYER_CAN_TELEPORT || !Config.ALT_GAME_KARMA_PLAYER_CAN_USE_GK) && (player.getReputation() < 0))
{
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_RIGHT_NOW);
return;
}
if (!Config.TELEPORT_WHILE_SIEGE_IN_PROGRESS)
{
final Castle castle = CastleManager.getInstance().getCastle(teleport.getX(), teleport.getY(), teleport.getZ());