Пример #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();
                }
            }
Пример #2
0
        public override void DoOperation(Dictionary <int, LocalUpdateFlags> blockUpdateChain)
        {
            StaticTile existingTile = new StaticTile();
            int        idx          = lookupExistingStatic(ref existingTile);

            if (idx >= 0)
            {
                AddStatic    addStatic = new AddStatic(m_MapNumber, existingTile.ID, (sbyte)existingTile.Z, m_destinationX, m_destinationY, existingTile.Hue);
                DeleteStatic delStatic = new DeleteStatic(m_MapNumber, m_StaticTarget);

                MapOperationSeries moveSeries = new MapOperationSeries(addStatic, m_MapNumber);
                moveSeries.Add(delStatic);
                moveSeries.DoOperation(blockUpdateChain);
            }
        }