From 12a67465f03071c7ad716f5b50120f45132ca5b9 Mon Sep 17 00:00:00 2001 From: Iacopo Olivo Date: Tue, 16 Jun 2020 10:38:05 -0700 Subject: [PATCH] Fix the shimmers clicking method as html clicking leads to errors in case of cookie storm --- CookieButler.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CookieButler.js b/CookieButler.js index f4a9aa3..35e828e 100644 --- a/CookieButler.js +++ b/CookieButler.js @@ -265,6 +265,19 @@ class ShimmersManager extends RepeatingManager { } PopAllShimmers() { + window.Game.shimmers.forEach((shimmer) => this.PopShimmer(shimmer)); + } + + PopShimmer(shimmer) { + this.CBLogger.Update( + this.Status.Name + "::PopShimmer", + "Wrath: " + shimmer.wrath, + shimmer + ); + shimmer.pop(); + } + + PopAllShimmersByClicking() { // Click all the golden cookies and reindeers let elements = CBDOMUtilities.GetDOMElements("shimmer"); let len = elements.length;