Esempio n. 1
0
            protected override void OnTarget(Mobile from, object o)
            {
                if (base.SetupTarget(from, o))
                {
                    List <Point2D> circle = UltimaLiveUtility.rasterFilledCircle(new Point2D(m_Location.X, m_Location.Y), m_Radius);

                    MapOperationSeries moveSeries = new MapOperationSeries(null, from.Map.MapID);

                    bool first = true;
                    foreach (Point2D p in circle)
                    {
                        if (first)
                        {
                            moveSeries = new MapOperationSeries(new IncLandAltitude(p.X, p.Y, from.Map.MapID, m_Depth), from.Map.MapID);
                            first      = false;
                        }
                        else
                        {
                            moveSeries.Add(new IncLandAltitude(p.X, p.Y, from.Map.MapID, m_Depth));
                        }
                    }

                    moveSeries.DoOperation();
                }
            }
Esempio n. 2
0
            public override Packet GetPacketFor(NetState ns)
            {
                List <TargetObject> objs   = new List <TargetObject>();
                List <Point2D>      circle = UltimaLiveUtility.rasterCircle(new Point2D(0, 0), m_Radius);

                foreach (Point2D p in circle)
                {
                    TargetObject t = new TargetObject();
                    t.ItemID  = 0xA12;
                    t.Hue     = 35;
                    t.xOffset = p.X;
                    t.yOffset = p.Y;
                    t.zOffset = 0;
                    objs.Add(t);
                }
                return(new TargetObjectList(objs, ns.Mobile, true));
            }