예제 #1
0
 public void questComplete()
 {
     if (this.completed)
     {
         return;
     }
     if (this.dailyQuest || this.questType == 7)
     {
         ++Game1.stats.QuestsCompleted;
     }
     this.completed = true;
     if (this.nextQuests.Count > 0)
     {
         foreach (int nextQuest in this.nextQuests)
         {
             if (nextQuest > 0)
             {
                 Game1.player.questLog.Add(Quest.getQuestFromId(nextQuest));
             }
         }
         Game1.addHUDMessage(new HUDMessage(Game1.content.LoadString("Strings\\StringsFromCSFiles:Quest.cs.13636"), 2));
     }
     if (this.moneyReward <= 0 && (this.rewardDescription == null || this.rewardDescription.Length <= 2))
     {
         Game1.player.questLog.Remove(this);
     }
     else
     {
         Game1.addHUDMessage(new HUDMessage(Game1.content.LoadString("Strings\\StringsFromCSFiles:Quest.cs.13636"), 2));
     }
     Game1.playSound("questcomplete");
 }
예제 #2
0
 public void questComplete()
 {
     if (!this.completed)
     {
         if (this.dailyQuest || this.questType == 7)
         {
             Stats expr_21         = Game1.stats;
             uint  questsCompleted = expr_21.QuestsCompleted;
             expr_21.QuestsCompleted = questsCompleted + 1u;
         }
         this.completed = true;
         if (this.nextQuests.Count > 0)
         {
             foreach (int current in this.nextQuests)
             {
                 if (current > 0)
                 {
                     Game1.player.questLog.Add(Quest.getQuestFromId(current));
                 }
             }
             Game1.addHUDMessage(new HUDMessage(Game1.content.LoadString("Strings\\StringsFromCSFiles:Quest.cs.13636", new object[0]), 2));
         }
         if (this.moneyReward <= 0 && (this.rewardDescription == null || this.rewardDescription.Length <= 2))
         {
             Game1.player.questLog.Remove(this);
         }
         else
         {
             Game1.addHUDMessage(new HUDMessage(Game1.content.LoadString("Strings\\StringsFromCSFiles:Quest.cs.13636", new object[0]), 2));
         }
         Game1.playSound("questcomplete");
     }
 }
예제 #3
0
 // Token: 0x06000A27 RID: 2599 RVA: 0x000D910C File Offset: 0x000D730C
 public void questComplete()
 {
     if (!this.completed)
     {
         if (this.dailyQuest || this.questType == 7)
         {
             Stats expr_21         = Game1.stats;
             uint  questsCompleted = expr_21.QuestsCompleted;
             expr_21.QuestsCompleted = questsCompleted + 1u;
         }
         this.completed = true;
         if (this.nextQuests.Count > 0)
         {
             foreach (int i in this.nextQuests)
             {
                 if (i > 0)
                 {
                     Game1.player.questLog.Add(Quest.getQuestFromId(i));
                 }
             }
             Game1.addHUDMessage(new HUDMessage("Journal Updated", 2));
         }
         if (this.moneyReward <= 0 && (this.rewardDescription == null || this.rewardDescription.Length <= 2))
         {
             Game1.player.questLog.Remove(this);
         }
         else
         {
             Game1.addHUDMessage(new HUDMessage("Journal Updated", 2));
         }
         Game1.playSound("questcomplete");
     }
 }