From e5fcae9f566a40437e85251cb65e39b2c5469a91 Mon Sep 17 00:00:00 2001 From: ResurrectedTrader Date: Tue, 12 May 2026 23:07:58 +0100 Subject: [PATCH] Implement handle updates in D2Bot initialization Added event listener to handle updates for D2Bot. --- d2bs/kolbot/libs/oog/D2Bot.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/d2bs/kolbot/libs/oog/D2Bot.js b/d2bs/kolbot/libs/oog/D2Bot.js index 7413be83..4104d35f 100644 --- a/d2bs/kolbot/libs/oog/D2Bot.js +++ b/d2bs/kolbot/libs/oog/D2Bot.js @@ -25,6 +25,13 @@ includeIfNotIncluded("oog/DataFile.js"); _entry: "", init: function () { + // Pick up handle updates, in case the instance is taken over by a new manager. + addEventListener("copydata", function (mode, msg) { + if (msg === "Handle" && typeof mode === "number") { + D2Bot.handle = mode; + } + }); + let handle = DataFile.getStats().handle; if (handle) {