Ejemplo n.º 1
0
        /// <summary>
        /// Check for Marlon's mail read from mailbox
        /// Adds a introduction "Adventure begins" quest and allows to play Marlon's event in Adventurer's guild
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Events_MailboxOpen(object sender, IMailEventArgs e)
        {
            if (!e.LetterKey.Equals("adventureBegins"))
            {
                return;
            }

            this.StoryHelper.AcceptQuest(1);

            Game1.addHUDMessage(new HUDMessage(this.contentLoader.LoadString("Strings/Strings:newObjective"), 2));
            Game1.playSound("questcomplete");
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Check for Marlon's mail read from mailbox
        /// Adds a introduction "Adventure begins" quest and allows to play Marlon's event in Adventurer's guild
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Events_MailboxOpen(object sender, IMailEventArgs e)
        {
            if (!e.LetterKey.Equals("adventureBegins"))
            {
                return;
            }

            Quest quest = this.StoryHelper.GetQuestById(1);

            quest.showNew.Value = true;
            quest.accept();

            Game1.player.questLog.Add(quest);
            Game1.addHUDMessage(new HUDMessage(this.contentLoader.LoadString("Strings/Strings:newObjective"), 2));
            Game1.playSound("questcomplete");
        }
Ejemplo n.º 3
0
        private void Events_MailboxOpen(object sender, IMailEventArgs e)
        {
            Dictionary <string, string> dictionary = this.contentLoader.LoadStrings("Strings/Mail");

            e.Mailbox.RemoveAt(0);
            e.Player.mailReceived.Add(e.FullLetterKey);

            if (!string.IsNullOrEmpty(e.LetterKey) && dictionary.ContainsKey(e.LetterKey))
            {
                Game1.activeClickableMenu = new LetterViewerMenu(dictionary[e.LetterKey], e.FullLetterKey, false);
                this.monitor.Log($"Draw mail letter `{e.LetterKey}`");
            }
            else
            {
                this.monitor.Log($"Can't draw undefined mail letter: {e.LetterKey ?? "null"}");
            }
        }