fixed str.match

- Changed string.match intop string.find (string.match not exists in lua 5.0)
This commit is contained in:
Meow
2026-01-10 11:23:42 +01:00
parent 5438131ae9
commit 0c41f69cd3
+15 -3
View File
@@ -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