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.commons.network.PacketReader;
|
||||
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.SayuneType;
|
||||
import com.l2jmobius.gameserver.model.Location;
|
||||
@ -86,6 +87,13 @@ public class MoveBackwardToLocation implements IClientIncomingPacket
|
||||
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 (?)
|
||||
// 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!
|
||||
|
@ -18,6 +18,7 @@ package com.l2jmobius.gameserver.network.clientpackets;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
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.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.zone.ZoneId;
|
||||
@ -202,6 +203,11 @@ public class ValidatePosition implements IClientIncomingPacket
|
||||
activeChar.setClientY(_y);
|
||||
activeChar.setClientZ(_z);
|
||||
activeChar.setClientHeading(_heading); // No real need to validate heading.
|
||||
activeChar.setLastServerPosition(realX, realY, realZ);
|
||||
|
||||
// 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user