From c44116eee5e97c540bc0db8f2652df74e66715e4 Mon Sep 17 00:00:00 2001 From: tretrauit <3550664-tretrauit@users.noreply.gitlab.com> Date: Sat, 3 Jul 2021 21:24:24 +0000 Subject: [PATCH] Fix card drawing --- Games/Arena_of_Valor/AWC_AutoSpin.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Games/Arena_of_Valor/AWC_AutoSpin.js b/Games/Arena_of_Valor/AWC_AutoSpin.js index aa9d07d..edaf5ea 100644 --- a/Games/Arena_of_Valor/AWC_AutoSpin.js +++ b/Games/Arena_of_Valor/AWC_AutoSpin.js @@ -53,7 +53,15 @@ await fetch("https://code.jquery.com/jquery-3.6.0.min.js").then(x => x.text()).t } // Click the spin button function spin() { - clickFirstButtonByClassName("wheel__main--note") + if (document.getElementsByClassName("popup-draw__card").length > 0) { + let teams = document.getElementsByClassName("popup-draw__card") + for (let i = 0; i < 3; i++) { + teams[i].dispatchEvent(new MouseEvent("click")); + } + } + else { + clickFirstButtonByClassName("wheel__main--note") + } } // Close the dialog function closeSwal2() {