示例#1
0
        public void execute(GameSession gameSession, IByteBuffer buffer)
        {
            var cmd = new GameplaySettingsRequest();

            cmd.readCommand(buffer);
            var gameplaySettings = gameSession.Player.Settings.OldClientUserSettingsCommand.GameplaySettingsModule;

            gameplaySettings.autoBoost             = cmd.autoBoost;
            gameplaySettings.autoBuyGreenBootyKeys = cmd.autoBuyGreenBootyKeys;
            gameplaySettings.autoChangeAmmo        = cmd.autoChangeAmmo;
            gameplaySettings.autoRefinement        = cmd.autoRefinement;
            gameplaySettings.autoStart             = cmd.autoStart;
            gameplaySettings.doubleclickAttack     = cmd.doubleclickAttack;
            gameplaySettings.notSet = false;
            gameplaySettings.quickslotStopAttack = cmd.quickslotStopAttack;
            gameSession.Player.Settings.SaveSettings();
        }
        public void Execute(GameSession gameSession, IByteBuffer buffer)
        {
            var reader = new GameplaySettingsRequest();

            reader.readCommand(buffer);

            var gameplaySettings = gameSession.Player.Settings.GetSettings <GameplaySettings>();

            gameplaySettings.Unset                 = false;
            gameplaySettings.AutoBoost             = reader.autoBoost;
            gameplaySettings.AutoRefinement        = reader.autoRefinement;
            gameplaySettings.AutoStart             = reader.autoStart;
            gameplaySettings.DoubleclickAttack     = reader.doubleclickAttack;
            gameplaySettings.AutoChangeAmmo        = reader.autoChangeAmmo;
            gameplaySettings.QuickslotStopAttack   = reader.quickslotStopAttack;
            gameplaySettings.AutoBuyGreenBootyKeys = reader.autoBuyGreenBootyKeys;
            gameSession.Player.Settings.SaveSettings();

            Out.WriteLog("Successfully saved GameplaySettings for Player", LogKeys.PLAYER_LOG, gameSession.Player.Id);
        }
        public void execute(GameSession gameSession, byte[] bytes)
        {
            var read = new GameplaySettingsRequest();

            read.readCommand(bytes);

            var player           = gameSession.Player;
            var gameplaySettings = player.Settings.Gameplay;

            gameplaySettings.notSet                   = false;
            gameplaySettings.autoBoost                = read.autoBoost;
            gameplaySettings.autoBuyBootyKeys         = read.autoBuyGreenBootyKeys;
            gameplaySettings.autoChangeAmmo           = read.autoChangeAmmo;
            gameplaySettings.autoRefinement           = read.autoRefinement;
            gameplaySettings.autoStartEnabled         = read.autoStart;
            gameplaySettings.doubleclickAttackEnabled = read.doubleclickAttack;
            gameplaySettings.quickSlotStopAttack      = read.quickslotStopAttack;

            QueryManager.SavePlayer.Settings(player);
        }