View Single Post
10/19/15, 10:01 AM   #6
dopiate
AddOn Author - Click to view addons
Join Date: Jun 2014
Posts: 142
Originally Posted by antihax View Post
I agree a better solution is to have a unique Id, but we do not. I'm going to see how well rounding to 10 works. Not to worried about losing 10 seconds. What other options are available cross client?
where are you getting your data?

in what format is it uploaded?

You can ask for quite a bit about a sale and put all that info together (with a separator so you can split it later) and get a fairly useful ID

in my previous post I said I have two routines to remove dupes

I parse a specific savedvariabls file and each sale is put into this format:

Code:
Amazing Deals of Tamriel,Argentum,15,1437713676,150,@Medusanomi,@dOpiate,1:0:1:0
taken as a single string in an array that is fairly unique (yours would be even better since you are rounding the time)

That is the data I need to make my program work.

But if the user deleted their savedvariables and this time it comes back with a slightly different time stamp then I drop that from the string and check for

Code:
Amazing Deals of Tamriel,Argentum,15,150,@Medusanomi,@dOpiate,1:0:1:0
now that's not perfect but what are the chances of seeing that exact string twice? you have guild,item,ppu,total sale amount,seller,buyer,"details"

the "details" are created by this code
Lua Code:
  1. local levelReq = GetItemLinkRequiredLevel(itemLink)
  2.   local vetReq = GetItemLinkRequiredVeteranRank(itemLink)
  3.   local itemQuality = GetItemLinkQuality(itemLink)  
  4.   local itemTrait = GetItemLinkTraitInfo(itemLink)
  5.   return levelReq .. ":" .. vetReq .. ":" .. itemQuality .. ":" .. itemTrait

so you can get a fairly reliable amount of data on a sale to make into some sort of identifier from.

They even added lots of new info into the itemLink with the recent patch.

-d