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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user