Fix interacting too fast on some obstacles

This commit is contained in:
Yuri Moens 2021-10-18 23:58:20 +02:00
parent f9d49d820b
commit 20fc42d999
Signed by: ymo
GPG Key ID: F6D51D6FE15BE924

View File

@ -137,6 +137,8 @@ public class HandleObstacle extends TaskNode {
hoverMap.put(current.getID(), currentObject.getBoundingBox()); hoverMap.put(current.getID(), currentObject.getBoundingBox());
} }
MethodContext.sleepUntil(Util::playerIsIdle, Calculations.random(3000, 3500));
currentObject.interact(); currentObject.interact();
Rectangle hoverRect = hoverMap.get(current.getNext().getID()); Rectangle hoverRect = hoverMap.get(current.getNext().getID());
@ -144,10 +146,6 @@ public class HandleObstacle extends TaskNode {
Mouse.move(hoverRect); Mouse.move(hoverRect);
} }
if (!Util.sleepUntilMoving(Calculations.random(1200, 1800))) {
return Calculations.random( 180, 350);
}
Util.sleepUntilMovingAndAnimating(Calculations.random(6000, 7000)); Util.sleepUntilMovingAndAnimating(Calculations.random(6000, 7000));
return Calculations.random(180, 350); return Calculations.random(180, 350);