Esempio n. 1
0
        internal static async Task <bool> TeleportToAetheryte(uint aetheryteId)
        {
            await Coroutine.Sleep(TimeSpan.FromMilliseconds(MainSettings.Instance.ActionDelay));

            await CommonBehaviors.CreateTeleportBehavior(vr => aetheryteId, vr => WorldManager.GetZoneForAetheryteId(aetheryteId)).ExecuteCoroutine();

            await Coroutine.Wait(TimeSpan.FromSeconds(10), () => !Core.Player.IsCasting || Core.Player.InCombat);

            await Coroutine.Wait(TimeSpan.FromSeconds(2), () => Core.Player.InCombat);

            await Coroutine.Wait(TimeSpan.MaxValue, () => !CommonBehaviors.IsLoading || Core.Player.InCombat);

            await Coroutine.Wait(TimeSpan.FromSeconds(2), () => Core.Player.InCombat);

            return(true);
        }