public static void UpdatePlayerStatistics(Mobile pm) { AuthorStatistics ast; bool newUser = false; if (ForumCore.PlayerStatistics.ContainsKey(pm.Serial.Value)) { ast = ForumCore.GetAuthorStatistics(pm.Serial.Value); } else { ast = new AuthorStatistics(pm.Serial.Value, pm.Name, DateTime.Now, 0); newUser = true; } ast.PostCount++; if (newUser) { if (!PlayerStatistics.ContainsKey(ast.Serial)) { PlayerStatistics.Add(ast.Serial, ast); } } }
void AddPlayerStatisticsIfNotAddedBeforeFor(string playerName, string pokerSite) { if (!PlayerStatistics.ContainsKey(playerName)) { var playerStatistics = _playerStatisticsMake.New; playerStatistics.InitializePlayer(playerName, pokerSite); PlayerStatistics.Add(playerName, playerStatistics); } }
public void NewStatistic() { var newStat = new PlayerStatistic() { Label = "New Statistic" }; PlayerStatistics.Add(newStat); SelectedStatistic = newStat; }