public override void Update(TrackResult e) { Dominating ev = e as Dominating; if (ev == null) { return; } ev.Habits.AddLogsHabit(1, DateTime.Now); }
public override void Update(Trigger e) { if (badgeRepository == null) { return; } Dominating ev = e as Dominating; if (ev == null) { return; } Badge badge = _gainer.Gain(); Badge b = badgeRepository.FindByName(badge.Name); if (b == null) { badgeRepository.Create(badge); b = badgeRepository.FindByName(badge.Name); } badgeRepository.AddUser(b, ev.User_id); }