Thread Tools Display Modes
03/15/16, 02:27 PM   #1
CrazyDutchGuy
 
CrazyDutchGuy's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 89
GenerateFullSlotData for russian language setting

SHARED_INVENTORY:GenerateFullSlotData(nil, BAG_BACKPACK) behaves stranges with clients that are not en, de or fr.

If i retrieve the data and loop over the itemID's i get valid values for en, de en fr language settings. If i change from en to ru I also get valid itemID's. However if i change from de or fr to ru then i get NIL itemID's.

Is there something wrong in this utility ?
Lua Code:
  1. local bagCache = SHARED_INVENTORY:GenerateFullSlotData(nil, BAG_BACKPACK)
  2.             for slotIndex, itemData in pairs(bagCache) do
  3.                 if itemData.itemType == ITEMTYPE_TROPHY then
  4.                                       d(itemData.itemID)
  5.                                 end
  6.                         end
  Reply With Quote
03/15/16, 03:14 PM   #2
Wandamey
Guest
Posts: n/a
there is that from the API patch notes:

The $(language) substitution will be replaced with that two letter code. The new substitution $(officialLanguage) will always be “en” for custom languages, and the language code for official languages.
meaning if a string isn't translated yet (like probably a lot of item names) the English version is in use.

what is your "itemID" exactly ? i dont find one in SHARED_INVENTORY except maybe uniqueID? but idk how this one works. If it's the name then the quote aboves explains the error
  Reply With Quote
03/15/16, 03:22 PM   #3
CrazyDutchGuy
 
CrazyDutchGuy's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 89
the itemID is what it says the itemID of the corresponding item in the BackPack.

The problem is not with item Name, i don't use them, because of all the languages. That is why i use item ID's.

I suspect that actually no one really noticed, untill some guy made a bug report on my addon.

I also noticed in the current SHARED_INVENTORY there is no itemID defined, yet it works ... for en, de and fr ?
  Reply With Quote
03/15/16, 03:31 PM   #4
Wandamey
Guest
Posts: n/a
maybe some addon adds an itemID to the table? have you tried without any other addon loaded?

I don't recall not to have to get the info from bagID, slotIndex... but maybe i don't use the shorter way


Edit : I'm playing in English right now, client loaded in English, and i got only nil nil nil with your bit of code run in Click4Info

Last edited by Wandamey : 03/15/16 at 03:35 PM.
  Reply With Quote
03/15/16, 03:59 PM   #5
Randactyl
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 251
Can you go through PLAYER_INVENTORY.inventories[INVENTORY_BACKPACK].slots instead?
  Reply With Quote
03/15/16, 04:24 PM   #6
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
Did a grep through add-ons. The key itemID doesn't occur in ZOS UI at all; a few add-ons use itemID in private tables; only LostTreasure sets 'slotData.itemID' to the value extracted from itemLink.
  Reply With Quote

ESOUI » Developer Discussions » Tutorials & Other Helpful Info » GenerateFullSlotData for russian language setting

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