Originally Posted by Wandamey
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 :
|
Yes it is an error about the linkStyle.
If your trying to create a link for the item that's currently being created theres a function to get all of those arguments:
Lua Code:
local patternIndex, materialIndex, materialQuantity, styleIndex, traitIndex, isUsingUniversalStyle = SMITHING.creationPanel:GetAllCraftingParameters()
-- Don't try to use this: isUsingUniversalStyle as the last parameter,
-- its the wrong type which is what you were trying to use
local link = GetSmithingPatternResultLink(patternIndex, materialIndex, materialQuantity, styleIndex, traitIndex)
d(link)
As for the Boolean argument you mentioned: isUsingUniversalStyle, its not extra its just that the last argument is different. It is because GetSmithingPatternResultLink takes a linkStyle as its last parameter and SetupResultTooltip/SetPendingSmithingItemTooltip takes a Boolean as its last parameter which is isUsingUniversalStyle that is returned from GetAllCraftingParameters() or SMITHING.creationPanel.GetIsUsingUniversalStyleItem()
Lua Code:
function ZO_SharedSmithingCreation:GetAllCraftingParameters()
return self:GetSelectedPatternIndex(), self:GetSelectedMaterialIndex(),
self:GetSelectedMaterialQuantity(), self:GetSelectedStyleIndex(), self:GetSelectedTraitIndex(), self:GetIsUsingUniversalStyleItem()
end
Lua Code:
local creationPanel = SMITHING.creationPanel
creationPanel:SetupResultTooltip(creationPanel:GetAllCraftingParameters())
SetupResultTooltip(...) is what calls your: SetPendingSmithingItemTooltip(...), passing it all of its parameters.
Lua Code:
function ZO_SmithingCreation:SetupResultTooltip(...)
self.resultTooltip:SetPendingSmithingItem(...)
end