Browse Source

v85.7 fix

KAC311 7 years ago
parent
commit
409790047a
3 changed files with 7 additions and 7 deletions
  1. 1 1
      config.js
  2. 3 3
      index.js
  3. 3 3
      manifest.json

+ 1 - 1
config.js

@@ -44,7 +44,7 @@ module.exports = {
 		88835, // Ring Amplifier II     
 		
 		88837, // Accessory Amplifier Coin
-      
+		
 		//98653, // Supreme Metal
 		//98654, // Springy Draco Limb
 		//98655, // Weight Pendulum

+ 3 - 3
index.js

@@ -34,8 +34,8 @@ module.exports = function AutoLootOld(mod) {
     mod.hook('C_TRY_LOOT_DROPITEM', 4, () => { if(enable && !lootTimeout) lootTimeout = setTimeout(tryLoot, interval); });
     mod.hook('S_DESPAWN_DROPITEM', 4, (e) => { items.delete(e.gameId); });
 
-    mod.hook('S_SPAWN_DROPITEM', 7, (e) => {
-        if(!(config.blacklist.includes(e.item)) && (e.item < 8000 || e.item > 8025) && e.owners.some(owner => owner.playerId === mod.game.me.playerId)){
+    mod.hook('S_SPAWN_DROPITEM', 8, (e) => {
+        if(!(config.blacklist.includes(e.item)) && (e.item < 8000 || e.item > 8025) && e.owners.some(owner => owner === mod.game.me.playerId)){
 			items.set(e.gameId, Object.assign(e, {priority: 0}));
 			if(enableAuto && !lootTimeout) tryLoot();
         }
@@ -47,7 +47,7 @@ module.exports = function AutoLootOld(mod) {
 		if(!items.size || mod.game.me.mounted) return;
 		for(let item of [...items.values()].sort((a, b) => a.priority - b.priority)){
 			if(location.dist3D(item.loc) <= radius){
-				mod.toServer('C_TRY_LOOT_DROPITEM', 4, item);
+				mod.send('C_TRY_LOOT_DROPITEM', 4, { gameId: item.gameId });
 				lootTimeout = setTimeout(tryLoot, Math.min(interval * ++item.priority, throttleMax));
 				return;
 			}

+ 3 - 3
manifest.json

@@ -2,9 +2,9 @@
 	"files": {
 		"config.js": {
 			"overwrite": false,
-			"hash": "6c1cc48538953dd579f592ebd338ab0312b026c1f9438e4cfbed64b652d9e54e"
+			"hash": "7ad19b8a78f5292059f2d31a9974029d3c71d73ab14d99b75701afbe88345d7b"
 		},
-		"index.js": "2e98aaa53b1a6d7335fdd571ac094053de218518ffe75fc0974b2b0ddf5a24af",
+		"index.js": "5658ea3236904b0b23a7339007b6032f5c67521ca14a5196a6a3c0e62605e8e5",
 		"module.json": "4ed019900213d703cb30ad1bb47f14244abe9dadfc618869ce2c8763d59f3188"
 	},
 	"defs": {
@@ -12,7 +12,7 @@
 		"C_TRY_LOOT_DROPITEM": 4,
 		"S_DESPAWN_DROPITEM": 4,
 		"S_RETURN_TO_LOBBY": 1,
-		"S_SPAWN_DROPITEM": 7,
+		"S_SPAWN_DROPITEM": 8,
 		"S_SYSTEM_MESSAGE": 1
 	}
 }