コード例 #1
0
        public override async Task <bool> MoveFromSpot(ExGatherTag tag)
        {
            tag.StatusText = "Moving from " + this;

            var result = true;

            if (ReturnToApproachLocation)
            {
                result &= await approachLocation.MoveToOnGround();
            }

#if RB_CN
            if (UnstealthAfter && Core.Player.HasAura((int)AbilityAura.Stealth))
            {
                result &= await tag.CastAura(Ability.Stealth);
            }
#else
            if (UnstealthAfter && Core.Player.HasAura((int)AbilityAura.Sneak))
            {
                result &= await tag.CastAura(Ability.Sneak);
            }
#endif

            //change the approach location for the next time we go to this node.
            approachLocation = HotSpots.Shuffle().First();

            return(result);
        }
コード例 #2
0
		public override async Task<bool> MoveToSpot(ExGatherTag tag)
		{
			tag.StatusText = "Moving to " + this;

			if (StealthLocation == Vector3.Zero)
			{
				return false;
			}

			var result =
				await
				StealthLocation.MoveTo(UseMesh,
					radius: tag.Radius,
					name: "Stealth Location",
					stopCallback: tag.MovementStopCallback,
					dismountAtDestination: true);

			if (result)
			{
				await Coroutine.Yield();
				await tag.CastAura(Ability.Stealth, AbilityAura.Stealth);

				result =
					await NodeLocation.MoveToNoMount(UseMesh, tag.Distance, tag.Node.EnglishName, tag.MovementStopCallback);
			}

			return result;
		}
コード例 #3
0
        public override async Task <bool> Prepare(ExGatherTag tag)
        {
            await tag.CastAura(Ability.CollectorsGlove, AbilityAura.CollectorsGlove);

            var ticks = 0;

            do
            {
                await Wait();

                if (!tag.GatherItem.TryGatherItem())
                {
                    return(false);
                }
            } while (ticks++ < 10 && !await Coroutine.Wait(3000, () => GatheringMasterpiece.IsOpen) && Behaviors.ShouldContinue);

            if (ticks > 10)
            {
                tag.Logger.Error("Timed out during collectable preparation");
            }

            await Coroutine.Sleep(500);

            return(true);
        }
コード例 #4
0
        public override async Task <bool> MoveToSpot(ExGatherTag tag)
        {
            tag.StatusText = "Moving to " + this;

            var result =
                await
                NodeLocation.MoveTo(
                    UseMesh,
                    radius : tag.Distance,
                    name : tag.Node.EnglishName,
                    stopCallback : tag.MovementStopCallback,
                    dismountAtDestination : true);

            if (result)
            {
                var landed = MovementManager.IsDiving || await NewNewLandingTask();

                if (landed && Core.Player.IsMounted)
                {
                    ActionManager.Dismount();
                }

                Navigator.Stop();
                await Coroutine.Yield();

                await tag.CastAura(Ability.Stealth, AbilityAura.Stealth);
            }

            await Coroutine.Yield();

            return(result);
        }
コード例 #5
0
        public override async Task <bool> MoveToSpot(ExGatherTag tag)
        {
            tag.StatusText = "Moving to " + this;

            if (StealthLocation == Vector3.Zero)
            {
                return(false);
            }

            var result =
                await
                StealthLocation.MoveTo(
                    UseMesh,
                    radius : tag.Radius,
                    name : "Stealth Location",
                    stopCallback : tag.MovementStopCallback,
                    dismountAtDestination : true);

            if (result)
            {
                await Coroutine.Yield();

                await tag.CastAura(Ability.Stealth, AbilityAura.Stealth);

                result = await NodeLocation.MoveToNoMount(UseMesh, tag.Distance, tag.Node.EnglishName, tag.MovementStopCallback);
            }

            return(result);
        }
コード例 #6
0
        public override async Task <bool> MoveFromSpot(ExGatherTag tag)
        {
            tag.StatusText = "Moving from " + this;

#if RB_CN
            if (UnstealthAfter && Core.Player.HasAura((int)AbilityAura.Stealth))
            {
                return(await tag.CastAura(Ability.Stealth));
            }
#else
            if (UnstealthAfter && Core.Player.HasAura((int)AbilityAura.Sneak))
            {
                return(await tag.CastAura(Ability.Sneak));
            }
#endif

            return(true);
        }
コード例 #7
0
        public override async Task <bool> MoveToSpot(ExGatherTag tag)
        {
            tag.StatusText = "Moving to " + this;

            if (HotSpots == null || HotSpots.Count == 0)
            {
                return(false);
            }

            if (approachLocation == null)
            {
                approachLocation = HotSpots.Shuffle().First();
            }

            var result = await approachLocation.MoveTo(dismountAtDestination : Stealth);

            if (!result)
            {
                return(false);
            }

            var landed = MovementManager.IsDiving || await NewNewLandingTask();

            if (landed && Core.Player.IsMounted && !MovementManager.IsDiving)
            {
                ActionManager.Dismount();
            }

            Navigator.Stop();
            await Coroutine.Yield();

            if (Stealth)
            {
#if RB_CN
                await tag.CastAura(Ability.Stealth, AbilityAura.Stealth);
#else
                await tag.CastAura(Ability.Sneak, AbilityAura.Sneak);
#endif
            }

            result = await NodeLocation.MoveToOnGroundNoMount(tag.Distance, tag.Node.EnglishName, tag.MovementStopCallback);

            return(result);
        }
コード例 #8
0
		public override async Task<bool> MoveFromSpot(ExGatherTag tag)
		{
			tag.StatusText = "Moving from " + this;

			if (UnstealthAfter && Core.Player.HasAura((int) AbilityAura.Stealth))
			{
				return await tag.CastAura(Ability.Stealth);
			}

			return true;
		}
コード例 #9
0
		public override async Task<bool> MoveFromSpot(ExGatherTag tag)
		{
			tag.StatusText = "Moving from " + this;

			var result = true;
			if (ReturnToStealthLocation)
			{
				result &= await StealthLocation.MoveToNoMount(UseMesh, tag.Radius, tag.Node.EnglishName, tag.MovementStopCallback);
			}

			if (UnstealthAfter && Core.Player.HasAura((int) AbilityAura.Stealth))
			{
				result &= await tag.CastAura(Ability.Stealth);
			}

			return result;
		}
コード例 #10
0
        public override async Task <bool> MoveFromSpot(ExGatherTag tag)
        {
            tag.StatusText = "Moving from " + this;

            var result = true;

            if (ReturnToStealthLocation)
            {
                result &= await StealthLocation.MoveToOnGroundNoMount(tag.Distance, tag.Node.EnglishName, tag.MovementStopCallback);
            }

            if (UnstealthAfter && Core.Player.HasAura((int)AbilityAura.Stealth))
            {
                result &= await tag.CastAura(Ability.Stealth);
            }

            return(result);
        }
コード例 #11
0
        public override async Task <bool> MoveFromSpot(ExGatherTag tag)
        {
            tag.StatusText = "Moving from " + this;

            var result = true;

            if (ReturnToApproachLocation)
            {
                result &= await approachLocation.MoveToNoMount(UseMesh, tag.MovementStopCallback);
            }

            if (UnstealthAfter && Core.Player.HasAura((int)AbilityAura.Stealth))
            {
                result &= await tag.CastAura(Ability.Stealth);
            }

            return(result);
        }
コード例 #12
0
		public override async Task<bool> MoveToSpot(ExGatherTag tag)
		{
			tag.StatusText = "Moving to " + this;

			if (approachLocation == Vector3.Zero)
			{
				if (HotSpots == null || HotSpots.Count == 0)
				{
					return false;
				}

				approachLocation = HotSpots.Shuffle().First();
			}

			var result =
				await
				approachLocation.MoveToPointWithin(dismountAtDestination: Stealth);

			if (result)
			{
				await Coroutine.Yield();

				if (Stealth)
				{
					await tag.CastAura(Ability.Stealth, AbilityAura.Stealth);
					result =
						await NodeLocation.MoveToNoMount(UseMesh, tag.Distance, tag.Node.EnglishName, tag.MovementStopCallback);
				}
				else
				{
					result =
						await
						NodeLocation.MoveTo(UseMesh,
							radius: tag.Distance,
							name: tag.Node.EnglishName,
							stopCallback: tag.MovementStopCallback);
				}
			}

			return result;
		}
コード例 #13
0
        public override async Task <bool> MoveFromSpot(ExGatherTag tag)
        {
            tag.StatusText = "Moving from " + this;

            var result = true;

            if (ReturnToApproachLocation)
            {
                result &= await approachLocation.MoveToNoMount(UseMesh, tag.MovementStopCallback);
            }

            if (UnstealthAfter && Core.Player.HasAura((int)AbilityAura.Stealth))
            {
                result &= await tag.CastAura(Ability.Stealth);
            }

            //change the approach location for the next time we go to this node.
            approachLocation = HotSpots.Shuffle().First();

            return(result);
        }
コード例 #14
0
        public override async Task <bool> MoveToSpot(ExGatherTag tag)
        {
            tag.StatusText = "Moving to " + this;

            if (approachLocation == Vector3.Zero)
            {
                if (HotSpots == null || HotSpots.Count == 0)
                {
                    return(false);
                }

                approachLocation = HotSpots.Shuffle().First();
            }

            var result = await approachLocation.MoveToPointWithin(dismountAtDestination : Stealth);

            if (result)
            {
                await Coroutine.Yield();

                if (Stealth)
                {
                    await tag.CastAura(Ability.Stealth, AbilityAura.Stealth);

                    result = await NodeLocation.MoveToNoMount(UseMesh, tag.Distance, tag.Node.EnglishName, tag.MovementStopCallback);
                }
                else
                {
                    result =
                        await
                        NodeLocation.MoveTo(
                            UseMesh,
                            radius : tag.Distance,
                            name : tag.Node.EnglishName,
                            stopCallback : tag.MovementStopCallback);
                }
            }

            return(result);
        }
コード例 #15
0
		public override async Task<bool> Prepare(ExGatherTag tag)
		{
			await tag.CastAura(Ability.CollectorsGlove, AbilityAura.CollectorsGlove);

			var ticks = 0;
			do
			{
				await Wait();

				if (!tag.GatherItem.TryGatherItem())
				{
					return false;
				}
			} while (ticks++ < 10 && !await Coroutine.Wait(3000, () => GatheringMasterpiece.IsOpen) && Behaviors.ShouldContinue);

			if (ticks > 10)
			{
				tag.Logger.Error("Timed out during collectable preparation");
			}

			return true;
		}
コード例 #16
0
        public override async Task <bool> MoveToSpot(ExGatherTag tag)
        {
            tag.StatusText = "Moving to " + this;

            if (StealthLocation == Vector3.Zero)
            {
                return(false);
            }

            var result =
                await
                StealthLocation.MoveTo(
                    UseMesh,
                    radius : tag.Radius,
                    name : "Stealth Location",
                    stopCallback : tag.MovementStopCallback,
                    dismountAtDestination : true);

            if (!result)
            {
                return(false);
            }

            var landed = MovementManager.IsDiving || await CommonTasks.Land();

            if (landed && Core.Player.IsMounted)
            {
                ActionManager.Dismount();
            }

            Navigator.Stop();
            await Coroutine.Yield();

            await tag.CastAura(Ability.Stealth, AbilityAura.Stealth);

            result = await NodeLocation.MoveToOnGroundNoMount(tag.Distance, tag.Node.EnglishName, tag.MovementStopCallback);

            return(result);
        }