public void EnterInnArea(Mobile from, Map map, Rectangle2D rect, object control) { RegionControl r = (RegionControl)control; r.m_InnBounds.Add(rect); r.UpdateRegion(); }
private static void DoChooseArea(Mobile from, Map map, Point3D start, Point3D end, object control) { RegionControl r = (RegionControl)control; Rectangle2D rect = new Rectangle2D(start.X, start.Y, end.X - start.X + 1, end.Y - start.Y + 1); r.m_Coords.Add(rect); r.UpdateRegion(); }
protected static void DoChooseArea(Mobile from, Map map, Point3D start, Point3D end, object control, bool inn) { RegionControl r = (RegionControl)control; if (inn == false) { Rectangle2D rect = new Rectangle2D(start.X, start.Y, end.X - start.X + 1, end.Y - start.Y + 1); r.m_Coords.Add(rect); } if (inn) { Rectangle2D rect = new Rectangle2D(start.X, start.Y, end.X - start.X + 1, end.Y - start.Y + 1); r.m_InnBounds.Add(rect); } r.UpdateRegion(); }
private static void DoChooseArea(Mobile from, Map map, Point3D start, Point3D end, object control) { try { RegionControl r = (RegionControl)control; Rectangle2D rect = new Rectangle2D(start.X, start.Y, end.X - start.X + 1, end.Y - start.Y + 1); // Hopefully this line fixes it... if not, it'll get caught in Try/Catch. if (r.m_Coords == null) { r.m_Coords = new ArrayList(); } r.m_Coords.Add(rect); r.UpdateRegion(); } catch { from.SendMessage("Caught a crash while trying to set a static housing region. Tell Valik or Rook."); Console.WriteLine("Still crashing in DoChooseArea..."); } }