Dead players should not be able to teleport.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user