From 96ae4aadf8c28a9b011d8e798f4f2f92e179c1fd Mon Sep 17 00:00:00 2001 From: shagu Date: Wed, 30 May 2018 21:00:51 +0200 Subject: [PATCH] spell: fix casttime nil calculation --- api/spell.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/spell.lua b/api/spell.lua index 5b714522..41ec7dfc 100644 --- a/api/spell.lua +++ b/api/spell.lua @@ -109,7 +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", "%(.+%)")) - castingTime = tonumber((sec or min or 0)) * 1000 + castingTime = (tonumber(sec) or tonumber(min) or 0) * 1000 if range then local _, _, min, max = string.find(range, "(.+)-(.+)")