ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   last parameter of GetTradingHouseSearchResultItemInfo (https://www.esoui.com/forums/showthread.php?t=8168)

cyxui 12/13/18 11:14 PM

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??

sirinsidiator 12/14/18 04:46 AM

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.

cyxui 12/14/18 05:54 PM

Quote:

Originally Posted by sirinsidiator (Post 36632)
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?

Baertram 12/15/18 04:38 AM

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).

Shinni 12/15/18 05:20 AM

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.

sirinsidiator 12/15/18 05:21 AM

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.


All times are GMT -6. The time now is 04:14 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI