aboutsummaryrefslogtreecommitdiff
path: root/features/slayers/index.js
diff options
context:
space:
mode:
authorEmeraldMerchant <96396730+EmeraldMerchant@users.noreply.github.com>2022-06-25 14:51:14 +0800
committerGitHub <noreply@github.com>2022-06-25 14:51:14 +0800
commite9f6cc426ad7d5ac9d07879c2d58ee3538acd4b4 (patch)
tree90eb9697a3463639c61cf51cd65559431a8de35b /features/slayers/index.js
parent30e0e951950bf7001fb3586e6471bc4948566904 (diff)
downloadSoopyV2-e9f6cc426ad7d5ac9d07879c2d58ee3538acd4b4.tar.gz
SoopyV2-e9f6cc426ad7d5ac9d07879c2d58ee3538acd4b4.tar.bz2
SoopyV2-e9f6cc426ad7d5ac9d07879c2d58ee3538acd4b4.zip
Reduce lag
moved some functions to 3fps step to reduce lag
Diffstat (limited to 'features/slayers/index.js')
-rw-r--r--features/slayers/index.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/features/slayers/index.js b/features/slayers/index.js
index 910d0ef..9388bc1 100644
--- a/features/slayers/index.js
+++ b/features/slayers/index.js
@@ -116,10 +116,10 @@ class Slayers extends Feature {
ChatLib.chat("&r &r&a&lSLAYER QUEST COMPLETE!&a&r");
ChatLib.chat("&r &r&aYou have &d" + numberWithCommas(this.slayerExp[this.lastSlayerType]) + " " + this.lastSlayerType + " XP&r&7!&r");
ChatLib.chat("&r &r&aYou have &d" + numberWithCommas(Object.values(this.slayerExp).reduce((a, t) => t + a, 0)) + " total XP&r&7!&r");
- if (this.bossSpawnKillTime.getValue() && Date.now() - this.lastBossSlain < 60000 * 5) {
+ if (this.bossSpawnKillTime.getValue() && Date.now() - this.lastBossSlain < 60000 * 10) {
ChatLib.chat(`&r &r&aBoss took &d${timeNumber(Date.now() - this.lastBossSlain)} &ato spawn and kill&r&7!`);
}
- if (this.bossKillTime.getValue() && Date.now() - this.lastBossSpawned < 60000 * 4) {
+ if (this.bossKillTime.getValue() && Date.now() - this.lastBossSpawned < 60000 * 4.6) {
ChatLib.chat(`&r &r&aBoss took &d${timeNumber(Date.now() - this.lastBossSpawned)} &ato kill&r&7!`);
}
}
@@ -200,7 +200,7 @@ class Slayers extends Feature {
this.registerEvent("tick", this.tick);
this.registerEvent("renderWorld", this.renderWorld);
this.registerEvent("worldLoad", this.worldLoad);
- this.registerStep(true, 2, this.step);
+ this.registerStep(true, 3, this.step);
}
slayerLocationData(loc, user) {
@@ -296,7 +296,7 @@ class Slayers extends Feature {
this.todoE2.push(event.entity);
}
- tick() {
+ step() {
if (this.hideSummonsForLoot.getValue() && this.hideSummons) {
this.renderEntityEvent.register();
} else if (this.hideSummonsForLoot.getValue()) {
@@ -320,8 +320,9 @@ class Slayers extends Feature {
}
});
}
+ }
-
+ tick() {
if (this.FeatureManager.features["dataLoader"].class.isInSkyblock) {
if (!this.entityAttackEventLoaded) {
this.entityAttackEventLoaded = true;