private static void SpitPlayer(NFLPlayer p, XmlTextWriter writer) { var ep = Masters.Epm.GetEp(p.PlayerCode); if (ep == -1.0M) { if (p.PerformanceList == null) { p.LoadPerformances(Config.AllGames, false, Utility.CurrentSeason()); } if (p.PerformanceList != null) { if (p.PerformanceList.Count == 0) { p.LoadPerformances(Config.AllGames, false, Utility.CurrentSeason()); } } p.CalculateEp(Utility.CurrentSeason()); } else { p.ExperiencePoints = ep; p.PerformanceList = Masters.Epm.GetGameList(p.PlayerCode); } writer.WriteStartElement("player"); WriteElement(writer, "id", p.PlayerCode); WriteElement(writer, "name", p.PlayerName); WriteElement(writer, "ep", p.ExperiencePoints.ToString()); WriteEpList(writer, p); writer.WriteEndElement(); }
private static void SpitPlayer(NFLPlayer p, XmlTextWriter writer) { var ep = Masters.Epm.GetEp(p.PlayerCode); if (ep == -1.0M) { if (p.PerformanceList == null) p.LoadPerformances(Config.AllGames, false, Utility.CurrentSeason()); if (p.PerformanceList != null) if (p.PerformanceList.Count == 0) p.LoadPerformances(Config.AllGames, false, Utility.CurrentSeason()); p.CalculateEp(Utility.CurrentSeason()); } else { p.ExperiencePoints = ep; p.PerformanceList = Masters.Epm.GetGameList(p.PlayerCode); } writer.WriteStartElement("player"); WriteElement(writer, "id", p.PlayerCode); WriteElement(writer, "name", p.PlayerName); WriteElement(writer, "ep", p.ExperiencePoints.ToString()); WriteEpList(writer, p); writer.WriteEndElement(); }