public ushort unknown_be; // 0xBE always 0 public USERRecord(byte[] byArrayUSERPacket) { const byte kMiiDataLength = 0x4C; record_id = BinaryOps.ToU32(byArrayUSERPacket,0x00); max_mii_count = BinaryOps.ToU16(byArrayUSERPacket,0x04); unknown_06 = BinaryOps.ToU16(byArrayUSERPacket,0x06); mii_data_host = new byte[kMiiDataLength]; Array.Copy(byArrayUSERPacket,0x08,mii_data_host,0x00,kMiiDataLength); mii_data_guest = new byte[kMiiDataLength]; Array.Copy(byArrayUSERPacket,0x54,mii_data_guest,0x00,kMiiDataLength); wii_fc = BinaryOps.ToU64(byArrayUSERPacket,0xA0); friend_code = BinaryOps.ToU64(byArrayUSERPacket,0xA8); country = byArrayUSERPacket[0xB0]; state = byArrayUSERPacket[0xB1]; city = BinaryOps.ToU16(byArrayUSERPacket,0xB2); location_lon = BinaryOps.ToU16(byArrayUSERPacket,0xB4); location_lat = BinaryOps.ToU16(byArrayUSERPacket,0xB6); racing_rankpts = BinaryOps.ToU16(byArrayUSERPacket,0xB8); battle_rankpts = BinaryOps.ToU16(byArrayUSERPacket,0xBA); game_id3 = byArrayUSERPacket[0xBC]; region = byArrayUSERPacket[0xBD]; unknown_be = byArrayUSERPacket[0xBE]; }
public byte sel_engine; // 0x37 0:none, 1:100cc, 2:150cc 3:mirror (WW and 1st race of GP) public SELECTRecord(byte[] byArraySELECTPacket) { time_sender = BinaryOps.ToU64(byArraySELECTPacket,0x00); time_receiver = BinaryOps.ToU64(byArraySELECTPacket,0x08); rank_pl1 = BinaryOps.ToU16(byArraySELECTPacket,0x10); sum_pts_pl1 = BinaryOps.ToU16(byArraySELECTPacket,0x12); driver_pl1 = byArraySELECTPacket[0x14]; vehicle_pl1 = byArraySELECTPacket[0x15]; user_track_pl1 = byArraySELECTPacket[0x16]; ranking_pl1 = byArraySELECTPacket[0x17]; rank_pl2 = BinaryOps.ToU16(byArraySELECTPacket,0x18); sum_pts_pl2 = BinaryOps.ToU16(byArraySELECTPacket,0x1A); driver_pl2 = byArraySELECTPacket[0x1C]; vehicle_pl2 = byArraySELECTPacket[0x1D]; user_track_pl2 = byArraySELECTPacket[0x1E]; ranking_pl2 = byArraySELECTPacket[0x1F]; select_id = BinaryOps.ToU32(byArraySELECTPacket,0x20); battle_type = byArraySELECTPacket[0x24]; team = BinaryOps.ToU32(byArraySELECTPacket,0x25) >> 8; client_slot = new byte[12]; for (int i = 0; i < 12; i++) { client_slot[i] = byArraySELECTPacket[i + 0x28]; } sel_track = byArraySELECTPacket[0x34]; sel_phase = (MarioKartWii.ESelectPhase)byArraySELECTPacket[0x35]; sel_client = byArraySELECTPacket[0x36]; sel_engine = byArraySELECTPacket[0x37]; }