Issue Details (XML | Word | Printable)

Key: ASAL-20
Type: Improvement Improvement
Status: Resolved Resolved
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.
Auc-Stat-Sales

Modify StatSales to use serverKey correctly

Created: 06/Feb/09 04:46 PM   Updated: 21/Nov/09 07:52 AM
Component/s: None
Affects Version/s: None
Fix Version/s: None

Issue Links:
Blocks
 
Reference
 


 Description  « Hide
Reference: ADV-124

In the lib.GetPrice function (line 117), serverKey will actually be received in the 'faction' parameter.
At line 123 'faction' is overwritten with the faction of the player. This is then cached for all future calls.
Also 'realm' info is not considered at all.
The end result is that all queries return info for current realm/home faction, regardless of serverKey. In Arbitrage queries this is incorrect (hence the bug/critical status of this issue)

GetItemPDF & GetPriceArray both work by calling GetPrice, and will therefore return incorrect data too.

Note:
StatSales retrieves data from BeanCounter.
BeanCounter API is currently only able to provide data for the current server. Until the BeanCounter API can be updated, StatSales should be modifed to return no data if the serverKey is for another server
BeanCounter API only allows retrieval of data for alliance or horde or all data on the current server (i.e. no neutral option). It appears that sales at neutral auctionhouses are not recorded separately.



 All   Comments   Change History   Transitions   FishEye   Crucible      Sort Order: Ascending order - Click to sort in descending order
Bryan (brykrys) added a comment - 08/Feb/09 10:41 AM
As BeanCounter cannot handle realms other than the current one, my suggestion for extracting faction from serverKey is:
local faction = strmatch ( serverKey , GetRealmName () .. "%-(%u%l+)" )
if faction then
	faction = faction:lower()
else
	return
end

Bryan (brykrys) added a comment - 17/Mar/09 05:37 AM
r4112: Modified StatSales to bail out on requests for cross-server info. This is a temporary workaround until BeanCounter can be updated.

Bryan (brykrys) added a comment - 19/Mar/09 07:16 AM
With the 4112 temp fix in place StatSales should no longer return incorrect info, but it is not yet fully compliant with serverKey.
I'm downgrading this issue to wait until BeanCounter is ready. Also changing the title of the issue.
Original title was: "StatSales API ignores serverKey; it returns incorrect data in Arbitrage queries"

Bryan (brykrys) added a comment - 30/Apr/09 08:41 AM
r4188: uses Beancounter's "servers" settings to access cross-server prices.
Still unable to handle "Neutral AH" prices.
Slightly rushed due to patching another bug in StatSales, so not much testing done yet. I'll leave "In Progress" for a few days.

r4189: removes pollution. (I said I was rushed!)


Bryan (brykrys) added a comment - 19/Nov/09 10:59 AM
r4530
Extends faction2selectbox lookup to include a "Neutral" key; selectbox will be as specified in BCNT-239
Completes this issue

Bryan (brykrys) added a comment - 21/Nov/09 07:52 AM
Marking resolved. Reopen if there are any problems.