From 2d463dc118b0d73605906ae0c2e4419bf39e8571 Mon Sep 17 00:00:00 2001 From: Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> Date: Tue, 4 Oct 2022 21:23:48 +0800 Subject: + fix game freeze on first dungeon of the day + (potential) fix memory leak when doing lots of /ct reload + add seperate setting for powder info on hud to rest of powder features --- src/features/betterGuis/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/features/betterGuis') diff --git a/src/features/betterGuis/index.js b/src/features/betterGuis/index.js index dcd8fb9..d125a2f 100644 --- a/src/features/betterGuis/index.js +++ b/src/features/betterGuis/index.js @@ -297,15 +297,15 @@ class BetterGuis extends Feature { return; } if (this.lastWindowId === 0) { - this.lastWindowId = Player.getContainer().getWindowId(); + this.lastWindowId = Player.getContainer()?.getWindowId(); return; } - if (Player.getContainer().getWindowId() === this.lastWindowId) { + if (Player.getContainer()?.getWindowId() === this.lastWindowId) { this.shouldHold-- return; } - this.lastWindowId = Player.getContainer().getWindowId(); + this.lastWindowId = Player.getContainer()?.getWindowId(); this.shouldHold += 10; if (Date.now() - this.clickSlotTime > 1000) { this.clickSlot = -1; -- cgit