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 6efa69e894..267e6be22c 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 @@ -56,8 +56,8 @@ public class ExRequestTeleport implements IClientIncomingPacket return; } - // Players should not be able to teleport out of special locations. - if (player.isInInstance() || player.isOnEvent() || player.isInOlympiadMode() || player.inObserverMode() || player.isInTraingCamp() || player.isInTimedHuntingZone()) + // 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.isInTimedHuntingZone()) { 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 e800477d08..4ea894448c 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 @@ -56,8 +56,8 @@ public class ExRequestTeleport implements IClientIncomingPacket return; } - // Players should not be able to teleport out of special locations. - if (player.isInInstance() || player.isOnEvent() || player.isInOlympiadMode() || player.inObserverMode() || player.isInTraingCamp() || player.isInTimedHuntingZone()) + // 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.isInTimedHuntingZone()) { player.sendMessage("You cannot teleport right now."); return;