public void SetDiedIfInDungeon(DiedObject dieObject)
 {
     if (_currentGuid != null && CurrentPlayerUsername != null && dieObject.DiedName == CurrentPlayerUsername)
     {
         try
         {
             var item = _mainWindowViewModel.TrackingDungeons.First(x => x.MapsGuid.Contains((Guid)_currentGuid) && x.StartDungeon > DateTime.UtcNow.AddDays(-1));
             item.DiedName      = dieObject.DiedName;
             item.KilledBy      = dieObject.KilledBy;
             item.DiedInDungeon = true;
         }
         catch (Exception e)
         {
             Log.Error(nameof(SetDiedIfInDungeon), e);
         }
     }
 }
Exemplo n.º 2
0
 public void SetDiedIfInDungeon(DiedObject dieObject)
 {
     if (_currentGuid != null && LocalUserData.Username != null && dieObject.DiedName == LocalUserData.Username)
     {
         try
         {
             var item = _dungeons.First(x => x.GuidList.Contains((Guid)_currentGuid) && x.EnterDungeonFirstTime > DateTime.UtcNow.AddDays(-1));
             item.DiedName      = dieObject.DiedName;
             item.KilledBy      = dieObject.KilledBy;
             item.DiedInDungeon = true;
         }
         catch (Exception e)
         {
             ConsoleManager.WriteLineForError(MethodBase.GetCurrentMethod().DeclaringType, e);
             Log.Error(MethodBase.GetCurrentMethod().DeclaringType, e);
         }
     }
 }