private static void MobFactionRegionArea_Callback(Mobile from, Map map, Point3D start, Point3D end, object state) { // assign these coords to the region MobFactionRegionStone s = state as MobFactionRegionStone; if (s != null && from != null) { s.m_MobFactionArea = new Rectangle3D[1]; //s.m_MobFactionArea[0] = new Rectangle3D(start,end); s.m_MobFactionArea[0] = Region.ConvertTo3D(new Rectangle2D(start.X, start.Y, end.X - start.X + 1, end.Y - start.Y + 1)); s.m_MobFactionMap = map; s.CopyRegion = null; s.RefreshRegions(); } }
private static void MobFactionRegionArea_Callback(Mobile from, Map map, Point3D start, Point3D end, object state) { // assign these coords to the region MobFactionRegionStone s = state as MobFactionRegionStone; if (s != null && s.MobFactionRegion != null && from != null) { s.MobFactionArea = new Rectangle2D(start.X, start.Y, end.X - start.X + 1, end.Y - start.Y + 1); s.MobFactionMap = map; ArrayList coords = new ArrayList(); coords.Add(s.MobFactionArea); s.MobFactionRegion.Coords = coords; s.MobFactionRegion.Map = map; s.CopyRegion = null; s.RefreshRegions(); } }