Пример #1
0
        public void execute(GameSession gameSession, byte[] bytes)
        {
            var read = new WindowSettingsRequest();

            read.readCommand(bytes);

            var player         = gameSession.Player;
            var windowSettings = player.Settings.Window;

            windowSettings.barState                    = read.barStatesAsString;
            windowSettings.hideAllWindows              = read.hideAllWindows;
            windowSettings.scale                       = read.scaleFactor;
            windowSettings.gameFeatureBarLayoutType    = read.gameFeatureBarLayoutType;
            windowSettings.gameFeatureBarPosition      = read.gameFeatureBarPosition;
            windowSettings.genericFeatureBarLayoutType = read.genericFeatureBarLayoutType;
            windowSettings.genericFeatureBarPosition   = read.genericFeatureBarPosition;
            windowSettings.categoryBarPosition         = read.categoryBarPosition;
            windowSettings.standartSlotBarLayoutType   = read.standartSlotBarLayoutType;
            windowSettings.standartSlotBarPosition     = read.standartSlotBarPosition;
            windowSettings.premiumSlotBarLayoutType    = read.premiumSlotBarLayoutType;
            windowSettings.premiumSlotBarPosition      = read.premiumSlotBarPosition;
            windowSettings.proActionBarLayoutType      = read.proActionBarLayoutType;
            windowSettings.proActionBarPosition        = read.proActionBarPosition;

            QueryManager.SavePlayer.Settings(player, "window", windowSettings);
        }
        public void execute(GameSession gameSession, IByteBuffer buffer)
        {
            var playerWindowSettings = gameSession.Player.Settings.OldClientUserSettingsCommand.WindowSettingsModule;
            var cmd = new WindowSettingsRequest();

            cmd.readCommand(buffer);

            playerWindowSettings.clientResolutionId      = cmd.clientResolutionId;
            playerWindowSettings.barStatus               = cmd.barStatus;
            playerWindowSettings.mainmenuPosition        = cmd.mainmenuPosition;
            playerWindowSettings.minmapScale             = cmd.minimapScale;
            playerWindowSettings.notSet                  = false;
            playerWindowSettings.resizableWindows        = cmd.resizableWindows;
            playerWindowSettings.slotMenuOrder           = cmd.slotMenuOrder;
            playerWindowSettings.slotMenuPremiumOrder    = cmd.slotMenuPremiumOrder;
            playerWindowSettings.slotmenuPosition        = cmd.slotmenuPosition;
            playerWindowSettings.slotmenuPremiumPosition = cmd.slotmenuPremiumPosition;
            playerWindowSettings.windowSettings          = cmd.windowSettings;
            gameSession.Player.Settings.SaveSettings();
        }
        public void Execute(GameSession gameSession, IByteBuffer buffer)
        {
            var reader = new WindowSettingsRequest();

            reader.readCommand(buffer);

            var windowSettings = gameSession.Player.Settings.GetSettings <WindowSettings>();

            windowSettings.Unset                   = false;
            windowSettings.BarStatus               = reader.barStatus;
            windowSettings.MainmenuPosition        = reader.mainmenuPosition;
            windowSettings.MinimapScale            = reader.minimapScale;
            windowSettings.SlotmenuPosition        = reader.slotmenuPosition;
            windowSettings.ClientResolutionId      = reader.clientResolutionId;
            windowSettings.ResizableWindowsString  = reader.resizableWindows;
            windowSettings.SlotMenuOrder           = reader.slotMenuOrder;
            windowSettings.SlotmenuPremiumPosition = reader.slotmenuPremiumPosition;
            windowSettings.WindowSettingsString    = reader.windowSettings;
            windowSettings.SlotMenuPremiumOrder    = reader.slotMenuPremiumOrder;
            gameSession.Player.Settings.SaveSettings();

            Out.WriteLog("Successfully saved WindowSettings for Player", LogKeys.PLAYER_LOG, gameSession.Player.Id);
        }
Пример #4
0
        public void execute(GameSession gameSession, byte[] bytes)
        {
            var read = new WindowSettingsRequest();

            read.readCommand(bytes);

            var player         = gameSession.Player;
            var windowSettings = player.Settings.Window;

            windowSettings.notSet                  = false;
            windowSettings.clientResolutionId      = read.clientResolutionId;
            windowSettings.windowSettings          = read.windowSettings;
            windowSettings.resizableWindows        = read.resizableWindows;
            windowSettings.minmapScale             = read.minimapScale;
            windowSettings.mainmenuPosition        = read.mainmenuPosition;
            windowSettings.slotmenuPosition        = read.slotmenuPosition;
            windowSettings.slotMenuOrder           = read.slotMenuOrder;
            windowSettings.slotMenuPremiumPosition = read.slotmenuPremiumPosition;
            windowSettings.slotMenuPremiumOrder    = read.slotMenuPremiumOrder;
            windowSettings.barStatus               = read.barStatus;

            QueryManager.SavePlayer.Settings(player);
        }