Thread Tools Display Modes
Prev Previous Post   Next Post Next
01/29/15, 12:57 PM   #13
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
New constant "bonusLabel = 0" is just variable leaking to global. Tha same goes for new table "trainData":

Lua Code:
  1. function ZO_Stable_Gamepad:SetupEntry(control, data, selected, selectedDuringRebuild, enabled, activated)
  2.     data.isSkillTrainable = data.data.isSkillTrainable
  3.     ZO_SharedGamepadEntry_OnSetup(control, data, selected, selectedDuringRebuild, enabled, activated)
  4.  
  5.     trainData = data.data
  6.     ZO_StableTrainingRow_Setup(control, trainData.trainingType)
  7.     bonusLabel = trainData.bonus
  8.     if trainData.trainingType == RIDING_TRAIN_SPEED then
  9.         bonusLabel = zo_strformat(SI_MOUNT_ATTRIBUTE_SPEED_FORMAT, trainData.bonus)
  10.     end
  11.     control.value:SetText(bonusLabel)
  12.     ZO_StatusBar_SmoothTransition(control.bar, trainData.bonus, trainData.maxBonus, FORCE_VALUE)
  13. end

Tables "items" and "usedFilterTypes" are leaking from here:
Lua Code:
  1. local function GetBuyItems()
  2.  
  3.     items = {}
  4.     usedFilterTypes = {}
  5.  
  6.     items, usedFilterTypes = ZO_StoreManager_GetStoreItems()
  7.  
  8.     --- Gamepad versions have extra data / differently named values in templates
  9.     for i, itemData in ipairs(items) do
  10.         itemData.pressedIcon = itemData.icon
  11.         itemData.stackCount = itemData.stack
  12.         itemData.sellPrice = itemData.price
  13.         if itemData.sellPrice == 0 then
  14.             itemData.sellPrice = itemData.stackBuyPriceCurrency1
  15.         end
  16.         itemData.selectedNameColor = ZO_SELECTED_TEXT
  17.         itemData.unselectedNameColor = ZO_DISABLED_TEXT
  18.         itemData.name = zo_strformat(SI_TOOLTIP_ITEM_NAME, itemData.name)
  19.  
  20.         local itemLink = GetStoreItemLink(itemData.slotIndex)
  21.  
  22.         itemData.itemType = GetItemLinkItemType(itemLink)
  23.         itemData.equipType = GetItemLinkEquipType(itemLink)
  24.  
  25.         local IS_STORE_ITEM = true
  26.         itemData.storeGroup = GetItemStoreGroup(itemData, IS_STORE_ITEM, itemLink)
  27.         itemData.bestGamepadItemCategoryName = GetBestItemCategoryDescription(itemData)
  28.     end
  29.  
  30.     return items
  31. end

I'm not sure about table "color", I have it in my globals dump too, but I didn't find it in source code.
  Reply With Quote
 

ESOUI » Developer Discussions » Tutorials & Other Helpful Info » 1.6 update


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