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