public void ReciveWaypointList( body2_SC_WAYPOINT[] waypointList) { isReceiveWaypointList = true; m_WaypointList.Clear(); if( null == waypointList) return; foreach( body2_SC_WAYPOINT _data in waypointList) { m_WaypointList.Add( _data); } }
public void InsertWapointList( int iWarpIdx) { foreach( body2_SC_WAYPOINT _body in m_WaypointList) { if( _body.nWarpTableIdx == iWarpIdx) return; } body2_SC_WAYPOINT _data = new body2_SC_WAYPOINT(); _data.nWarpTableIdx = iWarpIdx; m_WaypointList.Add( _data); //AsHudDlgMgr.Instance.OpenWaypointMapDlg(); }
public new void PacketBytesToClass( byte[] data) { Type infotype = this.GetType(); FieldInfo headerinfo = null; int index = ParsePacketHeader( data); // nCnt byte[] cnt = new byte[ sizeof( Int32)]; headerinfo = infotype.GetField( "nCnt", BINDING_FLAGS_PIG); Buffer.BlockCopy( data, index, cnt, 0, sizeof( Int32)); headerinfo.SetValue( this, BitConverter.ToInt32( cnt, 0)); index += sizeof( Int32); if( 0 < nCnt) { body = new body2_SC_WAYPOINT[nCnt]; for( int i = 0; i < nCnt; i++) { body[i] = new body2_SC_WAYPOINT(); byte[] tmpData = new byte[body2_SC_WAYPOINT.size]; Buffer.BlockCopy( data, index, tmpData, 0, tmpData.Length); body[i].ByteArrayToClass( tmpData); index += body2_SC_WAYPOINT.size; } } }