internal void Save() { if (PetMappingUpdated) { var filtered = PetToPlayer.Where(keypair => Helpers.IsPossiblePlayerName(keypair.Key) && Helpers.IsPossiblePlayerName(keypair.Value) && keypair.Value != Labels.UNASSIGNED); ConfigUtil.SavePetMapping(filtered); PetMappingUpdated = false; } if (PlayersUpdated) { ConfigUtil.SavePlayers(VerifiedPlayers.Keys.ToList()); PlayersUpdated = false; } }
internal void Save() { if (PetMappingUpdated) { var filtered = PetToPlayer.Where(keypair => !GameGeneratedPets.ContainsKey(keypair.Key) && IsPossiblePlayerName(keypair.Value) && keypair.Value != Labels.UNASSIGNED); ConfigUtil.SavePetMapping(filtered); PetMappingUpdated = false; } var list = new List <string>(); foreach (var keypair in VerifiedPlayers) { if (!string.IsNullOrEmpty(keypair.Key)) { list.Add(keypair.Key + "=" + Math.Round(keypair.Value)); } } ConfigUtil.SavePlayers(list); }