Exemplo n.º 1
0
 public static void performCheckAction(short x, short y, string location, long who)
 {
     if (!Utility.canGrabSomethingFromHere((int)x * Game1.tileSize, (int)y * Game1.tileSize, Game1.otherFarmers[who]) || !Game1.getLocationFromName(location).objects.ContainsKey(new Vector2((float)x, (float)y)) || !Game1.getLocationFromName(location).objects[new Vector2((float)x, (float)y)].checkForAction(Game1.otherFarmers[who], false))
     {
         if (Game1.isFestival())
         {
             Game1.currentLocation.checkAction(new Location((int)x, (int)y), Game1.viewport, Game1.otherFarmers[who]);
         }
         else
         {
             Game1.getLocationFromName(location).checkAction(new Location((int)x, (int)y), Game1.viewport, Game1.otherFarmers[who]);
         }
     }
     if (Game1.IsServer)
     {
         MultiplayerUtility.broadcastCheckAction((int)x, (int)y, who, location);
     }
 }