Set last server position when player is restored.
This commit is contained in:
@@ -6821,7 +6821,11 @@ public final class L2PcInstance extends L2Playable
|
||||
player.setVitalityPoints(rset.getInt("vitality_points"), true);
|
||||
|
||||
// Set the x,y,z position of the L2PcInstance and make it invisible
|
||||
player.setXYZInvisible(rset.getInt("x"), rset.getInt("y"), rset.getInt("z"));
|
||||
final int x = rset.getInt("x");
|
||||
final int y = rset.getInt("y");
|
||||
final int z = rset.getInt("z");
|
||||
player.setXYZInvisible(x, y, z);
|
||||
player.setLastServerPosition(x, y, z);
|
||||
|
||||
// Set Teleport Bookmark Slot
|
||||
player.setBookMarkSlot(rset.getInt("BookmarkSlot"));
|
||||
|
@@ -86,6 +86,7 @@ public class MoveBackwardToLocation implements IClientIncomingPacket
|
||||
if ((_targetX == _originX) && (_targetY == _originY) && (_targetZ == _originZ))
|
||||
{
|
||||
activeChar.sendPacket(new StopMove(activeChar));
|
||||
activeChar.sendPacket(ActionFailed.STATIC_PACKET);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -93,6 +94,7 @@ public class MoveBackwardToLocation implements IClientIncomingPacket
|
||||
if (DoorData.getInstance().checkIfDoorsBetween(activeChar.getX(), activeChar.getY(), activeChar.getZ(), _targetX, _targetY, _targetZ, activeChar.getInstanceId(), false))
|
||||
{
|
||||
activeChar.stopMove(activeChar.getLastServerPosition());
|
||||
activeChar.sendPacket(ActionFailed.STATIC_PACKET);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user