public override int Id => 0x18;//24

        public override void Handle(EzClient client, EzPacket packet)
        {
            KeySettings keySettings = client.Setting.GetKeySettings(client.Mode);

            keySettings.KeyOn1             = packet.Data.ReadByte();
            keySettings.KeyOn2             = packet.Data.ReadByte();
            keySettings.KeyOn3             = packet.Data.ReadByte();
            keySettings.KeyOn4             = packet.Data.ReadByte();
            keySettings.KeyOn5             = packet.Data.ReadByte();
            keySettings.KeyOn6             = packet.Data.ReadByte();
            keySettings.KeyAc1             = packet.Data.ReadByte();
            keySettings.KeyAc2             = packet.Data.ReadByte();
            keySettings.KeyAc3             = packet.Data.ReadByte();
            keySettings.KeyAc4             = packet.Data.ReadByte();
            keySettings.KeyAc5             = packet.Data.ReadByte();
            keySettings.KeyAc6             = packet.Data.ReadByte();
            client.Setting.VolumeMenuMusic = packet.Data.ReadByte();
            client.Setting.VolumeMenuSFX   = packet.Data.ReadByte();
            client.Setting.VolumeGameMusic = packet.Data.ReadByte();
            client.Setting.VolumeGameSFX   = packet.Data.ReadByte();
            client.Setting.BgaSettings     = new BgaSettings(packet.Data.ReadByte());
            client.Setting.SkinPosition    = packet.Data.ReadByte();

            IBuffer settings = SettingsPacket.Create(client.Setting, client.Mode);

            Send(client, 0x2D, settings); //45
        }
示例#2
0
        private void OnSessionResponse(Response <Session> result, EzClient client, EzPacket packet)
        {
            _logger.Debug("Client ({0}) entered world (SessionKey: {1})", client.Identity, result.Result.Key);


            client.Session = result.Result;

            Channel channel = Server.GetChannel(client.Mode, client.Session.ChannelId);

            channel.Join(client);

            IBuffer response = EzServer.Buffer.Provide();

            response.WriteByte(1);
            response.WriteByte(0);
            response.WriteByte(7);                              //0A?
            response.WriteByte(0);
            response.WriteByte((byte)client.Mode);              // Mode 0=RubyMix  1=STREET MIX  2=CLUB MIX
            response.WriteByte(0);
            response.WriteByte((byte)client.Session.ChannelId); //1-xCH / 0=1ch 1=2ch 2=3ch 3=4ch
            response.WriteByte(0);
            Send(client, 1, response);

            IBuffer characterList = LobbyCharacterListPacket.Create(channel);

            Send(channel.GetLobbyClients(), 2, characterList);

            IBuffer announceRoomPacket = RoomPacket.CreateAnnounceRoomPacket(channel);

            Send(client.Channel.GetLobbyClients(), 13, announceRoomPacket);

            IBuffer applyInventoryPacket = InventoryPacket.ShowInventoryPacket(client.Inventory);

            Send(client, 0x21, applyInventoryPacket);

            IBuffer djPointsPacket = SongPacket.CreateDjPointsPacket();

            Send(client, 0x2B, djPointsPacket); //43

            IBuffer settings = SettingsPacket.Create(client.Setting, client.Mode);

            Send(client, 0x2D, settings); //45
        }