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

Update for P105.

• sUserLocation to v6.
Risenio лет назад: 5
Родитель
Сommit
fc74c144c9
2 измененных файлов с 5 добавлено и 4 удалено
  1. 4 3
      lib/index.js
  2. 1 1
      manifest.json

+ 4 - 3
lib/index.js

@@ -16,7 +16,8 @@ const GameJobs = ["warrior", "lancer", "slayer", "berserker", "sorcerer", "arche
 
 module.exports = function FpsUtils(mod) {
 
-	const NotCP = typeof mod.compileProto !== 'undefined';
+	const NotCP = typeof mod.compileProto !== 'undefined',
+		sUserLocationVer = mod.majorPatchVersion < 105 ? 5 : 6
 
 	// ~~~ * Variables * ~~~ \\
 
@@ -662,7 +663,7 @@ module.exports = function FpsUtils(mod) {
 	}
 
 	function UpdateUserLoc(event) {
-		mod.toClient('S_USER_LOCATION', 5, { gameId: event.gameId, loc: event.loc, w: event.w, speed: 300, dest: event.loc, type: 7 });
+		mod.toClient('S_USER_LOCATION', sUserLocationVer, { gameId: event.gameId, loc: event.loc, w: event.w, speed: 300, dest: event.loc, type: 7 });
 	}
 
 	// ~~~ * Hook Functions * ~~~ \\
@@ -1124,7 +1125,7 @@ module.exports = function FpsUtils(mod) {
 	mod.hook('S_SPAWN_USER', 16, Last_Hook, sSpawnUser)
 	mod.hook('S_SPAWN_USER', 16, Last_Hookfn, sSpawnUserfn)
 	mod.hook('S_DESPAWN_USER', 3, sDespawnUser)
-	mod.hook('S_USER_LOCATION', 5, Last_Hook, sUserLocation)
+	mod.hook('S_USER_LOCATION', sUserLocationVer, Last_Hook, sUserLocation)
 	mod.hook('S_USER_STATUS', 3, Last_Hook, sUserStatus)
 	mod.hook('S_DEAD_LOCATION', 2, sDeadLocation)
 	mod.hook('S_USER_MOVETYPE', 1, Last_Hook, sUserMovetype)

+ 1 - 1
manifest.json

@@ -3,7 +3,7 @@
         "README.md": "8c89fbefc91e4e75ee5981cf2f59834ae9f231c5179e150aaa0c2bedeaf79e37",
         "lib/data/npcData.json": "57c6e0ca4d6e996eb295868cf964c61322182c8df68c9787528a20c617bf356a",
         "lib/data/skillString.json": "90f7cf9e29f0c143ffe4650bebe85c097371507a23c9fd2a0ab6c877d5451e58",
-        "lib/index.js": "915461dfac1ef1438f403f8e230415e9c5e115bbe659449ce9b2382e7ba5cc97",
+        "lib/index.js": "1cd62cf1d0bdcff37b39bd12ca0240506cdcde8362cb63362caef26261be1df0",
         "lib/setting_migration.js": "1821fbb5ed37672bd9a8daa54f8ab392e35aa6c38b1602c560865b3bf6a7c6a2",
         "module.json": "11fae284a4b493d9e4c9b14e86710cf63449c582dfa4142c91e387b12ff63d1b",
         "package.json": "cfce7f8421833b9d63eef6f93ca3efb48ec5f4c8dc82345c77708e596ff9aa1c"