private void Search7_Egg() { var rng = new TinyMT(Status); int min = (int)Frame_min.Value; int max = (int)Frame_max.Value; bool CheckRandomNumber(uint rn) { int sv = (int)Pokemon.getTSV(rn); return(sv == TSV.Value || ConsiderOtherTSV.Checked && OtherTSVList.Contains(sv)); } // Advance for (int i = 0; i < min; i++) { rng.Next(); } // Prepare getsetting(rng); // Start for (int i = min; i <= max; i++, RNGPool.AddNext(rng)) { var result = RNGPool.GenerateEgg7() as EggResult; if (!(filter.CheckResult(result) || ShinyRemind.Checked && CheckRandomNumber(result.RandNum))) { continue; } Frames.Add(new Frame(result, frame: i)); if (Frames.Count > MAX_RESULTS_NUM) { return; } } }
private bool CheckRandomNumber(uint rn) { int sv = (int)((rn >> 16) ^ (rn & 0xFFFF)) >> 4; return(sv == TSV.Value || ConsiderOtherTSV.Checked && OtherTSVList.Contains(sv)); }