From 8be8a31113f83a61235baba4987bdad6bde63f1a Mon Sep 17 00:00:00 2001 From: Dusk-92 Date: Wed, 2 Sep 2026 22:19:08 +0200 Subject: [PATCH] Defer prediction tooltip scanner until enabled --- libs/libpredict.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/libpredict.lua b/libs/libpredict.lua index 4d4e278..3d9e5ba 100644 --- a/libs/libpredict.lua +++ b/libs/libpredict.lua @@ -311,7 +311,7 @@ end -- Gather Data by User Actions. Hooks are installed lazily by libpredict:Enable() -- so disabling healing predictions leaves no spell hook on the hot path. -local scanner = libtipscan:GetScanner("prediction") +local scanner local hooksInstalled local function TrackCastSpell(id, bookType) @@ -345,6 +345,7 @@ end local function InstallSenderHooks() if hooksInstalled then return end + scanner = scanner or libtipscan:GetScanner("prediction") hooksecurefunc("CastSpell", TrackCastSpell) hooksecurefunc("CastSpellByName", TrackCastSpellByName) hooksecurefunc("UseAction", TrackUseAction)