Browse Source

Fixed a bug where reapplication intervals were not cleared on disconnect

TeraProxy 8 years ago
parent
commit
eb939ad465
3 changed files with 15 additions and 4 deletions
  1. 2 0
      README.md
  2. 11 1
      index.js
  3. 2 3
      manifest.json

+ 2 - 0
README.md

@@ -31,6 +31,8 @@ Contains code from true-everful-nostrum by Pinkie Pie https://github.com/pinkipi
 ## Changelog
 ## Changelog
 <details>
 <details>
 
 
+### 1.3.8
+* [*] Fixed a bug where reapplication intervals were not cleared on disconnect
 ### 1.3.7
 ### 1.3.7
 * [*] Fixed non-elite Nostrum not properly applying (thx aurelius88)
 * [*] Fixed non-elite Nostrum not properly applying (thx aurelius88)
 * [~] Code changes due to Caali's recent tera-proxy updates
 * [~] Code changes due to Caali's recent tera-proxy updates

+ 11 - 1
index.js

@@ -1,4 +1,4 @@
-// Version 1.3.7
+// Version 1.3.8
 // Based on true-everful-nostrum by Pinkie Pie https://github.com/pinkipi
 // Based on true-everful-nostrum by Pinkie Pie https://github.com/pinkipi
 
 
 'use strict'
 'use strict'
@@ -40,6 +40,16 @@ module.exports = function Essentials(mod) {
 			setTimeout(ccb, randomNumber(RANDOM_SHORT)) // check if you have a CCB shortly after moving for the first time
 			setTimeout(ccb, randomNumber(RANDOM_SHORT)) // check if you have a CCB shortly after moving for the first time
 		})
 		})
 	})
 	})
+	mod.game.on('leave_game', () => {
+		if (timeoutNostrum) {
+			clearInterval(timeoutNostrum)
+			timeoutNostrum = null
+		}
+		if (timeoutCCB) {
+			clearInterval(timeoutCCB)
+			timeoutCCB = null
+		}
+	})
 
 
 	mod.game.on('leave_loading_screen', () => {
 	mod.game.on('leave_loading_screen', () => {
 		mod.hookOnce('C_PLAYER_LOCATION', 'raw', () => { nostrum() })
 		mod.hookOnce('C_PLAYER_LOCATION', 'raw', () => { nostrum() })

+ 2 - 3
manifest.json

@@ -1,10 +1,9 @@
 {
 {
-	"force_clean": true,
 	"files": {
 	"files": {
 		"LICENSE": "589ed823e9a84c56feb95ac58e7cf384626b9cbf4fda2a907bc36e103de1bad2",
 		"LICENSE": "589ed823e9a84c56feb95ac58e7cf384626b9cbf4fda2a907bc36e103de1bad2",
-		"README.md": "dee0e93c688f4b4642043a61fb12e55b5c5684616b8405dd2f03867a1985b8cc",
+		"README.md": "1ad6a2dec417d7c6ee661957b3840879feab7d35c1de74f8e02882453c553657",
 		"config.json": "f2f129d4bbb4b84f0a85ac5e23720f703e972ffb6a1219112b5dd87f7e9db5ac",
 		"config.json": "f2f129d4bbb4b84f0a85ac5e23720f703e972ffb6a1219112b5dd87f7e9db5ac",
-		"index.js": "9f49f83b3068ed423d1d4f9521578edf7757102fe592e484feb8cd32c73bcf1b",
+		"index.js": "a52864a0c894403bc677107c2818a2eea0a1b042a77d5894631fcbec142a1a26",
 		"module.json": "b44bf1fe879aa4c689f1989756c887ba5e20dafffe3b71f787656d5e3bcd2cbc",
 		"module.json": "b44bf1fe879aa4c689f1989756c887ba5e20dafffe3b71f787656d5e3bcd2cbc",
 		"settings_migrator.js": "4a96d898023ad7a73f4fe027ef810cae042d3fe867a24a2a3b7413f1aa923d03"
 		"settings_migrator.js": "4a96d898023ad7a73f4fe027ef810cae042d3fe867a24a2a3b7413f1aa923d03"
 	},
 	},