fixed the total price display bug (well, more missing feature than bug), improved the appearance of the buy tab a lot

This commit is contained in:
Manuel Simon Hirsig
2015-09-09 04:27:02 +02:00
parent 41e0eefe47
commit a31cc69abe
5 changed files with 101 additions and 280 deletions
-45
View File
@@ -29,51 +29,6 @@ end
-----------------------------------------
function Auctionator_PriceToString(val)
local gold, silver, copper = val2gsc(val)
local st = ""
if gold ~= 0 then
st = gold.."g "
end
if st ~= "" then
st = st..format("%02is ", silver)
elseif silver ~= 0 then
st = st..silver.."s "
end
if st ~= "" then
st = st..format("%02ic", copper)
elseif copper ~= 0 then
st = st..copper.."c"
end
return st
end
-----------------------------------------
function val2gsc(v)
local rv = Auctionator_Round(v)
local g = math.floor(rv/10000)
rv = rv - g * 10000
local s = math.floor(rv/100)
rv = rv - s * 100
local c = rv
return g, s, c
end
-----------------------------------------
function Auctionator_AddToSet(set, key)
set[key] = true
end