libcast: assign tooltip scanner only once on use

This commit is contained in:
shagu
2020-11-19 15:33:52 +01:00
parent 747847ea95
commit c331a5e248
+3 -3
View File
@@ -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)