diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/ExRequestTeleport.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/ExRequestTeleport.java index f445634aa3..9aea450682 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/ExRequestTeleport.java +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/ExRequestTeleport.java @@ -57,8 +57,15 @@ public class ExRequestTeleport implements IClientIncomingPacket return; } + // Dead characters cannot use teleports. + if (player.isDead()) + { + player.sendPacket(SystemMessageId.CANNOT_TELEPORT_WHILE_DEAD); + return; + } + // Players should not be able to teleport if in combat, or in a special location. - if (player.isCastingNow() || player.isInCombat() || player.isInInstance() || player.isOnEvent() || player.isInOlympiadMode() || player.inObserverMode() || player.isInTraingCamp() || player.isInsideZone(ZoneId.TIMED_HUNTING)) + if (player.isCastingNow() || player.isInCombat() || player.isImmobilized() || player.isInInstance() || player.isOnEvent() || player.isInOlympiadMode() || player.inObserverMode() || player.isInTraingCamp() || player.isInsideZone(ZoneId.TIMED_HUNTING)) { player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_RIGHT_NOW); return; diff --git a/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/teleports/ExRequestTeleport.java b/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/teleports/ExRequestTeleport.java index 50fcf38028..b975ab0b8c 100644 --- a/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/teleports/ExRequestTeleport.java +++ b/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/teleports/ExRequestTeleport.java @@ -58,8 +58,15 @@ public class ExRequestTeleport implements IClientIncomingPacket return; } + // Dead characters cannot use teleports. + if (player.isDead()) + { + player.sendPacket(SystemMessageId.CANNOT_TELEPORT_WHILE_DEAD); + return; + } + // Players should not be able to teleport if in combat, or in a special location. - if (player.isCastingNow() || player.isInCombat() || player.isInInstance() || player.isOnEvent() || player.isInOlympiadMode() || player.inObserverMode() || player.isInTraingCamp() || player.isInsideZone(ZoneId.TIMED_HUNTING)) + if (player.isCastingNow() || player.isInCombat() || player.isImmobilized() || player.isInInstance() || player.isOnEvent() || player.isInOlympiadMode() || player.inObserverMode() || player.isInTraingCamp() || player.isInsideZone(ZoneId.TIMED_HUNTING)) { player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_RIGHT_NOW); return; diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/ExRequestTeleport.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/ExRequestTeleport.java index 9b067fed67..52fbe37d13 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/ExRequestTeleport.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/ExRequestTeleport.java @@ -57,8 +57,15 @@ public class ExRequestTeleport implements IClientIncomingPacket return; } + // Dead characters cannot use teleports. + if (player.isDead()) + { + player.sendMessage("Dead characters cannot use teleports."); + return; + } + // Players should not be able to teleport if in combat, or in a special location. - if (player.isCastingNow() || player.isInCombat() || player.isInInstance() || player.isOnEvent() || player.isInOlympiadMode() || player.inObserverMode() || player.isInTraingCamp() || player.isInsideZone(ZoneId.TIMED_HUNTING)) + if (player.isCastingNow() || player.isInCombat() || player.isImmobilized() || player.isInInstance() || player.isOnEvent() || player.isInOlympiadMode() || player.inObserverMode() || player.isInTraingCamp() || player.isInsideZone(ZoneId.TIMED_HUNTING)) { player.sendMessage("You cannot teleport right now."); return; diff --git a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/teleports/ExRequestTeleport.java b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/teleports/ExRequestTeleport.java index 2f3c559e45..6a493b6b36 100644 --- a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/teleports/ExRequestTeleport.java +++ b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/clientpackets/teleports/ExRequestTeleport.java @@ -58,10 +58,17 @@ public class ExRequestTeleport implements IClientIncomingPacket return; } - // Players should not be able to teleport if in combat, or in a special location. - if (player.isCastingNow() || player.isInCombat() || player.isInInstance() || player.isOnEvent() || player.isInOlympiadMode() || player.inObserverMode() || player.isInTraingCamp() || player.isInsideZone(ZoneId.TIMED_HUNTING)) + // Dead characters cannot use teleports. + if (player.isDead()) { - player.sendMessage("You cannot teleport right now."); + player.sendPacket(SystemMessageId.DEAD_CHARACTERS_CANNOT_USE_TELEPORTS); + return; + } + + // Players should not be able to teleport if in combat, or in a special location. + if (player.isCastingNow() || player.isInCombat() || player.isImmobilized() || player.isInInstance() || player.isOnEvent() || player.isInOlympiadMode() || player.inObserverMode() || player.isInTraingCamp() || player.isInsideZone(ZoneId.TIMED_HUNTING)) + { + player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_RIGHT_NOW); return; }