public override void OnDoubleClick(Mobile from) { if (from.AccessLevel >= AccessLevel.GameMaster) { UnRegisterDungeon(this); IRegion = RegisterDungeon(this); this.Name = "a dungeon control stone for \"" + this.DungeonName + "\""; if (IRegion != null) { from.SendMessage(34, "Dungeon Region Updated"); } else { from.SendMessage(34, "Dungeon Update Error. Contact the Admin."); } } }
public GroupDungeonRegion RegisterDungeon(GroupDungeonStone stone) { if (stone != null) { //Build Rect2d from the stone, then register the region. Point2D center = new Point2D(stone.X, stone.Y); Point2D start = new Point2D(center.X - stone.Size, center.Y - stone.Size); Point2D end = new Point2D(center.X + stone.Size, center.Y + stone.Size); Rectangle2D box = new Rectangle2D(start, end); GroupDungeonRegion reg = new GroupDungeonRegion(stone, stone.Map, stone.DungeonName, box); reg.DungeonReset(); reg.Register(); return(reg); } else { return(null); } }