Thread Tools Display Modes
Prev Previous Post   Next Post Next
02/07/16, 02:42 PM   #1
Wandamey
Guest
Posts: n/a
ZO_SmithingTopLevelCreationPanelResultTooltip.SetPendingSmithingItem hook

I'm having a problem with some tootlip edition

At the gear crafting stations (clothier, carpenter, blacksmith)

In creation mode, i can't seem to get a valid info from GetSmithingPatternResultLink(...) with the args I get from ZO_SmithingTopLevelCreationPanelResultTooltip.SetPendingSmithingItem anymore (the hook was working till TG) and get this error :
Checking type on argument linkStyle failed in GetSmithingPatternResultLink_lua
stack traceback:
[C]: in function 'GetSmithingPatternResultLink'
user:/AddOns/TheHookingAddon/TheHookingAddon.lua:663: in function 'SetPendingSmithingItem'
EsoUI/Ingame/Crafting/Keyboard/SmithingCreation_Keyboard.lua:194: in function 'ZO_SmithingCreation:SetupResultTooltip'
EsoUI/Ingame/Crafting/SmithingCreation_Shared.lua:895: in function 'ZO_SharedSmithingCreation:UpdateTooltipInternal'
EsoUI/Ingame/Crafting/SmithingCreation_Shared.lua:37: in function 'ZO_SharedSmithingCreation:OnUpdate'
EsoUI/Ingame/Crafting/SmithingCreation_Shared.lua:32: in function '(anonymous)'
probably an issue with the new crown store component?

---
I have to retrieve each var from this instead in creation mode :
local pat,mat,qtt,style,trait =
SMITHING.creationPanel:GetSelectedPatternIndex(),
SMITHING.creationPanel:GetSelectedMaterialIndex(),
SMITHING.creationPanel:GetSelectedMaterialQuantity(),
SMITHING.creationPanel:GetSelectedStyleIndex(),
SMITHING.creationPanel:GetSelectedTraitIndex()
local itemLink = GetSmithingPatternResultLink(pat,mat,qtt,style,trait) and then it's working.

Edit : Got it working like that too :
local PendingSmithingItemTooltip = ZO_SmithingTopLevelCreationPanelResultTooltip.SetPendingSmithingItem
ZO_SmithingTopLevelCreationPanelResultTooltip.SetPendingSmithingItem = function(control,pat,mat,qtt,style,trait,...)
PendingSmithingItemTooltip(control,pat,mat,qtt,style,trait,...)
local itemLink = GetSmithingPatternResultLink(pat,mat,qtt,style,trait)
EditTooltip(control, itemLink)
end
it appears that SetPendingSmithingItem() receives 2 extra arguments, a boolean (crown store I assume and the other got me only nil)
I don't know why too many arguments makes GetSmithingPatternResultLink(...) go wild, but it does. -- Erratum it's only 1 new argument, and is a bool

Re Edit : /facepalm it's an error about linkStyle, not Style so yes I know why it gets wild. Because the bool was added at the same place where linkStyle is in the other function
Chiiiiiiiiiiiiiiiiiiiiiiiiiiiip!

Last edited by Wandamey : 02/08/16 at 05:09 AM.
  Reply With Quote
 

ESOUI » Developer Discussions » General Authoring Discussion » ZO_SmithingTopLevelCreationPanelResultTooltip.SetPendingSmithingItem hook


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