@@ -237,7 +237,7 @@ private void Eft_RaidEnded(object? sender, RaidInfoEventArgs e)
237
237
}
238
238
messageLog . AddMessage ( monMessage ) ;
239
239
runthroughTimer . Stop ( ) ;
240
- if ( e . RaidInfo . RaidType == RaidType . Scav && Properties . Settings . Default . scavCooldownAlert )
240
+ if ( Properties . Settings . Default . scavCooldownAlert && ( e . RaidInfo . RaidType == RaidType . Scav || e . RaidInfo . RaidType == RaidType . PVE ) )
241
241
{
242
242
scavCooldownTimer . Stop ( ) ;
243
243
scavCooldownTimer . Interval = TimeSpan . FromSeconds ( TarkovDev . ResetScavCoolDown ( ) ) . TotalMilliseconds ;
@@ -630,25 +630,40 @@ private async void Eft_RaidStart(object? sender, RaidInfoEventArgs e)
630
630
MonitorMessage monMessage = new ( $ "Starting { e . RaidInfo . RaidType } raid on { mapName } ") ;
631
631
if ( map != null && e . RaidInfo . StartedTime != null && map . HasGoons ( ) )
632
632
{
633
- MonitorMessageButton goonsButton = new ( $ "Report Goons", Icons . Material . Filled . Groups ) ;
634
- goonsButton . OnClick = async ( ) => {
635
- try
633
+ AddGoonsButton ( monMessage , e . RaidInfo ) ;
634
+ }
635
+ else if ( map == null )
636
+ {
637
+ monMessage . Message = $ "Starting { e . RaidInfo . RaidType } raid on:";
638
+ MonitorMessageSelect select = new ( ) ;
639
+ foreach ( var gameMap in TarkovDev . Maps )
640
+ {
641
+ select . Options . Add ( new ( gameMap . name , gameMap . nameId ) ) ;
642
+ }
643
+ select . Placeholder = "Select map" ;
644
+ monMessage . Selects . Add ( select ) ;
645
+ MonitorMessageButton mapButton = new ( "Set map" , Icons . Material . Filled . Map ) ;
646
+ mapButton . OnClick += ( ) => {
647
+ if ( select . Selected == null )
636
648
{
637
- await TarkovDev . PostGoonsSighting ( e . RaidInfo . Map , ( DateTime ) e . RaidInfo . StartedTime , eft . AccountId ) ;
638
- messageLog . AddMessage ( $ "Goons reported on { mapName } ", "info" ) ;
649
+ return ;
639
650
}
640
- catch ( Exception ex ) {
641
- messageLog . AddMessage ( $ "Error reporting goons: { ex . Message } { ex . StackTrace } ", "exception" ) ;
651
+ e . RaidInfo . Map = select . Selected . Value ;
652
+ monMessage . Message = $ "Starting { e . RaidInfo . RaidType } raid on { select . Selected . Text } ";
653
+ monMessage . Buttons . Clear ( ) ;
654
+ monMessage . Selects . Clear ( ) ;
655
+ //AddGoonsButton(monMessage, e.RaidInfo); // offline raids have goons on all goons maps
656
+ if ( Properties . Settings . Default . autoNavigateMap )
657
+ {
658
+ var map = TarkovDev . Maps . Find ( m => m . nameId == e . RaidInfo . Map ) ;
659
+ if ( map == null )
660
+ {
661
+ return ;
662
+ }
663
+ SocketClient . NavigateToMap ( map ) ;
642
664
}
643
- monMessage . Buttons . Remove ( goonsButton ) ;
644
665
} ;
645
- goonsButton . Confirm = new (
646
- $ "Report Goons on { mapName } ",
647
- "<p>Please only submit a report if you saw the goons in this raid.</p><p><strong>Notice:</strong> By submitting a goons report, you consent to collection of your IP address and EFT account id for report verification purposes.</p>" ,
648
- "Submit report" , "Cancel"
649
- ) ;
650
- goonsButton . Timeout = TimeSpan . FromMinutes ( 120 ) . TotalMilliseconds ;
651
- monMessage . Buttons . Add ( goonsButton ) ;
666
+ monMessage . Buttons . Add ( mapButton ) ;
652
667
}
653
668
messageLog . AddMessage ( monMessage ) ;
654
669
if ( Properties . Settings . Default . raidStartAlert && e . RaidInfo . StartingTime == null )
@@ -661,26 +676,51 @@ private async void Eft_RaidStart(object? sender, RaidInfoEventArgs e)
661
676
{
662
677
messageLog . AddMessage ( $ "Re-entering raid on { mapName } ") ;
663
678
}
664
- if ( e . RaidInfo . Reconnected || ! e . RaidInfo . Online || e . RaidInfo . QueueTime == 0 || e . RaidInfo . RaidType == RaidType . Unknown )
665
- {
666
- return ;
667
- }
668
- if ( Properties . Settings . Default . runthroughAlert && e . RaidInfo . RaidType == RaidType . PMC )
679
+ if ( Properties . Settings . Default . runthroughAlert && ! e . RaidInfo . Reconnected && ( e . RaidInfo . RaidType == RaidType . PMC || e . RaidInfo . RaidType == RaidType . PVE ) )
669
680
{
670
681
runthroughTimer . Stop ( ) ;
671
682
runthroughTimer . Start ( ) ;
672
683
}
673
- if ( ! Properties . Settings . Default . submitQueueTime || e . Profile . Type == ProfileType . PVE )
684
+ if ( Properties . Settings . Default . submitQueueTime && e . RaidInfo . QueueTime > 0 && e . RaidInfo . RaidType != RaidType . Unknown )
674
685
{
675
- return ;
676
- }
677
- try
678
- {
679
- await TarkovDev . PostQueueTime ( e . RaidInfo . Map , ( int ) Math . Round ( e . RaidInfo . QueueTime ) , e . RaidInfo . RaidType . ToString ( ) . ToLower ( ) ) ;
686
+ try
687
+ {
688
+ await TarkovDev . PostQueueTime ( e . RaidInfo . Map , ( int ) Math . Round ( e . RaidInfo . QueueTime ) , e . RaidInfo . RaidType . ToString ( ) . ToLower ( ) , eft . CurrentProfile . Type ) ;
689
+ }
690
+ catch ( Exception ex )
691
+ {
692
+ messageLog . AddMessage ( $ "Error submitting queue time: { ex . Message } ", "exception" ) ;
693
+ }
680
694
}
681
- catch ( Exception ex )
695
+ }
696
+
697
+ private void AddGoonsButton ( MonitorMessage monMessage , RaidInfo raidInfo )
698
+ {
699
+ var mapName = raidInfo . Map ;
700
+ var map = TarkovDev . Maps . Find ( m => m . nameId == mapName ) ;
701
+ if ( map != null ) mapName = map . name ;
702
+ if ( map != null && raidInfo . StartedTime != null && map . HasGoons ( ) )
682
703
{
683
- messageLog . AddMessage ( $ "Error submitting queue time: { ex . Message } ", "exception" ) ;
704
+ MonitorMessageButton goonsButton = new ( $ "Report Goons", Icons . Material . Filled . Groups ) ;
705
+ goonsButton . OnClick = async ( ) => {
706
+ try
707
+ {
708
+ await TarkovDev . PostGoonsSighting ( raidInfo . Map , ( DateTime ) raidInfo . StartedTime , eft . AccountId , eft . CurrentProfile . Type ) ;
709
+ messageLog . AddMessage ( $ "Goons reported on { mapName } ", "info" ) ;
710
+ }
711
+ catch ( Exception ex )
712
+ {
713
+ messageLog . AddMessage ( $ "Error reporting goons: { ex . Message } { ex . StackTrace } ", "exception" ) ;
714
+ }
715
+ monMessage . Buttons . Remove ( goonsButton ) ;
716
+ } ;
717
+ goonsButton . Confirm = new (
718
+ $ "Report Goons on { mapName } ",
719
+ "<p>Please only submit a report if you saw the goons in this raid.</p><p><strong>Notice:</strong> By submitting a goons report, you consent to collection of your IP address and EFT account id for report verification purposes.</p>" ,
720
+ "Submit report" , "Cancel"
721
+ ) ;
722
+ goonsButton . Timeout = TimeSpan . FromMinutes ( 120 ) . TotalMilliseconds ;
723
+ monMessage . Buttons . Add ( goonsButton ) ;
684
724
}
685
725
}
686
726
0 commit comments