Просмотр исходного кода

2.2.2 Removed compatibility for patches <82

TeraProxy лет назад: 7
Родитель
Сommit
76ef82e7af
4 измененных файлов с 16 добавлено и 37 удалено
  1. 2 0
      README.md
  2. 9 30
      index.js
  3. 4 6
      manifest.json
  4. 1 1
      module.json

+ 2 - 0
README.md

@@ -44,6 +44,8 @@ Based on true-everful-nostrum by Caali https://github.com/caali-hackerman
 ## Changelog
 <details>
 
+### 2.2.2
+* [-] Removed compatibility for patches <82
 ### 2.2.1
 * [*] Fixed for patch 82
 ### 2.2.0

+ 9 - 30
index.js

@@ -32,32 +32,14 @@ module.exports = function Essentials(mod) {
 		start()
 	})
 
-	if(mod.majorPatchVersion >= 82) {
-		mod.hook('S_PREMIUM_SLOT_DATALIST', 2, event => {
-			for(let set of event.sets)
-				for(let entry of set.inventory)
-					if(ITEMS_NOSTRUM.includes(entry.id)) {
-						item = {
-							set: set.id,
-							slot: entry.slot,
-							type: entry.type,
-							id: entry.id
-						}
-						entry.cooldown = 0n // Cooldowns from this packet don't seem to do anything except freeze your client briefly
-						return true
-					}
-		})
-	}
-	else {
-		mod.hook('S_PCBANGINVENTORY_DATALIST', 1, event => {
-			for(let entry of event.inventory)
-				if(ITEMS_NOSTRUM.includes(entry.item)) {
-					item = { slot: entry.slot }
-					entry.cooldown = 0 // Cooldowns from this packet don't seem to do anything except freeze your client briefly
-					return true
-				}
-		})
-	}
+	mod.hook('S_PCBANGINVENTORY_DATALIST', 1, event => {
+		for(let entry of event.inventory)
+			if(ITEMS_NOSTRUM.includes(entry.item)) {
+				item = { slot: entry.slot }
+				entry.cooldown = 0 // Cooldowns from this packet don't seem to do anything except freeze your client briefly
+				return true
+			}
+	})
 
 	mod.hook('S_ABNORMALITY_BEGIN', 3, abnormality.bind(null, 'S_ABNORMALITY_BEGIN'))
 	mod.hook('S_ABNORMALITY_REFRESH', 1, abnormality.bind(null, 'S_ABNORMALITY_REFRESH'))
@@ -102,10 +84,7 @@ module.exports = function Essentials(mod) {
 		if(mod.game.me.zone < 9000 && mod.settings.dungeonOnly) return
 
 		if(enabled) {
-			if(item) {
-				if(mod.majorPatchVersion >= 82) mod.send('C_USE_PREMIUM_SLOT', 1, item)
-				else mod.send('C_PCBANGINVENTORY_USE_SLOT', 1, item)
-			}
+			if(item) mod.send('C_PCBANGINVENTORY_USE_SLOT', 1, item)
 			else useItem(mod.settings.nostrum)
 		}
 	}

+ 4 - 6
manifest.json

@@ -1,23 +1,21 @@
 {
     "files": {
         "LICENSE": "589ed823e9a84c56feb95ac58e7cf384626b9cbf4fda2a907bc36e103de1bad2",
-        "README.md": "7b6e3b5c7edb14e5a100b7d0904bc2e3950e5170e9dc2c3a13ae2bdf7ec132c2",
+        "README.md": "7d26fcaa1601db184cf7f981e4547f2adf8f666cb4f2e44f52318047eb9cbd73",
         "config.json": {
             "overwrite": false,
             "hash": "f37583b51ed6c475cc38f812a13ae52b784f5f319be8560f94cbf0c7f7a80db2"
         },
-        "index.js": "33b2eeb7a3152ebd54130e1566aed50fbae9c8ad1b50a8b9abf072cc96a884fd",
-        "module.json": "ff96042db6fa6829e2e64aca2593d4352693244a8433ada6268683521b9ca80d",
+        "index.js": "669b4781ff3ed51cfbbe0237c4fd090c7055b7e8b9d58c36d2c666461f9acb3b",
+        "module.json": "2b2aafb2a5f30009b0f4d8eb35a7b3229b75979e9bac8b39386d2f7dbf739b96",
         "settings_migrator.js": "0da6c1e6f7d14d980db286eb577e2e181cfcba44d9bc7dc0601db6c0020a2a03"
     },
     "defs": {
         "C_PCBANGINVENTORY_USE_SLOT": 1,
         "C_USE_ITEM": 3,
-        "C_USE_PREMIUM_SLOT": 1,
         "S_ABNORMALITY_BEGIN": 3,
         "S_ABNORMALITY_END": 1,
         "S_ABNORMALITY_REFRESH": 1,
-        "S_PCBANGINVENTORY_DATALIST": 1,
-        "S_PREMIUM_SLOT_DATALIST": 2
+        "S_PCBANGINVENTORY_DATALIST": 1
     }
 }

+ 1 - 1
module.json

@@ -3,7 +3,7 @@
     "name": "Essentials",
     "author": "TeraProxy / Caali / Pinkie Pie",
     "description": "A tera-proxy module that automatically uses Nostrum/Battle Solution and Complete Crystalbind items whenever needed.",
-    "version": "2.2.1",
+    "version": "2.2.2",
     "donationUrl": "https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=A3KBZUCSEQ5RJ",
     "options": {
         "niceName": "Essentials",