public void OnRemovePointReq(RemovePointReq packet, string ipPort) { Sql.Instance.RemovePoint(packet.PointId, packet.Index, packet.ZoneId); _server.SendToEveryoneExcept(new PointUpdatedAck() { Removed = true, ZoneId = packet.ZoneId, PointId = packet.PointId, Index = packet.Index }, ipPort); }
public void OnRemovePointReq(RemovePointReq packet, User user) { Sql.Instance.RemovePoint(packet.PointId, packet.Index, packet.ZoneId); lock (Server.Dto.Zones) { var zone = Server.Dto.Zones.First(z => z.Id == packet.ZoneId.ToString()); zone.Geometry.Remove(zone.Geometry.First(g => g.Id == packet.PointId)); } _server.SendToEveryoneExcept(new PointUpdatedAck() { Removed = true, ZoneId = packet.ZoneId, PointId = packet.PointId, Index = packet.Index }, user.IpPort); }