Esempio n. 1
0
        public void execute(GameSession gameSession, IByteBuffer buffer)
        {
            var request = new ShipSettingsRequest();

            request.readCommand(buffer);

            var slotbarSettings = gameSession.Player.Settings.OldClientShipSettingsCommand;

            slotbarSettings.quickbarSlots           = request.quickbarSlots;
            slotbarSettings.quickbarSlotsPremium    = request.quickbarSlotsPremium;
            slotbarSettings.selectedHellstormRocket = request.selectedHellstormRocket;
            slotbarSettings.selectedLaser           = request.selectedLaser;
            slotbarSettings.selectedRocket          = request.selectedRocket;

            gameSession.Player.Settings.SaveSettings();
        }
Esempio n. 2
0
        public void Execute(GameSession gameSession, IByteBuffer buffer)
        {
            var request = new ShipSettingsRequest();

            request.readCommand(buffer);

            var slotbarSettings = gameSession.Player.Settings.GetSettings <SlotbarSettings>();

            slotbarSettings.QuickbarSlots               = request.quickbarSlots;
            slotbarSettings.QuickbarSlotsPremium        = request.quickbarSlotsPremium;
            slotbarSettings.SelectedHellstormRocketAmmo = AmmoConvertManager.GetRocketLootId(request.selectedHellstormRocket);
            slotbarSettings.SelectedLaserAmmo           = AmmoConvertManager.GetLaserLootId(request.selectedLaser);
            slotbarSettings.SelectedRocketAmmo          = AmmoConvertManager.GetRocketLootId(request.selectedRocket);

            gameSession.Player.Settings.SaveSettings();

            Out.WriteLog("Successfully saved ShipSettings for Player", LogKeys.PLAYER_LOG, gameSession.Player.Id);
        }
Esempio n. 3
0
        public void execute(GameSession gameSession, byte[] bytes)
        {
            var read = new ShipSettingsRequest();

            read.readCommand(bytes);

            var player = gameSession.Player;

            var shipSettings = player.Settings.ShipSettings;

            shipSettings.quickbarSlots          = read.quickbarSlots;
            shipSettings.quickbarSlotsPremium   = read.quickbarSlotsPremium;
            shipSettings.selectedRocketLauncher = read.selectedHellstormRocket;
            shipSettings.selectedLaser          = read.selectedLaser;
            shipSettings.selectedRocket         = read.selectedRocket;

            QueryManager.SavePlayer.Settings(player);
        }