Пример #1
0
        /// <summary>
        /// Order all of the portal scenes and work out where we are within that sequence.
        /// </summary>
        public static IndexedList <DeathGateScene> CreateSequence()
        {
            var gateScene = NearestGateScene;

            if (gateScene == null || gateScene.Distance > 800)
            {
                return(new IndexedList <DeathGateScene>());
            }

            var sequence = new IndexedList <DeathGateScene>(CurrentRegionScenes.OrderByDescending(p => p.Depth));

            while (sequence.CurrentOrDefault != null && sequence.Current.SnoId != gateScene.SnoId)
            {
                sequence.Next();
            }

            Core.Logger.Debug($"Current Scene {AdvDia.CurrentWorldScene.Name} ({AdvDia.CurrentWorldScene.SnoId})");
            Core.Logger.Debug($"Closest gate Scene {gateScene.WorldScene.Name} ({gateScene.WorldScene.SnoId}), Sequence={sequence.Index + 1}/{sequence.Count}");
            return(sequence);
        }