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 : Quote:
--- 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 : Quote:
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! |
Quote:
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:
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:
Lua Code:
SetupResultTooltip(...) is what calls your: SetPendingSmithingItemTooltip(...), passing it all of its parameters. Lua Code:
|
yeah i get it now, but i was focusing on the "style" items and i misread the error. Besides i always leave LinkStyle blank, and I had no mention of it in my own addons. I forgot it a bit :)
For these items I got a handfull of ways of gettin the link. and I said the args I get from SetPendingSmithingItem because i used function(control, ...) in my hook before TG. I dunno the technical words and for me it's just a way to get the hang on the needed vars to get my itemlink in the end. And also have it working with a common function for all hooks. But that is dead for this tooltip now. so (...) until now was working for GetSmithingPatternResultLink(...) but with TG, that bool break the linkStyle. I say extra arg because it didn't exist before TG. It would be nice to add a dummy bool in GetSmithingPatternResultLink arguments or a dummy linkStyle in SetPendingSmithingItem edit : or easier : limit the number of args for SetPendingSmithingItem to 5 ? i doubt the use of the crown item changes the item tooltip... Until now there were always a symetry between the args of methods that set the tooltip and the ones that retrieve the itemLink. And that was convenient. |
Quote:
I don't know why it would have changed. As you said, if it is something new they added (isUsingUniversalStyle), then that would explain why it worked before. Because you can leave linkStyle nil, and if isUsingUniversalStyle did not exist before you would have been passing nil for linkStyle. |
yes it is new, it's a crown store item than can replace any style matérial (where my confusion on the error came from at first)
it's a checkbox. a new one that will come with Thieves Guild Edit: I wrote "hook" in the post title, but this control name is so long, no eye can reach there :D here how it was before (source : wiki of last summer) : ## SetPendingSmithingItem(luaindex patternIndex, luaindex materialIndex, integer materialQuantity, luaindex styleIndex, luaindex traitIndex) so yes i was passing nil, but now if i display the args I got : index,index,index,index,index,bool,nil ... haven't checked the updated function yet. obviously the bool is for isUsingUniversalStyle, but the nil? |
Quote:
Lua Code:
|
ha ha right i messed up my debug. only 6 then. i edit the posts above for them to be less confusing
|
My little dirty fix
Lua Code:
|
Seems Chip forgot to update his ZO_Ingame addon !
Lua Code:
Right click on any tooltip at craft station :D |
Guilty as charged.
|
How do i fix it?
Do i have to do something (im addon user, not creator)? There was an incremental patch today and even after update this is still happening to me when i try to link any crafting item from station before crafting it. |
The error when you link is not from the addons.
It's the same cause, but we can't do anything about it on our own. Just wait and avoid linking from the gear crafting stations :o Edit: well maybe we could rewrite the function in cause in a mini-patch the fix below is included in the next post atached zip. (thx votan) (you dont need to paste it yourself, just use the patch addon that votan linked) -- just put the unzipped folder in Documents/Elders Scrolls Online/live(eu)/AddOns /live(eu) means : "live" for NA or "liveeu" for EU. Code:
local OrgZO_LinkHandler_CreateChatLink = ZO_LinkHandler_CreateChatLink |
Quote:
|
All times are GMT -6. The time now is 11:46 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI