From 0c41f69cd3ae2b224e9ff65f34496170ca64f28b Mon Sep 17 00:00:00 2001 From: Meow <30401521+me0wg4ming@users.noreply.github.com> Date: Sat, 10 Jan 2026 11:23:42 +0100 Subject: [PATCH] fixed str.match - Changed string.match intop string.find (string.match not exists in lua 5.0) --- libs/libdebuff.lua | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/libs/libdebuff.lua b/libs/libdebuff.lua index 23765592..460a009c 100644 --- a/libs/libdebuff.lua +++ b/libs/libdebuff.lua @@ -330,7 +330,11 @@ end) hooksecurefunc("CastSpell", function(id, bookType) local rawEffect, rank = libspell.GetSpellInfo(id, bookType) local duration = libdebuff:GetDuration(rawEffect, rank) - local rankNum = rank and tonumber(string.match(rank, "(%d+)")) or 0 + local rankNum = 0 + if rank then + local _, _, num = string.find(rank, "(%d+)") + rankNum = num and tonumber(num) or 0 + end -- Speichere rank für später (bleibt 2 Sekunden) if rawEffect and rankNum > 0 then @@ -343,7 +347,11 @@ end) hooksecurefunc("CastSpellByName", function(effect, target) local rawEffect, rank = libspell.GetSpellInfo(effect) local duration = libdebuff:GetDuration(rawEffect, rank) - local rankNum = rank and tonumber(string.match(rank, "(%d+)")) or 0 + local rankNum = 0 + if rank then + local _, _, num = string.find(rank, "(%d+)") + rankNum = num and tonumber(num) or 0 + end -- Speichere rank für später (bleibt 2 Sekunden) if rawEffect and rankNum > 0 then @@ -358,7 +366,11 @@ hooksecurefunc("UseAction", function(slot, target, button) scanner:SetAction(slot) local rawEffect, rank = scanner:Line(1) local duration = libdebuff:GetDuration(rawEffect, rank) - local rankNum = rank and tonumber(string.match(rank, "(%d+)")) or 0 + local rankNum = 0 + if rank then + local _, _, num = string.find(rank, "(%d+)") + rankNum = num and tonumber(num) or 0 + end -- Speichere rank für später (bleibt 2 Sekunden) if rawEffect and rankNum > 0 then