Prohibit teleport while casting or in combat.

This commit is contained in:
MobiusDevelopment
2020-02-06 15:09:25 +00:00
parent a8a9318d2d
commit 020f4b4566
2 changed files with 4 additions and 4 deletions

View File

@@ -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;