public static void interpretMessageToEveryone(int messageCategory, string message, long who) { switch (messageCategory) { case 0: if (Game1.isFestival()) { Game1.otherFarmers[who].dancePartner = Game1.currentLocation.currentEvent.getActorByName(message); } Game1.currentLocation.currentEvent.getActorByName(message).hasPartnerForDance = true; break; case 1: if (Game1.isFestival()) { Game1.currentLocation.currentEvent.addItemToLuauSoup(new Object(Convert.ToInt32(message.Split(new char[] { ' ' })[0]), 1, false, -1, Convert.ToInt32(message.Split(new char[] { ' ' })[1])), Game1.otherFarmers[who]); } break; case 2: if (Game1.isFestival()) { Game1.CurrentEvent.setGrangeDisplayUser(message.Equals("null") ? null : Game1.getFarmer(who)); } break; case 3: if (Game1.isFestival()) { string[] array = message.Split(new char[] { ' ' }); int num = Convert.ToInt32(array[0]); if (array[1].Equals("null")) { Game1.CurrentEvent.addItemToGrangeDisplay(null, num, true); } else { Game1.CurrentEvent.addItemToGrangeDisplay(new Object(Convert.ToInt32(array[1]), Convert.ToInt32(array[2]), false, -1, 0), num, true); } } break; case 4: Game1.CurrentEvent.grangeScore = Convert.ToInt32(message); Game1.ChatBox.receiveChatMessage(Game1.content.LoadString("Strings\\StringsFromCSFiles:MultiplayerUtility.cs.12488", new object[0]), -1L); Game1.CurrentEvent.interpretGrangeResults(); break; case 5: if (!Game1.player.mailReceived.Contains(message)) { Game1.player.mailReceived.Add(message); } break; case 6: (Game1.getLocationFromName("CommunityCenter") as CommunityCenter).completeBundle(Convert.ToInt32(message)); break; case 7: Game1.addMailForTomorrow(message, false, false); break; } if (Game1.IsServer) { MultiplayerUtility.sendMessageToEveryone(messageCategory, message, who); } }
// Token: 0x06000160 RID: 352 RVA: 0x0000F198 File Offset: 0x0000D398 public static void interpretMessageToEveryone(int messageCategory, string message, long who) { switch (messageCategory) { case 0: if (Game1.isFestival()) { Game1.otherFarmers[who].dancePartner = Game1.currentLocation.currentEvent.getActorByName(message); } Game1.currentLocation.currentEvent.getActorByName(message).hasPartnerForDance = true; break; case 1: if (Game1.isFestival()) { Game1.currentLocation.currentEvent.addItemToLuauSoup(new Object(Convert.ToInt32(message.Split(new char[] { ' ' })[0]), 1, false, -1, Convert.ToInt32(message.Split(new char[] { ' ' })[1])), Game1.otherFarmers[who]); } break; case 2: if (Game1.isFestival()) { Game1.CurrentEvent.setGrangeDisplayUser(message.Equals("null") ? null : Game1.getFarmer(who)); } break; case 3: if (Game1.isFestival()) { string[] parse = message.Split(new char[] { ' ' }); int position = Convert.ToInt32(parse[0]); if (parse[1].Equals("null")) { Game1.CurrentEvent.addItemToGrangeDisplay(null, position, true); } else { Game1.CurrentEvent.addItemToGrangeDisplay(new Object(Convert.ToInt32(parse[1]), Convert.ToInt32(parse[2]), false, -1, 0), position, true); } } break; case 4: Game1.CurrentEvent.grangeScore = Convert.ToInt32(message); Game1.ChatBox.receiveChatMessage("Your grange display has been judged. Return to Mayor Lewis for the result!", -1L); Game1.CurrentEvent.interpretGrangeResults(); break; case 5: if (!Game1.player.mailReceived.Contains(message)) { Game1.player.mailReceived.Add(message); } break; case 6: (Game1.getLocationFromName("CommunityCenter") as CommunityCenter).completeBundle(Convert.ToInt32(message)); break; case 7: Game1.addMailForTomorrow(message, false, false); break; } if (Game1.IsServer) { MultiplayerUtility.sendMessageToEveryone(messageCategory, message, who); } }