示例#1
0
        internal TeamLock Clone()
        {
            var c = new TeamLock {
                Comment = Comment, Locks = (NPCLock[])Locks.Clone()
            };

            for (int i = 0; i < Locks.Length; i++)
            {
                Locks[i] = Locks[i].Clone();
            }
            return(c);
        }
示例#2
0
        internal TeamLockResult(TeamLock teamSpec, uint originSeed, int tsv)
        {
            Locks = new Stack <NPCLock>((Specifications = teamSpec).Locks);
            Team  = new Stack <SeedFrame>();
            Cache = new FrameCache(RNG.XDRNG.Reverse(originSeed, 2), RNG.XDRNG.Prev);
            TSV   = tsv;

            Valid = FindLockSeed();
            if (Valid)
            {
                OriginSeed = Cache.GetSeed(OriginFrame);
            }
        }
示例#3
0
        public static bool IsFirstShadowLockValid(PIDIV pv, TeamLock[] teams)
        {
            if (teams.Length == 0)
            {
                return(true);
            }

            var singleTeams = new TeamLock[teams.Length];

            for (int i = 0; i < teams.Length; i++)
            {
                var t     = teams[i];
                var clone = t.Clone();
                var first = t.Locks[t.Locks.Length - 1];
                clone.Locks    = new[] { first };
                singleTeams[i] = clone;
            }

            return(IsAllShadowLockValid(pv, singleTeams));
        }