private static void OnMapCommand(NetState state, PacketReader pvSrc) { Mobile from = state.Mobile; ArtifactMapItem map = World.FindItem(pvSrc.ReadInt32()) as ArtifactMapItem; 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; } }
public MapCommand(ArtifactMapItem 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); }
public MapDetails(ArtifactMapItem 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); }
public NewMapDetails(ArtifactMapItem map) : base(0xF5, 21) { 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); m_Stream.Write((short)map.DisplayMap.MapID); }
public MapSetEditable(ArtifactMapItem map, bool editable) : base(map, 7, editable ? 1 : 0, 0, 0) { }
public MapAddPin(ArtifactMapItem map, Point2D point) : base(map, 1, 0, point.X, point.Y) { }
public MapDisplay(ArtifactMapItem map) : base(map, 5, 0, 0, 0) { }
public MapSetEditable( ArtifactMapItem map, bool editable ) : base( map, 7, editable ? 1 : 0, 0, 0 ) { }
public MapAddPin( ArtifactMapItem map, Point2D point ) : base( map, 1, 0, point.X, point.Y ) { }
public MapDisplay( ArtifactMapItem map ) : base( map, 5, 0, 0, 0 ) { }
public MapCommand( ArtifactMapItem 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 ); }
public NewMapDetails( ArtifactMapItem map ) : base ( 0xF5, 21 ) { 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 ); m_Stream.Write( (short) map.DisplayMap.MapID ); }
public MapDetails( ArtifactMapItem 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 ); }