public async Task<bool> Coroutine() { if (_isDone) { return true; } PluginEvents.PulseUpdates(); if (!await _keywardenCoroutine.GetCoroutine()) return true; _keywardenCoroutine.Dispose(); _keywardenCoroutine = null; var keywardenData = GetNext(); if (keywardenData != null) { _keywardenCoroutine = new KeywardenCoroutine(keywardenData); return false; } _isDone = true; return true; }
public override void OnStart() { if (!Adventurer.Enabled) { Logger.Error("Plugin is not enabled. Please enable Adventurer and try again."); _isDone = true; return; } PluginEvents.CurrentProfileType = ProfileType.Keywarden; if (_keywardenCoroutine == null) { var keywardenData = GetNext(); if (keywardenData != null) { _keywardenCoroutine = new KeywardenCoroutine(keywardenData); } else { Logger.Info("[Keywardens] Uhm. No eligible keywardens to cook, remaking the game."); _isDone = true; } } }
public override void ResetCachedDone(bool force = false) { _isDone = false; _keywardenCoroutine = null; }