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)?
buy.bmp 365.7K

Comments

  • GrimbeardGrimbeard Posts: 2,029
    Why couldn't we get stuff like this added directly to the EC  ? Maybe a monthly patch where the developers add it in??
  • ForeverFunForeverFun Posts: 802
    Sadly, it does not appear the gump data for vendor search includes the unique objectIDs of the items returned in the search results.

    If it did, it would be relatively straightforward to add a "buy item" direct, which would prevent having to hunt for the item in question.  It's common to have vendor bags full of jewels, or powerscrolls, and hunting for the right match is a time waster.

    The EC function GenericGumpGetItemPropertiesId() could have been a way to get at the objectID, though that appears to be futile.

    This reply alludes to that.  Of course, the UO team could add a (new) server side context option to the vendor map to allow the item to be purchased directly.

Sign In or Register to comment.