Свернуть ↑
Index: src/com/aionemu/gameserver/network/aion/AionConnection.java
================================================== =================
--- src/com/aionemu/gameserver/network/aion/AionConnection.java (revision 2029)
+++ src/com/aionemu/gameserver/network/aion/AionConnection.java (working copy)
@@ -100,7 +100,10 @@
private AionPacketHandler aionPacketHandler;
private PlayerService playerService;
private long lastPingTimeMS;
+ private long lastCheckTimeMS;
+ private long lastCheck1TimeMS;
+
/**
* Constructor
*
@@ -395,4 +398,66 @@
{
this.lastPingTimeMS = lastPingTimeMS;
}
+
+ /**
+
+ * @return the lastCheckTimeMS
+
+ */
+
+ public long getLastCheckTimeMS()
+
+ {
+
+ return lastCheckTimeMS;
+
+ }
+
+
+ /**
+
+ * @param lastCheckTimeMS to set
+
+ */
+
+ public void setLastCheckTimeMS(long lastCheckTimeMS)
+
+ {
+
+ this.lastCheckTimeMS = lastCheckTimeMS;
+
+ }
+
+
+ /**
+
+ * @return the second lastCheckTimeMS
+
+ */
+
+ public long getLastCheck1TimeMS()
+
+ {
+
+ return lastCheck1TimeMS;
+
+ }
+
+
+
+ /**
+
+ * @param the second lastCheckTimeMS to set
+
+ */
+
+ public void setLastCheck1TimeMS(long lastCheck1TimeMS)
+
+ {
+
+ this.lastCheck1TimeMS = lastCheck1TimeMS;
+
+ }
+
}
+
\ No newline at end of file
Index: src/com/aionemu/gameserver/network/aion/clientpackets/CM_MOVE.java
================================================== =================
--- src/com/aionemu/gameserver/network/aion/clientpackets/CM_MOVE.java (revision 2029)
+++ src/com/aionemu/gameserver/network/aion/clientpackets/CM_MOVE.java (working copy)
@@ -24,6 +24,8 @@
import com.aionemu.gameserver.model.gameobjects.stats.Sta tEnum;
import com.aionemu.gameserver.network.aion.AionClientPack et;
import com.aionemu.gameserver.network.aion.serverpackets. SM_MOVE;
+import com.aionemu.gameserver.network.aion.serverpackets. SM_QUIT_RESPONSE;
+
import com.aionemu.gameserver.utils.PacketSendUtility;
import com.aionemu.gameserver.world.World;
import com.google.inject.Inject;
@@ -31,7 +33,7 @@
/**
* Packet about player movement.
*
- * @author -Nemesiss-
+ * @author -Nemesiss-, Ares
*
*/
public class CM_MOVE extends AionClientPacket
@@ -50,7 +52,7 @@
private byte movementType;
- private float x, y, z, x2, y2, z2;
+ private float x, y, z, x2, y2, z2, z3;
private byte glideFlag;
@@ -113,6 +115,8 @@
protected void runImpl()
{
Player player = getConnection().getActivePlayer();
+ float z3 = player.getZ();
+ MoveController mc1 = player.getMoveController();
//packet was not read correctly
if(type == null)
@@ -197,6 +201,65 @@
break;
}
+
+ if(type == MovementType.MOVEMENT_GLIDE_DOWN && z3 < z)
+
+ {
+
+ long lastMS = getConnection().getLastCheckTimeMS();
+
+ if(lastMS > 0)
+
+ {
+
+ long checkInterval = System.currentTimeMillis() - lastMS;
+
+
+ // checkInterval should be 300ms
+
+ if(checkInterval < 300) // client timer cheat
+ {
+
+ long lastMS1 = getConnection().getLastCheck1TimeMS();
+
+ if(lastMS1 > 0 && type == MovementType.MOVEMENT_GLIDE_DOWN && z3 < z)
+
+ {
+
+ long checkInterval2 = System.currentTimeMillis() - lastMS1;
+
+ // checkInterval should be 400ms
+
+ if(checkInterval2 < 400) // client timer cheat
+
+ {
+
+ String name = getConnection().getActivePlayer().getName();
+
+ log.info("[AUDIT] possible client Glide cheat: " + checkInterval + " " + name);
+
+ log.info("[AUDIT] Kicked for Glide cheat: " + checkInterval + " " + name);
+
+
+ getConnection().close(new SM_QUIT_RESPONSE(), true);
+
+ }
+
+ }
+
+ getConnection().setLastCheck1TimeMS(System.current TimeMillis());
+
+ }
+
+ }
+
+ getConnection().setLastCheckTimeMS(System.currentT imeMillis());
+
+ }
+
+
+
+
if(type != MovementType.MOVEMENT_STOP && player.isProtectionActive())
{
player.getController().stopProtectionActiveTask();
Index: src/com/aionemu/gameserver/network/aion/clientpackets/CM_PING.java
================================================== =================
--- src/com/aionemu/gameserver/network/aion/clientpackets/CM_PING.java (revision 2029)
+++ src/com/aionemu/gameserver/network/aion/clientpackets/CM_PING.java (working copy)
@@ -19,6 +19,7 @@
import org.apache.log4j.Logger;
import com.aionemu.gameserver.network.aion.AionClientPack et;
+import com.aionemu.gameserver.network.aion.serverpackets. SM_QUIT_RESPONSE;
import com.aionemu.gameserver.network.aion.serverpackets. SM_PONG;
/**
@@ -62,11 +63,12 @@
{
long pingInterval = System.currentTimeMillis() - lastMS;
// PingInterval should be 3min (180000ms)
- if(pingInterval < 100000)// client timer cheat
+ if(pingInterval < 80000)// client timer cheat
{
String name = getConnection().getActivePlayer().getName();
log.info("[AUDIT] possible client timer cheat: " + pingInterval + " " + name);
- //getConnection().close(new SM_QUIT_RESPONSE(), true);
+ log.info("[AUDIT] Timer cheat kicked: " + pingInterval + " " + name);
+ getConnection().close(new SM_QUIT_RESPONSE(), true);
}
}