private int OnSelectChain(CoreMessage msg) { int player = msg.Reader.ReadByte(); int count = msg.Reader.ReadByte(); msg.Reader.ReadBytes(10 + count * 12); if (count > 0) { Game.WaitForResponse(player); SendToPlayer(msg, player); return(1); } Game.SetResponse(-1); return(0); }
private void OnResponse(BinaryReader packet) { if (Game.State != GameState.Duel) { return; } if (State != PlayerState.Response) { return; } byte[] resp = packet.ReadToEnd(); if (resp.Length > 64) { return; } State = PlayerState.None; Game.SetResponse(resp); }