Ejemplo n.º 1
0
        public MainWindow(Player _player, List <Player> _playerlist)
        {
            InitializeComponent();
            player = _player;
            Function.SoundManager.PlayMain(player.Settings.SoundOn, this, player.Settings.SoundVolume);

            if (player.Settings.PrefChars == null)
            {
                player.Settings.PrefChars.Add("None");
            }
            if (player.CurrentQuest != null)
            {
                player.CurrentQuest.UpdateQuest(player, 1, null, 0, 0, 1.0, new List <EnumCharClass>(), false);
            }

            playerlist           = _playerlist;
            this.BackgroundImage = GeneralFunctions.ResizeImage(Properties.Resources.background, labelBackgroundIGNORE.Size);

            this.richTextBoxActionbox.Text = "Welcome to The Legend of Eiwar" + Environment.NewLine +
                                             "Version : " + ServerManagement.GetRunningVersion() + Environment.NewLine + Environment.NewLine +
                                             "Click the support tab to instructions on how to play and to see changes!" + Environment.NewLine +
                                             "If you find a bug or believe there is a balance issue in the game, please report this by pressing " +
                                             "the ''Support'' button and using the ''Bug/Suggestion Report'' function.";


            foreach (var item in player.ControlledCharacters)
            {
                item.ResetCharSkills();
            }

            if (this.player.ControlledCharacters.Count == 0)
            {
                NewPlayer();
            }
            else
            {
                foreach (var item in this.player.ControlledCharacters)
                {
                    this.flpCharacters.Controls.Add(new ucCharacterInterface(item, true));
                }

                foreach (var item in flpCharacters.Controls)
                {
                    (item as ucCharacterInterface).Update();
                }
            }

            UpdateQuestVisual();
            UpdateDustLabel();
            UpdateInventoryVisual();
        }