@@ -15,31 +15,27 @@ use crate::{
1515 ZzzGachaType ,
1616} ;
1717
18- /// Applies a known banner result to tracker guarantee state.
19- ///
20- /// Unknown coverage leaves both the displayed result and guarantee state
21- /// untouched, preventing incomplete historical catalogs from inventing losses.
18+ /// Applies the shared banner result to tracker guarantee state.
2219fn classify_win (
2320 catalog : & BannerCatalog ,
2421 pool : ZzzGachaType ,
2522 item : PullItem ,
2623 timestamp : DateTime < Utc > ,
2724 guarantee : & mut bool ,
28- ) -> Option < WinType > {
25+ ) -> WinType {
2926 match catalog. classify ( PullPool :: Zzz ( pool) , item, timestamp) {
30- BannerOutcome :: Unknown => None ,
31- BannerOutcome :: Featured if * guarantee => {
27+ BannerOutcome :: Win if * guarantee => {
3228 * guarantee = false ;
33- Some ( WinType :: Guarantee )
29+ WinType :: Guarantee
3430 }
35- BannerOutcome :: Featured => Some ( WinType :: Win ) ,
36- BannerOutcome :: OffBanner if * guarantee => {
31+ BannerOutcome :: Win => WinType :: Win ,
32+ BannerOutcome :: Loss if * guarantee => {
3733 * guarantee = false ;
38- Some ( WinType :: Guarantee )
34+ WinType :: Guarantee
3935 }
40- BannerOutcome :: OffBanner => {
36+ BannerOutcome :: Loss => {
4137 * guarantee = true ;
42- Some ( WinType :: Loss )
38+ WinType :: Loss
4339 }
4440 }
4541}
@@ -270,13 +266,13 @@ async fn get_signal_tracker(
270266 special_pull_a = 0 ;
271267 special_pull_s = 0 ;
272268
273- signal. win = classify_win (
269+ signal. win = Some ( classify_win (
274270 & banner_catalog,
275271 ZzzGachaType :: Special ,
276272 PullItem :: Character ( signal. item_id ) ,
277273 signal. timestamp ,
278274 & mut guarantee,
279- ) ;
275+ ) ) ;
280276 }
281277 _ => { }
282278 }
@@ -323,13 +319,13 @@ async fn get_signal_tracker(
323319 w_engine_pull_a = 0 ;
324320 w_engine_pull_s = 0 ;
325321
326- signal. win = classify_win (
322+ signal. win = Some ( classify_win (
327323 & banner_catalog,
328324 ZzzGachaType :: WEngine ,
329325 PullItem :: WEngine ( signal. item_id ) ,
330326 signal. timestamp ,
331327 & mut guarantee,
332- ) ;
328+ ) ) ;
333329 }
334330 _ => { }
335331 }
@@ -422,13 +418,13 @@ async fn get_signal_tracker(
422418 exclusive_rescreening_pull_a = 0 ;
423419 exclusive_rescreening_pull_s = 0 ;
424420
425- signal. win = classify_win (
421+ signal. win = Some ( classify_win (
426422 & banner_catalog,
427423 ZzzGachaType :: ExclusiveRescreening ,
428424 PullItem :: Character ( signal. item_id ) ,
429425 signal. timestamp ,
430426 & mut guarantee,
431- ) ;
427+ ) ) ;
432428 }
433429 _ => { }
434430 }
@@ -481,13 +477,13 @@ async fn get_signal_tracker(
481477 w_engine_reverberation_pull_a = 0 ;
482478 w_engine_reverberation_pull_s = 0 ;
483479
484- signal. win = classify_win (
480+ signal. win = Some ( classify_win (
485481 & banner_catalog,
486482 ZzzGachaType :: WEngineReverberation ,
487483 PullItem :: WEngine ( signal. item_id ) ,
488484 signal. timestamp ,
489485 & mut guarantee,
490- ) ;
486+ ) ) ;
491487 }
492488 _ => { }
493489 }
0 commit comments