public ScoreboardMessage(byte[] b, int [] ids, GameRules rules) : base(b) { Validate(ids, rules); _playerId = (int)msg[1]; _scoreboard = new Scoreboard(); Session sess = null; int cnt = 0; int numSessions = ((int)msg[2] << 8) + ((int)msg[3]); int ptr = 4; for (int ctr = 0; ctr < numSessions; ctr++) { sess = new Session(((int)msg[ptr + 0] == 1), ((int)msg[ptr + 2])); sess.MadePhaze = ((int)msg[ptr + 1] == 1); sess.Points = (((int)msg[ptr + 3]) << 8) + ((int)msg[ptr + 4]); ptr += 5; cnt = (int)msg[ptr + 0]; ptr += 1; for (int ctr2 = 0; ctr2 < cnt; ctr2++) { sess.AddSkippedBy((int)msg[ptr]); ptr++; } cnt = (int)msg[ptr + 0]; ptr += 1; for (int ctr2 = 0; ctr2 < cnt; ctr2++) { sess.AddPlayerSkipped((int)msg[ptr]); ptr++; } _scoreboard.AddSession(sess); } }