Fixed possible error generated in custom counters

Somehow even though "maxCount" is forced to a number any time it's configured in the UI, a user ended up with maxCount as a string in his saved variables. The mod was then trying to compare a string to a number and failing, causing a cascade of errors.
This commit is contained in:
Parnic
2016-11-06 13:39:20 -06:00
parent d7505b73b1
commit 151e54746f

View File

@ -112,7 +112,7 @@ function IceStackCounter_GetMaxCount(frame)
local _, max = GetSpellCharges(frame.moduleSettings.auraName)
return max or 1
else
return frame.moduleSettings.maxCount
return tonumber(frame.moduleSettings.maxCount)
end
end