View Single Post
03/10/24, 06:30 PM   #19
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,579
Today I finally finished rewriting LibHistoire. It took way more time and effort than expected and there are some things I had to cut from v2.0, but it should work for most parts. I do expect some bugs, but will try to fix them over the next couple days.

The new version is compatible with any addon that relied on the old version with minimal or no changes. However, the eventIds in the new api started over from zero and due to differences in how events are stored on the server now, there is sadly no way to map old id64 eventIds to new id53 eventIds.

In order to ensure addon listeners who stored the last processed eventId and use it to limit what the library returns will still receive events, I opted to convert the new eventIds to id64 by adding 3000000000 first. The last ids in the old system on the NA server are somewhere around 2200000000 and for EU around 2700000000, so this way there should not be any collision and it will be easy to convert them back to an id53 later.

Unfortunately this also means that listeners may receive events that have already been processed under the old history api with a different eventId and may end up showing duplicate or incorrect data for a while.

Another change is that the HISTORY_RESCAN_STARTED and HISTORY_RESCAN_ENDED callbacks are now deprecated and won't fire any more. The rescan was originally only required to offer a way to get events that were previously missing from the data returned by the server (due to bugs in the history api) into the library after linking had finished. Now that the cache is part of the game itself, this is no longer possible or needed and if any events end up missing from the server response, ZOS is determined to fix this on their end.

Force linking has also been removed as a feature, since the new api will limit how long data is stored locally anyway and instead the library now offers users a way to make it forget the previously linked range and select the cache segment that is shown in the ingame UI instead. To that end there are two new callbacks LINKED_RANGE_LOST and LINKED_RANGE_FOUND. They will also fire in some other situations like when the cache or the library save data is deleted.

Last but not least, it seems that there is currently a bug with some item links in the new history api, which causes them to miss critical information. This affects writs, crafted potions and any other items that use custom data. I'm not a 100% sure if this is only happening on the PTS or if it will be fixed for live, but fingers crossed.
  Reply With Quote