Thread Tools Display Modes
12/13/18, 11:14 PM   #1
cyxui
AddOn Author - Click to view addons
Join Date: Nov 2015
Posts: 61
last parameter of GetTradingHouseSearchResultItemInfo

the status of https://www.esoui.com/forums/showthread.php?t=7298 says its implemented.


But I can't seem to find any documentation mentioning that. However I do notice that there is an extra parameter returned for GetTradingHouseSearchResultItemInfo.

It has the format of xxxxxxxxx.000xxx (where x is a digit)

I fail to recognize what that string represents. Is it the actual expire time of the item? If so how can I translate that into timestamp??
  Reply With Quote
12/14/18, 04:46 AM   #2
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,566
The last parameter is a uniqueID which is an id64. Together with the price (and optionally seller name) you can use it to track if it's the same sale.
  Reply With Quote
12/14/18, 05:54 PM   #3
cyxui
AddOn Author - Click to view addons
Join Date: Nov 2015
Posts: 61
Originally Posted by sirinsidiator View Post
The last parameter is a uniqueID which is an id64. Together with the price (and optionally seller name) you can use it to track if it's the same sale.
Why would I need to pair it with price/seller name if its a uniqueID? is there any documentation on how unique the ID is?


And whats the dot in the middle.. should I just use it as a string?
  Reply With Quote
12/15/18, 04:38 AM   #4
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
Code:
* Id64ToString(*id64* _id_)
** _Returns:_ *string* _stringDesc_

* StringToId64(*string* _stringId_)
** _Returns:_ *id64* _id_
UniqueIds normally are unique, as the name says.
E.g. an enchantment, another level on an armor part will change the uniqueId, but not the itemId or itemInstanceId.

But the uniqueId is dependent on the item not the seller.
So you need additional info like the price and seller to see which item you check (if you want to make a difference there).

Last edited by Baertram : 12/15/18 at 04:40 AM.
  Reply With Quote
12/15/18, 05:20 AM   #5
Shinni
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 167
There shouldn't be a dot in that number. Most likely lua transformed the number to a float.
Lua can not handle 64bit integers, so most operations will turn that value into a float. For example trying to save the value in a savedVar or trying to print it on screen (because d(...) and tostring(...) will turn it to a float before turning it to a string).

If you want to properly save/display the information, you will need to use the Id64ToString function Baetram mentioned.

Regarding the uniqueness: I played around with that value when it was first added. Back then (and I guess it should be still the same) the uniqueId is the same as GetItemUniqueId(number Bag bagId, number slotIndex) before listing the item.
So the id is tied to the item. If someone buys and re-lists the item, or if the seller cancels and re-lists the item, it will have the same id. That's why you need to additionally use the seller and price.
  Reply With Quote
12/15/18, 05:21 AM   #6
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,566
Lua's tostring cannot convert id64 into a useful form, that's why you see a float number. When you use Id64ToString as Baertram suggests, you will see the proper representation of the 64-bit integer number, which you can store in your saved variables for external applications to use.

As far as I am aware the unique id is unique for each item in any store. It's just that when someone purchases (or cancels) an item and lists it again, it will keep that same unique id, but can have a different price and/or seller.
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » last parameter of GetTradingHouseSearchResultItemInfo

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off