mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-26 09:26:02 +00:00
api: fix bad if-condition and tonumber usage
This commit is contained in:
+1
-3
@@ -109,9 +109,7 @@ function pfUI.api.GetSpellInfo(index, bookType)
|
||||
local _, _, min = string.find(text:GetText(), gsub(SPELL_CAST_TIME_MIN, "%%.3g", "%(.+%)"))
|
||||
local _, _, range = string.find(text:GetText(), gsub(SPELL_RANGE, "%%s", "%(.+%)"))
|
||||
|
||||
if sec or min then
|
||||
castingTime = sec and tonumber(sec) * 1000 or tonumber(min) * 1000
|
||||
end
|
||||
castingTime = tonumber((sec or min or 0)) * 1000
|
||||
|
||||
if range then
|
||||
local _, _, min, max = string.find(range, "(.+)-(.+)")
|
||||
|
||||
Reference in New Issue
Block a user