Browse Source

why bigint :c

Fukki 8 years ago
parent
commit
46e0d74c46
2 changed files with 3 additions and 3 deletions
  1. 2 2
      index.js
  2. 1 1
      manifest.json

+ 2 - 2
index.js

@@ -100,7 +100,7 @@ module.exports = function AutoPOT(mod) {
     mod.hook('S_PLAYER_STAT_UPDATE', 10, e => {
 		if (config.enabled && config.hp) {
 			//nowHP = Math.round(e.hp / e.maxHp * 100));
-			nowHP = Math.round(parseInt(e.hp) / parseInt(e.maxHp) * 100));
+			nowHP = Math.round(parseInt(e.hp) / parseInt(e.maxHp) * 100);
 			for (let hp = 0; hp < hpPot.length; hp++) {
 				if (!hpPot[hp][1].inCd && ((!isSlaying && nowHP <= hpPot[hp][1].use_at) || (isSlaying && nowHP <= hpPot[hp][1].slaying)) && hpPot[hp][1].amount > 0 && isCombat && isAlive && !isBG) {
 					useItem(hpPot[hp]); hpPot[hp][1].inCd = true; hpPot[hp][1].amount--; setTimeout(function () {hpPot[hp][1].inCd = false;}, hpPot[hp][1].cd * 1000);
@@ -110,7 +110,7 @@ module.exports = function AutoPOT(mod) {
 		}
 		if (config.enabled && config.mp) {
 			//nowMP = Math.round(e.mp / e.maxMp * 100));
-			nowMP = Math.round(parseInt(e.mp) / parseInt(e.maxMp) * 100));
+			nowMP = Math.round(parseInt(e.mp) / parseInt(e.maxMp) * 100);
 			for (let mp = 0; mp < mpPot.length; mp++) {
 				if (!mpPot[mp][1].inCd && nowMP <= mpPot[mp][1].use_at && mpPot[mp][1].amount > 0 && isAlive && !isBG && !isCon && !isMount) {
 					useItem(mpPot[mp]); mpPot[mp][1].inCd = true; mpPot[mp][1].amount--; setTimeout(function () {mpPot[mp][1].inCd = false;}, mpPot[mp][1].cd * 1000);

+ 1 - 1
manifest.json

@@ -1,6 +1,6 @@
 {
 	"files": {
-		"index.js": "8da2d1a955062db386055777186ef202cb2e5c0a6e6a3bd4dd9dc03246204e2d"
+		"index.js": "88bda3a9d7c007aa0c38705f3ff98da66a375f25a77ce9bccaeff9654fee3740"
 	},
 	"defs": {
 		"C_BIND_ITEM_EXECUTE": "raw",