Issue Details (XML | Word | Printable)

Key: ADV-436
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Bryan (brykrys)
Reporter: Bryan (brykrys)
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Auctioneer

Create a shared "Price Model" selector function for use in selectbox controls

Created: 08/May/09 06:48 AM   Updated: 18/Aug/09 12:10 AM
Component/s: Utils
Affects Version/s: None
Fix Version/s: None


 Description  « Hide
Create a selector function in CoreUtil.lua which returns a static table of price models.

Currently Auc-Util-PriceLevel and the Resale Searcher (and possibly other places) have functions which generate identical tables. It is a frequent request to add pricing models to other searchers, and it seems a waste to create even more identical tables.

Clip of exisiting code from PriceLevel.lua

function private.GetPriceModels()
	if not private.scanValueNames then private.scanValueNames = {} end
	for i = 1, #private.scanValueNames do
		private.scanValueNames[i] = nil
	end

	table.insert(private.scanValueNames,{"market", "Market value"})
	local algoList = AucAdvanced.API.GetAlgorithms()
	for pos, name in ipairs(algoList) do
		table.insert(private.scanValueNames,{name, "Stats: "..name})
	end
	return private.scanValueNames
end


 All   Comments   Change History   Transitions   FishEye   Crucible      Sort Order: Ascending order - Click to sort in descending order
Bryan (brykrys) added a comment - 08/May/09 07:20 AM
Will not be directly useable by Searchers Disenchant/EnchantMats/Milling/Prospecting as those will require an additional "Enchantrix" price option. However they could replicate the table and insert an extra option.

ItemSuggest could do with a PriceModel setting.


Bryan (brykrys) added a comment - 09/May/09 07:49 AM
Found a couple of pre-exisiting localization strings which are used in the same contexts. Will reuse them, as no point in creating duplicates and making people localize them again...

Undercut has a localization for "Market value": UCUT_Interface_MarketValue (this can also be used by Appraiser, which doesn't have this localized for some reason)

Appraiser has a localization for the "Stats:" string: APPR_Interface_Stats


Bryan (brykrys) added a comment - 09/May/09 07:53 AM
Update: r4207

Bryan (brykrys) added a comment - 21/May/09 05:37 AM
Resolved r4247
Added some Usage comments, as people asked about it.
Really needs some wiki documentation though.

dinesh added a comment - 18/Aug/09 12:10 AM
code review only