Prohibit teleport while casting or in combat.
This commit is contained in:
@@ -56,8 +56,8 @@ public class ExRequestTeleport implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Players should not be able to teleport out of special locations.
|
// Players should not be able to teleport if in combat, or in a special location.
|
||||||
if (player.isInInstance() || player.isOnEvent() || player.isInOlympiadMode() || player.inObserverMode() || player.isInTraingCamp() || player.isInTimedHuntingZone())
|
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);
|
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_RIGHT_NOW);
|
||||||
return;
|
return;
|
||||||
|
@@ -56,8 +56,8 @@ public class ExRequestTeleport implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Players should not be able to teleport out of special locations.
|
// Players should not be able to teleport if in combat, or in a special location.
|
||||||
if (player.isInInstance() || player.isOnEvent() || player.isInOlympiadMode() || player.inObserverMode() || player.isInTraingCamp() || player.isInTimedHuntingZone())
|
if (player.isCastingNow() || player.isInCombat() || player.isInInstance() || player.isOnEvent() || player.isInOlympiadMode() || player.inObserverMode() || player.isInTraingCamp() || player.isInTimedHuntingZone())
|
||||||
{
|
{
|
||||||
player.sendMessage("You cannot teleport right now.");
|
player.sendMessage("You cannot teleport right now.");
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user