Example #1
0
        private async Task <bool> SkipCorrection(int skips, CancellationToken token)
        {
            var currentSeed = new RaidSpawnDetail(await DenData(Hub, token).ConfigureAwait(false), 0).Seed;

            if (currentSeed == InitialSeed)
            {
                Log("No frames were skipped. Ensure \"Synchronize Clock via Internet\" is enabled, are using sys-botbase that allows time change, and haven't used anything that shifts RAM. \"SkipDelay\" may also need to be increased.");
                return(false);
            }

            while (currentSeed != DestinationSeed)
            {
                skips = DenUtil.GetSkipsToTargetSeed(currentSeed, DestinationSeed, skips);
                if (skips > 0)
                {
                    Log($"Fell short by {skips} skips! Resuming skipping until destination seed is reached.");
                    await PerformDaySkip(skips, token).ConfigureAwait(false);

                    currentSeed = new RaidSpawnDetail(await DenData(Hub, token).ConfigureAwait(false), 0).Seed;
                }
                else if (skips < 0)
                {
                    Log($"Date must have rolled while skipping. We have overskipped our target.");
                    return(false);
                }
                else
                {
                    return(true);
                }
            }
            return(true);
        }
Example #2
0
        private async Task <int> SkipCheck(int skips, int skipsDone, CancellationToken token)
        {
            var  currentSeed = new RaidSpawnDetail(await DenData(Hub, token).ConfigureAwait(false), 0).Seed;
            var  remaining   = DenUtil.GetSkipsToTargetSeed(currentSeed, DestinationSeed, skips);
            bool dateRolled  = remaining < skips - skipsDone;

            if (dateRolled)
            {
                return(remaining + skipsDone);
            }
            else
            {
                return(skips);
            }
        }
 public RaidParameters(int index, RaidSpawnDetail detail, int location, int x, int y)
     : this(index, detail.Seed, detail.Stars, detail.RandRoll, detail.Flags, detail.DenType, location, x, y)
 {
 }