libspell: pass 2nd argument to scanner find to disable exact matching

This commit is contained in:
Kyriakos (Dominick) Sidiropoulos
2024-06-03 09:36:51 +02:00
committed by GitHub
parent a45c9f3dbe
commit 2b58818f0e
+4 -3
View File
@@ -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, "(.+)-(.+)")