Try to prevent possible door exploits.
This commit is contained in:
@@ -21,6 +21,7 @@ import java.util.Arrays;
|
|||||||
import com.l2jmobius.Config;
|
import com.l2jmobius.Config;
|
||||||
import com.l2jmobius.commons.network.PacketReader;
|
import com.l2jmobius.commons.network.PacketReader;
|
||||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||||
|
import com.l2jmobius.gameserver.data.xml.impl.DoorData;
|
||||||
import com.l2jmobius.gameserver.enums.AdminTeleportType;
|
import com.l2jmobius.gameserver.enums.AdminTeleportType;
|
||||||
import com.l2jmobius.gameserver.enums.SayuneType;
|
import com.l2jmobius.gameserver.enums.SayuneType;
|
||||||
import com.l2jmobius.gameserver.model.Location;
|
import com.l2jmobius.gameserver.model.Location;
|
||||||
@@ -86,6 +87,13 @@ public class MoveBackwardToLocation implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Mobius: Check for possible door logout and move over exploit. Also checked at ValidatePosition.
|
||||||
|
if (DoorData.getInstance().checkIfDoorsBetween(activeChar.getX(), activeChar.getY(), activeChar.getZ(), _targetX, _targetY, _targetZ, activeChar.getInstanceWorld(), false))
|
||||||
|
{
|
||||||
|
activeChar.stopMove(activeChar.getLastServerPosition());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Correcting targetZ from floor level to head level (?)
|
// Correcting targetZ from floor level to head level (?)
|
||||||
// Client is giving floor level as targetZ but that floor level doesn't
|
// Client is giving floor level as targetZ but that floor level doesn't
|
||||||
// match our current geodata and teleport coords as good as head level!
|
// match our current geodata and teleport coords as good as head level!
|
||||||
|
@@ -18,6 +18,7 @@ package com.l2jmobius.gameserver.network.clientpackets;
|
|||||||
|
|
||||||
import com.l2jmobius.Config;
|
import com.l2jmobius.Config;
|
||||||
import com.l2jmobius.commons.network.PacketReader;
|
import com.l2jmobius.commons.network.PacketReader;
|
||||||
|
import com.l2jmobius.gameserver.data.xml.impl.DoorData;
|
||||||
import com.l2jmobius.gameserver.model.L2World;
|
import com.l2jmobius.gameserver.model.L2World;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||||
import com.l2jmobius.gameserver.model.zone.ZoneId;
|
import com.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
@@ -202,6 +203,11 @@ public class ValidatePosition implements IClientIncomingPacket
|
|||||||
activeChar.setClientY(_y);
|
activeChar.setClientY(_y);
|
||||||
activeChar.setClientZ(_z);
|
activeChar.setClientZ(_z);
|
||||||
activeChar.setClientHeading(_heading); // No real need to validate heading.
|
activeChar.setClientHeading(_heading); // No real need to validate heading.
|
||||||
|
|
||||||
|
// Mobius: Check for possible door logout and move over exploit. Also checked at MoveBackwardToLocation.
|
||||||
|
if (!DoorData.getInstance().checkIfDoorsBetween(realX, realY, realZ, _x, _y, _z, activeChar.getInstanceWorld(), false))
|
||||||
|
{
|
||||||
activeChar.setLastServerPosition(realX, realY, realZ);
|
activeChar.setLastServerPosition(realX, realY, realZ);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -21,6 +21,7 @@ import java.util.Arrays;
|
|||||||
import com.l2jmobius.Config;
|
import com.l2jmobius.Config;
|
||||||
import com.l2jmobius.commons.network.PacketReader;
|
import com.l2jmobius.commons.network.PacketReader;
|
||||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||||
|
import com.l2jmobius.gameserver.data.xml.impl.DoorData;
|
||||||
import com.l2jmobius.gameserver.enums.AdminTeleportType;
|
import com.l2jmobius.gameserver.enums.AdminTeleportType;
|
||||||
import com.l2jmobius.gameserver.enums.SayuneType;
|
import com.l2jmobius.gameserver.enums.SayuneType;
|
||||||
import com.l2jmobius.gameserver.model.Location;
|
import com.l2jmobius.gameserver.model.Location;
|
||||||
@@ -86,6 +87,13 @@ public class MoveBackwardToLocation implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Mobius: Check for possible door logout and move over exploit. Also checked at ValidatePosition.
|
||||||
|
if (DoorData.getInstance().checkIfDoorsBetween(activeChar.getX(), activeChar.getY(), activeChar.getZ(), _targetX, _targetY, _targetZ, activeChar.getInstanceWorld(), false))
|
||||||
|
{
|
||||||
|
activeChar.stopMove(activeChar.getLastServerPosition());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Correcting targetZ from floor level to head level (?)
|
// Correcting targetZ from floor level to head level (?)
|
||||||
// Client is giving floor level as targetZ but that floor level doesn't
|
// Client is giving floor level as targetZ but that floor level doesn't
|
||||||
// match our current geodata and teleport coords as good as head level!
|
// match our current geodata and teleport coords as good as head level!
|
||||||
|
@@ -18,6 +18,7 @@ package com.l2jmobius.gameserver.network.clientpackets;
|
|||||||
|
|
||||||
import com.l2jmobius.Config;
|
import com.l2jmobius.Config;
|
||||||
import com.l2jmobius.commons.network.PacketReader;
|
import com.l2jmobius.commons.network.PacketReader;
|
||||||
|
import com.l2jmobius.gameserver.data.xml.impl.DoorData;
|
||||||
import com.l2jmobius.gameserver.model.L2World;
|
import com.l2jmobius.gameserver.model.L2World;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||||
import com.l2jmobius.gameserver.model.zone.ZoneId;
|
import com.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
@@ -202,6 +203,11 @@ public class ValidatePosition implements IClientIncomingPacket
|
|||||||
activeChar.setClientY(_y);
|
activeChar.setClientY(_y);
|
||||||
activeChar.setClientZ(_z);
|
activeChar.setClientZ(_z);
|
||||||
activeChar.setClientHeading(_heading); // No real need to validate heading.
|
activeChar.setClientHeading(_heading); // No real need to validate heading.
|
||||||
|
|
||||||
|
// Mobius: Check for possible door logout and move over exploit. Also checked at MoveBackwardToLocation.
|
||||||
|
if (!DoorData.getInstance().checkIfDoorsBetween(realX, realY, realZ, _x, _y, _z, activeChar.getInstanceWorld(), false))
|
||||||
|
{
|
||||||
activeChar.setLastServerPosition(realX, realY, realZ);
|
activeChar.setLastServerPosition(realX, realY, realZ);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -21,6 +21,7 @@ import java.util.Arrays;
|
|||||||
import com.l2jmobius.Config;
|
import com.l2jmobius.Config;
|
||||||
import com.l2jmobius.commons.network.PacketReader;
|
import com.l2jmobius.commons.network.PacketReader;
|
||||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||||
|
import com.l2jmobius.gameserver.data.xml.impl.DoorData;
|
||||||
import com.l2jmobius.gameserver.enums.AdminTeleportType;
|
import com.l2jmobius.gameserver.enums.AdminTeleportType;
|
||||||
import com.l2jmobius.gameserver.enums.SayuneType;
|
import com.l2jmobius.gameserver.enums.SayuneType;
|
||||||
import com.l2jmobius.gameserver.model.Location;
|
import com.l2jmobius.gameserver.model.Location;
|
||||||
@@ -86,6 +87,13 @@ public class MoveBackwardToLocation implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Mobius: Check for possible door logout and move over exploit. Also checked at ValidatePosition.
|
||||||
|
if (DoorData.getInstance().checkIfDoorsBetween(activeChar.getX(), activeChar.getY(), activeChar.getZ(), _targetX, _targetY, _targetZ, activeChar.getInstanceWorld(), false))
|
||||||
|
{
|
||||||
|
activeChar.stopMove(activeChar.getLastServerPosition());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Correcting targetZ from floor level to head level (?)
|
// Correcting targetZ from floor level to head level (?)
|
||||||
// Client is giving floor level as targetZ but that floor level doesn't
|
// Client is giving floor level as targetZ but that floor level doesn't
|
||||||
// match our current geodata and teleport coords as good as head level!
|
// match our current geodata and teleport coords as good as head level!
|
||||||
|
@@ -18,6 +18,7 @@ package com.l2jmobius.gameserver.network.clientpackets;
|
|||||||
|
|
||||||
import com.l2jmobius.Config;
|
import com.l2jmobius.Config;
|
||||||
import com.l2jmobius.commons.network.PacketReader;
|
import com.l2jmobius.commons.network.PacketReader;
|
||||||
|
import com.l2jmobius.gameserver.data.xml.impl.DoorData;
|
||||||
import com.l2jmobius.gameserver.model.L2World;
|
import com.l2jmobius.gameserver.model.L2World;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||||
import com.l2jmobius.gameserver.model.zone.ZoneId;
|
import com.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
@@ -202,6 +203,11 @@ public class ValidatePosition implements IClientIncomingPacket
|
|||||||
activeChar.setClientY(_y);
|
activeChar.setClientY(_y);
|
||||||
activeChar.setClientZ(_z);
|
activeChar.setClientZ(_z);
|
||||||
activeChar.setClientHeading(_heading); // No real need to validate heading.
|
activeChar.setClientHeading(_heading); // No real need to validate heading.
|
||||||
|
|
||||||
|
// Mobius: Check for possible door logout and move over exploit. Also checked at MoveBackwardToLocation.
|
||||||
|
if (!DoorData.getInstance().checkIfDoorsBetween(realX, realY, realZ, _x, _y, _z, activeChar.getInstanceWorld(), false))
|
||||||
|
{
|
||||||
activeChar.setLastServerPosition(realX, realY, realZ);
|
activeChar.setLastServerPosition(realX, realY, realZ);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -21,6 +21,7 @@ import java.util.Arrays;
|
|||||||
import com.l2jmobius.Config;
|
import com.l2jmobius.Config;
|
||||||
import com.l2jmobius.commons.network.PacketReader;
|
import com.l2jmobius.commons.network.PacketReader;
|
||||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||||
|
import com.l2jmobius.gameserver.data.xml.impl.DoorData;
|
||||||
import com.l2jmobius.gameserver.enums.AdminTeleportType;
|
import com.l2jmobius.gameserver.enums.AdminTeleportType;
|
||||||
import com.l2jmobius.gameserver.enums.SayuneType;
|
import com.l2jmobius.gameserver.enums.SayuneType;
|
||||||
import com.l2jmobius.gameserver.model.Location;
|
import com.l2jmobius.gameserver.model.Location;
|
||||||
@@ -86,6 +87,13 @@ public class MoveBackwardToLocation implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Mobius: Check for possible door logout and move over exploit. Also checked at ValidatePosition.
|
||||||
|
if (DoorData.getInstance().checkIfDoorsBetween(activeChar.getX(), activeChar.getY(), activeChar.getZ(), _targetX, _targetY, _targetZ, activeChar.getInstanceWorld(), false))
|
||||||
|
{
|
||||||
|
activeChar.stopMove(activeChar.getLastServerPosition());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Correcting targetZ from floor level to head level (?)
|
// Correcting targetZ from floor level to head level (?)
|
||||||
// Client is giving floor level as targetZ but that floor level doesn't
|
// Client is giving floor level as targetZ but that floor level doesn't
|
||||||
// match our current geodata and teleport coords as good as head level!
|
// match our current geodata and teleport coords as good as head level!
|
||||||
|
@@ -18,6 +18,7 @@ package com.l2jmobius.gameserver.network.clientpackets;
|
|||||||
|
|
||||||
import com.l2jmobius.Config;
|
import com.l2jmobius.Config;
|
||||||
import com.l2jmobius.commons.network.PacketReader;
|
import com.l2jmobius.commons.network.PacketReader;
|
||||||
|
import com.l2jmobius.gameserver.data.xml.impl.DoorData;
|
||||||
import com.l2jmobius.gameserver.model.L2World;
|
import com.l2jmobius.gameserver.model.L2World;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||||
import com.l2jmobius.gameserver.model.zone.ZoneId;
|
import com.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
@@ -202,6 +203,11 @@ public class ValidatePosition implements IClientIncomingPacket
|
|||||||
activeChar.setClientY(_y);
|
activeChar.setClientY(_y);
|
||||||
activeChar.setClientZ(_z);
|
activeChar.setClientZ(_z);
|
||||||
activeChar.setClientHeading(_heading); // No real need to validate heading.
|
activeChar.setClientHeading(_heading); // No real need to validate heading.
|
||||||
|
|
||||||
|
// Mobius: Check for possible door logout and move over exploit. Also checked at MoveBackwardToLocation.
|
||||||
|
if (!DoorData.getInstance().checkIfDoorsBetween(realX, realY, realZ, _x, _y, _z, activeChar.getInstanceWorld(), false))
|
||||||
|
{
|
||||||
activeChar.setLastServerPosition(realX, realY, realZ);
|
activeChar.setLastServerPosition(realX, realY, realZ);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -20,6 +20,7 @@ import java.nio.BufferUnderflowException;
|
|||||||
|
|
||||||
import com.l2jmobius.Config;
|
import com.l2jmobius.Config;
|
||||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||||
|
import com.l2jmobius.gameserver.data.xml.impl.DoorData;
|
||||||
import com.l2jmobius.gameserver.model.Location;
|
import com.l2jmobius.gameserver.model.Location;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||||
import com.l2jmobius.gameserver.model.events.EventDispatcher;
|
import com.l2jmobius.gameserver.model.events.EventDispatcher;
|
||||||
@@ -85,6 +86,13 @@ public class MoveBackwardToLocation extends L2GameClientPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Mobius: Check for possible door logout and move over exploit. Also checked at ValidatePosition.
|
||||||
|
if (DoorData.getInstance().checkIfDoorsBetween(activeChar.getX(), activeChar.getY(), activeChar.getZ(), _targetX, _targetY, _targetZ, activeChar.getInstanceId(), false))
|
||||||
|
{
|
||||||
|
activeChar.stopMove(activeChar.getLastServerPosition());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Correcting targetZ from floor level to head level (?)
|
// Correcting targetZ from floor level to head level (?)
|
||||||
// Client is giving floor level as targetZ but that floor level doesn't
|
// Client is giving floor level as targetZ but that floor level doesn't
|
||||||
// match our current geodata and teleport coords as good as head level!
|
// match our current geodata and teleport coords as good as head level!
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
package com.l2jmobius.gameserver.network.clientpackets;
|
package com.l2jmobius.gameserver.network.clientpackets;
|
||||||
|
|
||||||
import com.l2jmobius.Config;
|
import com.l2jmobius.Config;
|
||||||
|
import com.l2jmobius.gameserver.data.xml.impl.DoorData;
|
||||||
import com.l2jmobius.gameserver.model.L2World;
|
import com.l2jmobius.gameserver.model.L2World;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||||
import com.l2jmobius.gameserver.model.zone.ZoneId;
|
import com.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
@@ -199,6 +200,11 @@ public class ValidatePosition extends L2GameClientPacket
|
|||||||
activeChar.setClientY(_y);
|
activeChar.setClientY(_y);
|
||||||
activeChar.setClientZ(_z);
|
activeChar.setClientZ(_z);
|
||||||
activeChar.setClientHeading(_heading); // No real need to validate heading.
|
activeChar.setClientHeading(_heading); // No real need to validate heading.
|
||||||
|
|
||||||
|
// Mobius: Check for possible door logout and move over exploit. Also checked at MoveBackwardToLocation.
|
||||||
|
if (!DoorData.getInstance().checkIfDoorsBetween(realX, realY, realZ, _x, _y, _z, activeChar.getInstanceId(), false))
|
||||||
|
{
|
||||||
activeChar.setLastServerPosition(realX, realY, realZ);
|
activeChar.setLastServerPosition(realX, realY, realZ);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -21,6 +21,7 @@ import java.util.Arrays;
|
|||||||
import com.l2jmobius.Config;
|
import com.l2jmobius.Config;
|
||||||
import com.l2jmobius.commons.network.PacketReader;
|
import com.l2jmobius.commons.network.PacketReader;
|
||||||
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
import com.l2jmobius.gameserver.ai.CtrlIntention;
|
||||||
|
import com.l2jmobius.gameserver.data.xml.impl.DoorData;
|
||||||
import com.l2jmobius.gameserver.enums.AdminTeleportType;
|
import com.l2jmobius.gameserver.enums.AdminTeleportType;
|
||||||
import com.l2jmobius.gameserver.enums.SayuneType;
|
import com.l2jmobius.gameserver.enums.SayuneType;
|
||||||
import com.l2jmobius.gameserver.model.Location;
|
import com.l2jmobius.gameserver.model.Location;
|
||||||
@@ -86,6 +87,13 @@ public class MoveBackwardToLocation implements IClientIncomingPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Mobius: Check for possible door logout and move over exploit. Also checked at ValidatePosition.
|
||||||
|
if (DoorData.getInstance().checkIfDoorsBetween(activeChar.getX(), activeChar.getY(), activeChar.getZ(), _targetX, _targetY, _targetZ, activeChar.getInstanceWorld(), false))
|
||||||
|
{
|
||||||
|
activeChar.stopMove(activeChar.getLastServerPosition());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Correcting targetZ from floor level to head level (?)
|
// Correcting targetZ from floor level to head level (?)
|
||||||
// Client is giving floor level as targetZ but that floor level doesn't
|
// Client is giving floor level as targetZ but that floor level doesn't
|
||||||
// match our current geodata and teleport coords as good as head level!
|
// match our current geodata and teleport coords as good as head level!
|
||||||
|
@@ -18,6 +18,7 @@ package com.l2jmobius.gameserver.network.clientpackets;
|
|||||||
|
|
||||||
import com.l2jmobius.Config;
|
import com.l2jmobius.Config;
|
||||||
import com.l2jmobius.commons.network.PacketReader;
|
import com.l2jmobius.commons.network.PacketReader;
|
||||||
|
import com.l2jmobius.gameserver.data.xml.impl.DoorData;
|
||||||
import com.l2jmobius.gameserver.model.L2World;
|
import com.l2jmobius.gameserver.model.L2World;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||||
import com.l2jmobius.gameserver.model.zone.ZoneId;
|
import com.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
@@ -202,6 +203,11 @@ public class ValidatePosition implements IClientIncomingPacket
|
|||||||
activeChar.setClientY(_y);
|
activeChar.setClientY(_y);
|
||||||
activeChar.setClientZ(_z);
|
activeChar.setClientZ(_z);
|
||||||
activeChar.setClientHeading(_heading); // No real need to validate heading.
|
activeChar.setClientHeading(_heading); // No real need to validate heading.
|
||||||
|
|
||||||
|
// Mobius: Check for possible door logout and move over exploit. Also checked at MoveBackwardToLocation.
|
||||||
|
if (!DoorData.getInstance().checkIfDoorsBetween(realX, realY, realZ, _x, _y, _z, activeChar.getInstanceWorld(), false))
|
||||||
|
{
|
||||||
activeChar.setLastServerPosition(realX, realY, realZ);
|
activeChar.setLastServerPosition(realX, realY, realZ);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user