Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- match &filters {
- Some(f) => {
- if !prng.finished {
- let frame = prng.get_frame();
- prng.advance();
- let iv_check = frame.hp_iv == f.hp_iv
- && frame.attack_iv == f.attack_iv
- && frame.defense_iv == f.defense_iv
- && frame.special_attack_iv == f.special_attack_iv
- && frame.special_defense_iv == f.special_defense_iv
- && frame.speed_iv == f.speed_iv
- && frame.nature() == f.nature;
- let shiny_check = match f.shiny_only {
- true => frame.is_shiny(f.tid, f.sid),
- false => true,
- };
- if iv_check && shiny_check {
- result_sender.send(SearchResult::Match(frame));
- filters = None;
- }
- } else {
- result_sender.send(SearchResult::NoMatch);
- }
- }
- None => {}
- }
Add Comment
Please, Sign In to add comment