public override async Task<bool> Prepare(GatherCollectableTag tag) { await tag.CastAura(Ability.CollectorsGlove, AbilityAura.CollectorsGlove); var ticks = 0; do { await Wait(); if (!tag.GatherItem.TryGatherItem()) { return false; } } while (ticks++ < 10 && (MasterpieceWindow = await GetValidMasterPieceWindow(3000)) == null && Behaviors.ShouldContinue); if (ticks >= 10) { Logging.WriteDiagnostic(Colors.Red, "Timed out during collectable preparation"); } return true; }
public override async Task<bool> Prepare(GatherCollectableTag tag) { await tag.CastAura(Ability.CollectorsGlove, AbilityAura.CollectorsGlove); var ticks = 0; do { await Wait(); if (!tag.GatherItem.TryGatherItem()) { return false; } } while (ticks++ < 10 && !await MasterpieceWindow.Refresh(3000) && Behaviors.ShouldContinue); if (ticks > 10) { tag.Logger.Error("Timed out during collectable preparation"); } return true; }