Esempio n. 1
0
 public static void allFarmersReadyCheck()
 {
     if (Game1.IsServer)
     {
         using (Dictionary <long, Farmer> .ValueCollection.Enumerator enumerator = Game1.otherFarmers.Values.GetEnumerator())
         {
             while (enumerator.MoveNext())
             {
                 if (!enumerator.Current.readyConfirmation)
                 {
                     return;
                 }
             }
         }
         if (Game1.player.readyConfirmation)
         {
             MultiplayerUtility.sendReadyConfirmation(Game1.player.uniqueMultiplayerID);
             using (Dictionary <long, Farmer> .ValueCollection.Enumerator enumerator = Game1.otherFarmers.Values.GetEnumerator())
             {
                 while (enumerator.MoveNext())
                 {
                     enumerator.Current.readyConfirmation = false;
                 }
             }
             Game1.player.readyConfirmation = false;
             if (Game1.currentLocation.currentEvent != null)
             {
                 Event expr_BF        = Game1.currentLocation.currentEvent;
                 int   currentCommand = expr_BF.CurrentCommand;
                 expr_BF.CurrentCommand = currentCommand + 1;
                 return;
             }
         }
     }
     else
     {
         if (Game1.isFestival())
         {
             Game1.currentLocation.currentEvent.allPlayersReady = true;
         }
         using (Dictionary <long, Farmer> .ValueCollection.Enumerator enumerator = Game1.otherFarmers.Values.GetEnumerator())
         {
             while (enumerator.MoveNext())
             {
                 enumerator.Current.readyConfirmation = false;
             }
         }
     }
 }
Esempio n. 2
0
 public static void allFarmersReadyCheck()
 {
     if (Game1.IsServer)
     {
         foreach (Farmer farmer in Game1.otherFarmers.Values)
         {
             if (!farmer.readyConfirmation)
             {
                 return;
             }
         }
         if (!Game1.player.readyConfirmation)
         {
             return;
         }
         MultiplayerUtility.sendReadyConfirmation(Game1.player.uniqueMultiplayerID);
         foreach (Farmer farmer in Game1.otherFarmers.Values)
         {
             farmer.readyConfirmation = false;
         }
         Game1.player.readyConfirmation = false;
         if (Game1.currentLocation.currentEvent == null)
         {
             return;
         }
         ++Game1.currentLocation.currentEvent.CurrentCommand;
     }
     else
     {
         if (Game1.isFestival())
         {
             Game1.currentLocation.currentEvent.allPlayersReady = true;
         }
         foreach (Farmer farmer in Game1.otherFarmers.Values)
         {
             farmer.readyConfirmation = false;
         }
     }
 }