private static void UserSettings(GameSession gameSession)
        {
            var client = gameSession.Client;
            var player = gameSession.Player;

            if (!player.UsingNewClient)
            {
                client.Send(ShipSettingsCommand.write(player.Settings.Slotbar.QuickbarSlots,
                                                      player.Settings.Slotbar.QuickbarSlotsPremium,
                                                      player.Settings.Slotbar.SelectedLaser, player.Settings.Slotbar.SelectedRocket,
                                                      player.Settings.Slotbar.SelectedHellstormRocket));

                client.Send(PacketBuilder.UserSettingsCommand(player, player.UsingNewClient));
            }
            else
            {
                client.Send(PacketBuilder.NewClientWindowsCommand());

                //client.Send(PacketBuilder.UserSettingsCommand(player, player.UsingNewClient));

                //SendSlotbars(gameSession);
            }

            client.Send(PacketBuilder.ShipInitializationCommand(player));

            client.Send(PacketBuilder.DronesCommand(player, player.UsingNewClient).Bytes);
        }
Exemple #2
0
        public void SendUserSettingsCommand()
        {
            var displaySettings  = Player.Settings.Display;
            var qualitySettings  = Player.Settings.Quality;
            var audioSettings    = Player.Settings.Audio;
            var windowSettings   = Player.Settings.Window;
            var gameplaySettings = Player.Settings.Gameplay;
            var shipSettings     = Player.Settings.ShipSettings;

            Player.SendCommand(UserSettingsCommand.write(
                                   new QualitySettingsModule(qualitySettings.notSet, qualitySettings.qualityAttack, qualitySettings.qualityBackground, qualitySettings.qualityPresetting, qualitySettings.qualityCustomized, qualitySettings.qualityPoizone, qualitySettings.qualityShip, qualitySettings.qualityEngine, qualitySettings.qualityExplosion, qualitySettings.qualityCollectable, qualitySettings.qualityEffect),
                                   new DisplaySettingsModule(displaySettings.notSet, displaySettings.displayPlayerNames, displaySettings.displayResources, displaySettings.displayBonusBoxes, displaySettings.displayHitpointBubbles, displaySettings.displayChat, displaySettings.displayDrones, displaySettings.displayFreeCargoBoxes, displaySettings.displayNotFreeCargoBoxes, displaySettings.displayWindowsBackground, displaySettings.displayNotifications, displaySettings.preloadUserShips, displaySettings.dragWindowsAlways, displaySettings.hoverShips, true, displaySettings.allowAutoQuality),
                                   new AudioSettingsModule(audioSettings.notSet, audioSettings.sound, audioSettings.music),
                                   new WindowSettingsModule(windowSettings.notSet, windowSettings.clientResolutionId, windowSettings.windowSettings, windowSettings.resizableWindows, windowSettings.minmapScale, windowSettings.mainmenuPosition, windowSettings.barStatus, windowSettings.slotmenuPosition, windowSettings.slotMenuOrder, windowSettings.slotMenuPremiumPosition, windowSettings.slotMenuPremiumOrder),
                                   new GameplaySettingsModule(gameplaySettings.notSet, gameplaySettings.autoBoost, gameplaySettings.autoRefinement, gameplaySettings.quickSlotStopAttack, gameplaySettings.doubleclickAttackEnabled, gameplaySettings.autoChangeAmmo, gameplaySettings.autoStartEnabled, gameplaySettings.autoBuyBootyKeys)
                                   ));

            Player.SendCommand(ShipSettingsCommand.write(shipSettings.quickbarSlots, shipSettings.quickbarSlotsPremium, Player.AttackManager.GetSelectedLaser() + 1, Player.AttackManager.GetSelectedRocket(), Player.AttackManager.GetSelectedLauncherId()));
        }