color refactoring

This commit is contained in:
Manuel Simon Hirsig
2016-08-09 07:16:06 +02:00
parent d4bdd3b1d0
commit 03a4970301
5 changed files with 45 additions and 36 deletions
+1 -1
View File
@@ -77,7 +77,7 @@ function public.from_string(value)
end
-- remove any colors
value = gsub(gsub(strlower(value), '|c%x%x%x%x%x%x%x%x', ''), '|r', '')
value = gsub(gsub(strlower(value), '|c%x%x%x%x%x%x%x%x', ''), FONT_COLOR_CODE_CLOSE, '')
-- extract gold/silver/copper values
local gold = tonumber(({strfind(value, '(%d*%.?%d+)g')})[3])