From c331a5e24895dbc276207a46e5b2ff7bb91dd5f6 Mon Sep 17 00:00:00 2001 From: shagu Date: Thu, 19 Nov 2020 15:33:52 +0100 Subject: [PATCH] libcast: assign tooltip scanner only once on use --- libs/libcast.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/libcast.lua b/libs/libcast.lua index bc51a88e..fae2e270 100644 --- a/libs/libcast.lua +++ b/libs/libcast.lua @@ -414,12 +414,12 @@ end, true) hooksecurefunc("UseAction", function(slot, target, button) scanner:SetAction(slot) - _, lastrank = scanner:Line(1) + local spellName, rank = scanner:Line(1) + lastcasttex = GetActionTexture(slot) + lastrank = rank if GetActionText(slot) or not IsCurrentAction(slot) then return end - scanner:SetAction(slot) - local spellName = scanner:Line(1) CastCustom(spellName) end, true)