Skip to content

Commit

Permalink
libspell: pass 2nd argument to scanner find to disable exact matching
Browse files Browse the repository at this point in the history
  • Loading branch information
dsidirop authored Jun 3, 2024
1 parent a45c9f3 commit 2b58818
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions libs/libspell.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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, "(.+)-(.+)")
Expand Down

0 comments on commit 2b58818

Please sign in to comment.