Browse Source

BigInt update

Pinkie Pie 8 years ago
parent
commit
794ec0ebd7
1 changed files with 6 additions and 6 deletions
  1. 6 6
      index.js

+ 6 - 6
index.js

@@ -1,6 +1,6 @@
 const Command = require('command'),
 const Command = require('command'),
 	config = require('./config.json'),
 	config = require('./config.json'),
-	blacklist = config.blacklist.concat(config.motes),
+	blacklist = config.blacklist.concat(config.motes, config.strongboxes),
 	trash = config.trash.concat(config.crystals, config.strongboxes)
 	trash = config.trash.concat(config.crystals, config.strongboxes)
 
 
 module.exports = function Loot(dispatch) {
 module.exports = function Loot(dispatch) {
@@ -10,7 +10,7 @@ module.exports = function Loot(dispatch) {
 		autotrash = config.modes.trash || false,
 		autotrash = config.modes.trash || false,
 		enabled = config.modes.easy || true
 		enabled = config.modes.easy || true
 
 
-	let gameId = null,
+	let gameId = -1n,
 		playerId = -1,
 		playerId = -1,
 		myLoc = null,
 		myLoc = null,
 		mounted = false,
 		mounted = false,
@@ -55,7 +55,7 @@ module.exports = function Loot(dispatch) {
 		}
 		}
 	}
 	}
 
 
-	dispatch.hook('S_LOGIN', 9, event => { ({gameId, playerId} = event) })
+	dispatch.hook('S_LOGIN', 10, event => { ({gameId, playerId} = event) })
 
 
 	command.add('loot', c => {
 	command.add('loot', c => {
 		if(c)
 		if(c)
@@ -70,11 +70,11 @@ module.exports = function Loot(dispatch) {
 		loot.clear()
 		loot.clear()
 	})
 	})
 
 
-	dispatch.hook('C_PLAYER_LOCATION', 3, event => { myLoc = event.loc })
+	dispatch.hook('C_PLAYER_LOCATION', 5, event => { myLoc = event.loc })
 	dispatch.hook('S_RETURN_TO_LOBBY', 'raw', () => { loot.clear() })
 	dispatch.hook('S_RETURN_TO_LOBBY', 'raw', () => { loot.clear() })
 
 
-	dispatch.hook('S_MOUNT_VEHICLE', 2, event => { if(event.gameId.equals(gameId)) mounted = true })
-	dispatch.hook('S_UNMOUNT_VEHICLE', 2, event => { if(event.gameId.equals(gameId)) mounted = false })
+	dispatch.hook('S_MOUNT_VEHICLE', 2, event => { if(event.gameId === gameId) mounted = true })
+	dispatch.hook('S_UNMOUNT_VEHICLE', 2, event => { if(event.gameId === gameId) mounted = false })
 
 
 	dispatch.hook('S_SPAWN_DROPITEM', 6, event => {
 	dispatch.hook('S_SPAWN_DROPITEM', 6, event => {
 		if(event.owners.some(owner => owner.playerId === playerId) && !blacklist.includes(event.item)) {
 		if(event.owners.some(owner => owner.playerId === playerId) && !blacklist.includes(event.item)) {