private Packet InMap(Packet packet, IPEndPoint sim) { lock (recSeq) { if (!recSeq.Contains(packet.Header.Sequence)) { recSeq.Add(packet.Header.Sequence); if (recSeq.Count > 200) { recSeq.RemoveAt(0); } if (form.checkBox2map.Checked) { ScriptTeleportRequestPacket stp = (ScriptTeleportRequestPacket)packet; lock (lastMaps) { lastMaps.Add(new maps(stp)); if (lastMaps.Count > 3) { lastMaps.RemoveAt(0); } } List <String> whos = new List <string>(); List <Vector3> whares = new List <Vector3>(); lock (lastMaps) { foreach (maps m in lastMaps) { ScriptTeleportRequestPacket mp = m.m; String who = Utils.BytesToString(mp.Data.ObjectName); Vector3 whare = mp.Data.SimPosition; if (!whos.Contains(who)) { whos.Add(who); } if (!whares.Contains(whare)) { whares.Add(whare); } } } if (whos.Count == 1 && whares.Count <= 3 && lastMaps.Count == 3) { TimeSpan duration = this.lastMaps[2].time - lastMaps[0].time; if (duration.TotalMilliseconds < 3500) { form.textBox1.Text += "DM"; //proxy.writeinthis("DM", ConsoleColor.Black, ConsoleColor.Red); return(null); } } } } else { return(null); } } return(packet); }
public maps(ScriptTeleportRequestPacket p) { m = p; time = System.DateTime.Now; }
public maps(ScriptTeleportRequestPacket p) { m = p; time = System.DateTime.Now; }