Dead players should not be able to teleport.
This commit is contained in:
@@ -57,8 +57,15 @@ public class ExRequestTeleport implements IClientIncomingPacket
|
|||||||
return;
|
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.
|
// 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);
|
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_RIGHT_NOW);
|
||||||
return;
|
return;
|
||||||
|
@@ -58,8 +58,15 @@ public class ExRequestTeleport implements IClientIncomingPacket
|
|||||||
return;
|
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.
|
// 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);
|
player.sendPacket(SystemMessageId.YOU_CANNOT_TELEPORT_RIGHT_NOW);
|
||||||
return;
|
return;
|
||||||
|
@@ -57,8 +57,15 @@ public class ExRequestTeleport implements IClientIncomingPacket
|
|||||||
return;
|
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.
|
// 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.");
|
player.sendMessage("You cannot teleport right now.");
|
||||||
return;
|
return;
|
||||||
|
@@ -58,10 +58,17 @@ public class ExRequestTeleport implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Players should not be able to teleport if in combat, or in a special location.
|
// Dead characters cannot use teleports.
|
||||||
if (player.isCastingNow() || player.isInCombat() || player.isInInstance() || player.isOnEvent() || player.isInOlympiadMode() || player.inObserverMode() || player.isInTraingCamp() || player.isInsideZone(ZoneId.TIMED_HUNTING))
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user