コード例 #1
0
    public static bool IsOriginalSeed(this Spawner8a spawner, ulong groupSeed)
    {
        var rand = new Xoroshiro128Plus(groupSeed);

        for (int i = 0; i < Spawner8a.EntryCount; i++)
        {
            var entry = spawner[i];
            if (entry.IsEmpty != 0)
            {
                break;
            }

            if (entry.GenerateSeed != rand.Next())
            {
                return(false);
            }
            if (entry.AlphaSeed != rand.Next())
            {
                return(false);
            }
        }

        return(rand.Next() == spawner.Meta.GroupSeed);
    }
コード例 #2
0
 public static ulong ComputeGroupSeed(this Spawner8a spawner) => ComputeGroupSeed(spawner[0]);