EC: missing commas in buy confirm dialog
This thread talks about missing commas in the purchase confirm dialog for player operated vendors.
The below change to GumpsParsing.lua, GumpsParsing.ShowHide
will add comma separator to amounts in the vendor buy gump.
Insert new block of code under the italics+bold line.
for gumpID, value in pairs(GumpData.Gumps) do
if( gumpID == 999008 ) then -- GUMP_AGREED_TO_PURCHASE_CONFIRM
local lastlabel = 0
local lasttext = nil
-- the last label with text is the amount label. (optional) prior text label can have description
for label, data in pairs(GumpData.Gumps[999008].Labels) do
-- data.tid 1019071 for the amount of: 1019072 an item without a description
if (data.text and data.text[2] ~= nil) then
lastlabel = label
lasttext = data.text[2]
end
end
-- for valid numbers, update the amount to include commas
if ((lastlabel ~= 0) and (lasttext ~= nil) and (tonumber(lasttext) > 999)) then
local labelGumpName = "GenericGumpItem"..tostring(lastlabel)
LabelSetText(labelGumpName, WindowUtils.AddCommasToNumber(lasttext))
end
end
Moderator, feel free to move to the bugs
subforum -- BUT I've read the "General Discussions" may get more
reading attention from the developer(s), however (reference: link)?
Comments