From 2b58818f0e32f6dba699c70313f29b98eb43f4bd Mon Sep 17 00:00:00 2001 From: "Kyriakos (Dominick) Sidiropoulos" Date: Mon, 3 Jun 2024 09:36:51 +0200 Subject: [PATCH] libspell: pass 2nd argument to scanner find to disable exact matching --- libs/libspell.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libs/libspell.lua b/libs/libspell.lua index c6f9a05d..f7fa4a14 100644 --- a/libs/libspell.lua +++ b/libs/libspell.lua @@ -117,9 +117,10 @@ function libspell.GetSpellInfo(index, bookType) if id then scanner:SetSpell(id, bookType) - local _, sec = scanner:Find(gsub(SPELL_CAST_TIME_SEC, "%%.3g", "%(.+%)")) - local _, min = scanner:Find(gsub(SPELL_CAST_TIME_MIN, "%%.3g", "%(.+%)")) - local _, range = scanner:Find(gsub(SPELL_RANGE, "%%s", "%(.+%)")) + local _, sec = scanner:Find(gsub(SPELL_CAST_TIME_SEC, "%%.3g", "%(.+%)"), false) + local _, min = scanner:Find(gsub(SPELL_CAST_TIME_MIN, "%%.3g", "%(.+%)"), false) + local _, range = scanner:Find(gsub(SPELL_RANGE, "%%s", "%(.+%)"), false) + castingTime = (tonumber(sec) or tonumber(min) or 0) * 1000 if range then local _, _, min, max = string.find(range, "(.+)-(.+)")