private void AddNewUnit(PlayerStore playerStore, UnitId unitId) { try { var time = playerStore.Units[unitId].InitDate; if ((DateTime.Now - time).Seconds > PSettings.PreferenceAll.OverlayAlert.Time) { playerStore.Units[unitId] = new UnitListData(time, false, true); } } catch (KeyNotFoundException) { playerStore.Units.Add(unitId, new UnitListData(DateTime.Now, true, false)); } }
private void AddNewUnit(PlayerStore playerStore, UnitId unitId) { try { var time = playerStore.Units[unitId].InitDate; if ((DateTime.Now - time).Seconds > PSettings.PreferenceAll.OverlayAlert.Time) playerStore.Units[unitId] = new UnitListData(time, false, true); } catch (KeyNotFoundException) { playerStore.Units.Add(unitId, new UnitListData(DateTime.Now, true, false)); } }