public override void Perform(Vec3S32[] marks, Brush brush, Action <DrawOpBlock> output) { string target = whoName.ToLower(); UndoFormatArgs args = new UndoFormatArgs(Player, Start, DateTime.MaxValue, output); if (Min.X != ushort.MaxValue) { UndoFormat.DoUndoArea(target, Min, Max, ref found, args); } else { UndoFormat.DoUndo(target, ref found, args); } }
bool UndoBlocks(Player p, Player who, Action <DrawOpBlock> output) { UndoFormatArgs args = new UndoFormatArgs(p, Start, End, output); UndoFormat format = new UndoFormatOnline(who.UndoBuffer); if (Min.X != ushort.MaxValue) { UndoFormat.DoUndoArea(null, Min, Max, format, args); } else { UndoFormat.DoUndo(null, format, args); } return(args.Stop); }
public override void Perform(Vec3S32[] marks, Brush brush, Action <DrawOpBlock> output) { UndoCache cache = who.UndoBuffer; using (IDisposable locker = cache.ClearLock.AccquireReadLock()) { if (UndoBlocks(Player, who, output)) { return; } } bool found = false; string target = who.name.ToLower(); UndoFormatArgs args = new UndoFormatArgs(Player, Start, End, output); if (Min.X != ushort.MaxValue) { UndoFormat.DoUndoArea(target, Min, Max, ref found, args); } else { UndoFormat.DoUndo(target, ref found, args); } }