allenwu 0 Posted September 15 Share Posted September 15 I use the move manager stuck count to detected stuck or not, if stuck count >n then execute recovery step in the quester step, but after step execute the stuck count always there, the quester always do the recovery step, anyone has idea about this? Link to comment https://wrobot.eu/forums/topic/16197-how-to-clean-the-move-manager-stuck-count/ Share on other sites More sharing options...
Droidz 2766 Posted September 22 Share Posted September 22 Hello, Direct access (simple but not ideal) : // You can reset the counter to 0 directly wManager.Wow.Helpers.StuckResolver.StuckCount = 0; Differential approach : // At the beginning of your recovery step, save the current value int initialStuckCount = wManager.Wow.Helpers.StuckResolver.StuckCount; // ... your recovery logic ... // After recovery, calculate how many new stuck events occurred int newStuckEvents = wManager.Wow.Helpers.StuckResolver.StuckCount - initialStuckCount; // Reset the counter to what it was initially plus any new events wManager.Wow.Helpers.StuckResolver.StuckCount = initialStuckCount; Local counter with events : var localStuckCounter = 0; wManager.Events.MovementEvents.OnPulseStuckResolver += cancelable => { localStuckCounter++; // cancelable.Cancel(); // if you want to cancel the automatic unstuck }; // Use localStuckCounter instead of StuckResolver.StuckCount // Reset localStuckCounter = 0 after your recovery Link to comment https://wrobot.eu/forums/topic/16197-how-to-clean-the-move-manager-stuck-count/#findComment-70825 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now