@@ -11,7 +11,6 @@ public static class Data
1111 {
1212 public static ActiveItemTypes ActiveItems { get ; set ; } = new ActiveItemTypes ( ) ;
1313 public static ActiveItemTypes PreviousActiveItems { get ; set ; }
14- public static MediaPlayer Player { get ; set ; } = new MediaPlayer ( ) ;
1514
1615 public static int SetAmount { get ; set ; }
1716 public static int SetTargetAmount { get ; set ; }
@@ -280,20 +279,6 @@ public static void CheckActives()
280279 MainWindow . Overlay . WarningMessageVisibility = System . Windows . Visibility . Visible ;
281280 return ;
282281 }
283- if ( Properties . Settings . Default . Sound )
284- {
285- PreviousActiveItems = new ActiveItemTypes
286- {
287- BootsActive = ActiveItems . BootsActive ,
288- GlovesActive = ActiveItems . GlovesActive ,
289- HelmetActive = ActiveItems . HelmetActive ,
290- WeaponActive = ActiveItems . WeaponActive ,
291- ChestActive = ActiveItems . ChestActive ,
292- RingActive = ActiveItems . RingActive ,
293- AmuletActive = ActiveItems . AmuletActive ,
294- BeltActive = ActiveItems . BeltActive
295- } ;
296- }
297282
298283 bool exaltedActive = Properties . Settings . Default . ExaltedRecipe ;
299284
@@ -491,19 +476,6 @@ public static void CheckActives()
491476 }
492477
493478 Trace . WriteLine ( fullSets , "full sets" ) ;
494-
495- if ( Properties . Settings . Default . Sound
496- && ! ( PreviousActiveItems . GlovesActive == ActiveItems . GlovesActive
497- && PreviousActiveItems . BootsActive == ActiveItems . BootsActive
498- && PreviousActiveItems . HelmetActive == ActiveItems . HelmetActive
499- && PreviousActiveItems . ChestActive == ActiveItems . ChestActive
500- && PreviousActiveItems . WeaponActive == ActiveItems . WeaponActive
501- && PreviousActiveItems . RingActive == ActiveItems . RingActive
502- && PreviousActiveItems . AmuletActive == ActiveItems . AmuletActive
503- && PreviousActiveItems . BeltActive == ActiveItems . BeltActive ) )
504- {
505- Player . Dispatcher . Invoke ( ( ) => PlayNotificationSound ( ) ) ;
506- }
507479 }
508480 catch ( OperationCanceledException ex ) when ( ex . CancellationToken == ct )
509481 {
@@ -653,13 +625,6 @@ public static void CalculateItemAmounts()
653625 }
654626 }
655627
656- public static void PlayNotificationSound ( )
657- {
658- Player . Volume = ( double ) ( Properties . Settings . Default . Volume / 100.0 ) ;
659- Player . Position = TimeSpan . Zero ;
660- Player . Play ( ) ;
661- }
662-
663628 public static StashTab GetStashTabFromItem ( Item item )
664629 {
665630 foreach ( var s in StashTabList . StashTabs )
@@ -685,21 +650,10 @@ public static void ActivateNextCell( bool active, Cell cell )
685650 s . TabHeaderColor = Brushes . Transparent ;
686651 }
687652
688- // remove and sound if itemlist empty
689- if ( ItemSetListHighlight . Count > 0 )
690- {
691- if ( ItemSetListHighlight [ 0 ] . ItemList . Count == 0 )
692- {
693- ItemSetListHighlight . RemoveAt ( 0 ) ;
694- Player . Dispatcher . Invoke ( ( ) => PlayNotificationSound ( ) ) ;
695- }
696- }
697- else
653+ // remove if itemlist empty
654+ if ( ItemSetListHighlight . Count > 0 && ItemSetListHighlight [ 0 ] . ItemList . Count == 0 )
698655 {
699- if ( ItemSetListHighlight . Count > 0 )
700- {
701- Player . Dispatcher . Invoke ( ( ) => PlayNotificationSound ( ) ) ;
702- }
656+ ItemSetListHighlight . RemoveAt ( 0 ) ;
703657 }
704658
705659 // next item if itemlist not empty
@@ -774,7 +728,6 @@ public static void ActivateNextCell( bool active, Cell cell )
774728
775729 // activate next set
776730 ActivateNextCell ( true , null ) ;
777- Player . Dispatcher . Invoke ( ( ) => PlayNotificationSound ( ) ) ;
778731 }
779732 }
780733 }
0 commit comments