private void ScanForObjective() { if (_previouslyFoundLocation != Vector3.Zero && PluginTime.ReadyToUse(_returnTimeForPreviousLocation, 60000)) { _objectiveLocation = _previouslyFoundLocation; _previouslyFoundLocation = Vector3.Zero; _returnTimeForPreviousLocation = PluginTime.CurrentMillisecond; Core.Logger.Debug("Returning previous objective location."); return; } if (PluginTime.ReadyToUse(_lastScanTime, 1000)) { _lastScanTime = PluginTime.CurrentMillisecond; TrinityMarker marker = null; if (_markerHash != 0) { if (_markerHash == -1) { marker = BountyHelpers.ScanForMarker(0, _objectiveScanRange); } else { marker = BountyHelpers.ScanForMarker(_markerHash, _markerType, _objectiveScanRange); } } else if (!string.IsNullOrEmpty(_markerName)) { marker = BountyHelpers.ScanForMarker(_markerName, _objectiveScanRange); } else if (_markerType != default(WorldMarkerType)) { marker = BountyHelpers.ScanForMarker(_markerType, _objectiveScanRange); } if (marker != null && marker.Position != Vector3.Zero) { _objectiveLocation = marker.Position; Core.Logger.Log($"[MoveToMapMarker] Found the objective {marker}"); ExplorationHelpers.SetExplorationPriority(_objectiveLocation); } _objectiveLocation = marker?.Position ?? Vector3.Zero; } }