示例#1
0
        private static void OnMapCommand(NetState state, PacketReader pvSrc)
        {
            Mobile from             = state.Mobile;
            SpyglassMapViewItem map = World.FindItem(pvSrc.ReadInt32()) as SpyglassMapViewItem;

            if (map == null)
            {
                return;
            }

            int command = pvSrc.ReadByte();
            int number  = pvSrc.ReadByte();

            int x = pvSrc.ReadInt16();
            int y = pvSrc.ReadInt16();

            switch (command)
            {
            case 1: map.OnAddPin(from, x, y); break;

            case 2: map.OnInsertPin(from, number, x, y); break;

            case 3: map.OnChangePin(from, number, x, y); break;

            case 4: map.OnRemovePin(from, number); break;

            case 5: map.OnClearPins(from); break;

            case 6: map.OnToggleEditable(from); break;
            }
        }
示例#2
0
 public MapCommand(SpyglassMapViewItem map, int command, int number, int x, int y) : base(0x56, 11)
 {
     m_Stream.Write((int)map.Serial);
     m_Stream.Write((byte)command);
     m_Stream.Write((byte)number);
     m_Stream.Write((short)x);
     m_Stream.Write((short)y);
 }
示例#3
0
 public MapDetails(SpyglassMapViewItem map) : base(0x90, 19)
 {
     m_Stream.Write((int)map.Serial);
     m_Stream.Write((short)0x139D);
     m_Stream.Write((short)map.Bounds.Start.X);
     m_Stream.Write((short)map.Bounds.Start.Y);
     m_Stream.Write((short)map.Bounds.End.X);
     m_Stream.Write((short)map.Bounds.End.Y);
     m_Stream.Write((short)map.Width);
     m_Stream.Write((short)map.Height);
 }
示例#4
0
 public MapSetEditable(SpyglassMapViewItem map, bool editable) : base(map, 7, editable ? 0 : 0, 0, 0)
 {
 }
示例#5
0
 public MapAddPin(SpyglassMapViewItem map, Point2D point) : base(map, 1, 0, point.X, point.Y)
 {
 }
示例#6
0
 public MapDisplay(SpyglassMapViewItem map) : base(map, 5, 0, 0, 0)
 {
 }