示例#1
0
 public override void Grant()
 {
     foreach (string mail in grantedMails)
     {
         if (host.Value)
         {
             if (Game1.IsMasterGame)
             {
                 if (Game1.newDaySync != null)
                 {
                     Game1.addMail(mail, noLetter.Value, sendToEveryone: true);
                 }
                 else
                 {
                     string actualMail2 = mail;
                     if (actualMail2 == "ClintReward" && Game1.player.mailReceived.Contains("ClintReward"))
                     {
                         Game1.player.mailReceived.Remove("ClintReward2");
                         actualMail2 = "ClintReward2";
                     }
                     Game1.addMailForTomorrow(actualMail2, noLetter.Value, sendToEveryone: true);
                 }
             }
         }
         else if (Game1.newDaySync != null)
         {
             Game1.addMail(mail, noLetter.Value, sendToEveryone: true);
         }
         else
         {
             string actualMail = mail;
             if (actualMail == "ClintReward" && Game1.player.mailReceived.Contains("ClintReward"))
             {
                 Game1.player.mailReceived.Remove("ClintReward2");
                 actualMail = "ClintReward2";
             }
             Game1.addMailForTomorrow(actualMail, noLetter.Value, sendToEveryone: true);
         }
     }
 }