コード例 #1
0
        private async Task <bool> Searching()
        {
            if (_hostileLocation == Vector3.Zero)
            {
                _hostileLocation = FindNearestHostileUnitLocation();
                if (_hostileLocation != Vector3.Zero)
                {
                    State = States.KillingHostile;
                    return(false);
                }
            }

            var ids = BountyData?.LevelAreaIds ?? new HashSet <int> {
                ZetaDia.CurrentLevelAreaSnoId
            };

            if (!await ExplorationCoroutine.Explore(ids, useIgnoreRegions: false))
            {
                return(false);
            }

            if (_stopWhenExplored && ProfileConditions.PercentNodesVisited(90))
            {
                State = States.Completed;
                return(false);
            }

            ExplorationGrid.Instance.WalkableNodes.ForEach(n => { n.IsVisited = false; });
            return(false);
        }
コード例 #2
0
ファイル: ExploreTag.cs プロジェクト: honorbuddy/Trinity
        private async Task <bool> CheckPreDefinedStopConditions()
        {
            if (ExitNameHash != 0 && ProfileConditions.MarkerExistsNearMe(ExitNameHash, 80f))
            {
                return(true);
            }

            if (ActorId > 0 && ProfileConditions.ActorExistsNearMe(ActorId, 80f))
            {
                return(true);
            }

            if (ExploreUntil == "ExitFound" && ProfileConditions.MarkerTypeWithinRange("Exit", 80f) &&
                (ExitNameHash == 0 || ProfileConditions.MarkerExistsNearMe(ExitNameHash, 80f)))
            {
                return(true);
            }

            return(false);
        }