Browse Source

fix boxdelay

Owyn 8 years ago
parent
commit
8a0f26aa2a
1 changed files with 2 additions and 10 deletions
  1. 2 10
      index.js

+ 2 - 10
index.js

@@ -107,13 +107,9 @@ module.exports = function boxOpener(dispatch){
 			{
 				isLooting = true;
 				statOpened++;
-				if(timer)
-				{
-					clearTimeout(timer);
-				}
 				if(!useDelay)
 				{
-					timer = null;
+					clearTimeout(timer);
 					openBox();
 				}
 			}
@@ -121,13 +117,9 @@ module.exports = function boxOpener(dispatch){
 		
 		hook('S_GACHA_END', 1, event => {
 				statOpened++;
-				if(timer)
-				{
-					clearTimeout(timer);
-				}
 				if(!useDelay)
 				{
-					timer = null;
+					clearTimeout(timer);
 					openBox();
 				}
 		});