예제 #1
0
        static void HighlightPlayer(Player p, TimeSpan delta, string who, int[] ids, Vec3S32[] marks)
        {
            HighlightDrawOp op = new HighlightDrawOp();

            op.Start = DateTime.UtcNow.Subtract(delta);
            op.who   = who; op.ids = ids;
            op.Setup(p, p.level, marks);

            BufferedBlockSender buffer = new BufferedBlockSender(p);

            op.Perform(marks, null,
                       P => {
                int index = p.level.PosToInt(P.X, P.Y, P.Z);
                buffer.Add(index, P.Block);
            });
            buffer.Flush();

            if (op.found)
            {
                p.Message("Now highlighting past &b{0} &Sfor {1}",
                          delta.Shorten(true), p.FormatNick(who));
                p.Message("&WUse /reload to un-highlight");
            }
            else
            {
                p.Message("No changes found by {1} &Sin the past &b{0}",
                          delta.Shorten(true), p.FormatNick(who));
            }
        }
예제 #2
0
        static void HighlightPlayer(Player p, TimeSpan delta, string who, int[] ids, Vec3S32[] marks)
        {
            HighlightDrawOp op = new HighlightDrawOp();

            op.Start = DateTime.UtcNow.Subtract(delta);
            op.who   = who; op.ids = ids;
            DrawOpPerformer.Setup(op, p, marks);

            BufferedBlockSender buffer = new BufferedBlockSender(p);

            op.Perform(marks, null,
                       P => {
                int index = p.level.PosToInt(P.X, P.Y, P.Z);
                buffer.Add(index, P.Block.BlockID, P.Block.ExtID);
            });
            buffer.Send(true);

            if (op.found)
            {
                Player.Message(p, "Now highlighting past &b{0} %Sfor {1}",
                               delta.Shorten(true), PlayerInfo.GetColoredName(p, who));
                Player.Message(p, "&cUse /reload to un-highlight");
            }
            else
            {
                Player.Message(p, "No changes found by {1} %Sin the past &b{0}",
                               delta.Shorten(true), PlayerInfo.GetColoredName(p, who));
            }
        }