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