@@ -236,6 +236,8 @@ std::set<std::string> OutbreakFinder::read_travel_map_outbreaks(
236236){
237237 OutbreakFinder_Descriptor::Stats& stats = env.current_stats <OutbreakFinder_Descriptor::Stats>();
238238
239+ VideoOverlaySet overlays (env.console );
240+
239241 MapRegion start_region = MapRegion::NONE;
240242
241243 MapRegion current_region = detect_selected_region (env.console , context);
@@ -244,10 +246,13 @@ std::set<std::string> OutbreakFinder::read_travel_map_outbreaks(
244246 return std::set<std::string>();
245247 }
246248
249+ OutbreakReader reader (env.console , LANGUAGE, env.console );
250+ reader.make_overlays (overlays);
251+
247252 MMOQuestionMarkDetector question_mark_detector (env.logger ());
248- VideoOverlaySet mmo_overlay_set (env.console );
253+ // VideoOverlaySet mmo_overlay_set(env.console);
249254 std::array<bool , 5 > mmo_appears = question_mark_detector.detect_MMO_on_hisui_map (env.console .video ().snapshot ());
250- add_hisui_MMO_detection_to_overlay (mmo_appears, mmo_overlay_set );
255+ add_hisui_MMO_detection_to_overlay (mmo_appears, overlays );
251256
252257 // If the current region is a wild area, the yellow cursor may overlap with the MMO question marker, causing
253258 // wrong detection. So we have to check it's location again by moving the cursor to the next location
@@ -259,7 +264,7 @@ std::set<std::string> OutbreakFinder::read_travel_map_outbreaks(
259264 auto new_mmo_read = question_mark_detector.detect_MMO_on_hisui_map (env.console .video ().snapshot ());
260265 mmo_appears[current_wild_area_index] = new_mmo_read[current_wild_area_index];
261266 if (new_mmo_read[current_wild_area_index]){
262- add_hisui_MMO_detection_to_overlay (mmo_appears, mmo_overlay_set );
267+ add_hisui_MMO_detection_to_overlay (mmo_appears, overlays );
263268 }
264269 // now mmo_appears should contain correct detection of MMO question marks.
265270 }
@@ -303,7 +308,6 @@ std::set<std::string> OutbreakFinder::read_travel_map_outbreaks(
303308 if (mmo_appears[wild_region_index]){
304309 env.log (std::string (MAP_REGION_NAMES[(int )current_region]) + " have MMO." , COLOR_ORANGE);
305310 }else {
306- OutbreakReader reader (env.console , LANGUAGE, env.console );
307311 OCR::StringMatchResult result = reader.read (env.console .video ().snapshot ());
308312 if (!result.results .empty ()){
309313 stats.outbreaks ++;
0 commit comments