WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=3)
-   -   Right Click Solve Archaeology Function (https://www.wowinterface.com/forums/showthread.php?t=52896)

sirann 11-20-15 11:15 PM

Shift Click Add Keystones to Solve Archaeology Function
 
Hello,

I recently came across stArchaeology. Thought it was a pretty neat and compact way to view the Archaeology frames. Wanted to rewrite most of it from the ground up (terrible idea I know) to add MoP and WoD artifacts. One thing I did not like, was the fly out solve menu stArch had. Currently, shift left click or shift+ctrl left click will solve the respective race's artifact. However, if I want to socket the artifact to solve, nothing will occur. Manually trying to add keystones to the blizzard_arch_UI button does not work, whether it be clicking the keystone "hole" or dragging the keystone to the socket. No Blizzard Function was prevented by an addon this time.

Please find my code here: http://pastebin.com/dybyj2Zp

All print debugging shows that the proper functions are firing, except, something is blocking the SocketItemToArtifact() function

semlar 11-21-15 12:08 AM

You aren't telling it what artifact to solve, presumably "SetSelectedArtifact(i)" should be inside of your "OnMouseDown" function.

sirann 11-21-15 12:18 AM

Adding the line as suggested causes "Interface action failed because of an AddOn"

An action was blocked because of taint from stArchaeologist - SolveArtifact()

semlar 11-21-15 12:29 AM

Well now you have a new problem, because it appears that you can't call SolveArtifact() directly.

You may be able to create a secure button that /clicks the appropriate "solve" button on the archaeology frame in the interface for you.

sirann 11-21-15 12:34 AM

oh boy, let me try to contain my excitement

but seriously, thank you!

sirann 11-21-15 03:48 PM

Original Post updated with new problem.

Phanx 11-22-15 01:32 PM

Quote:

Originally Posted by semlar (Post 311890)
Well now you have a new problem, because it appears that you can't call SolveArtifact() directly.

That is incorrect. I call SolveArtifact() directly in Better Archaeology UI (along with socketing keystones) with no secure templates of any kind.

@sirann:
You may want to look at the Better Archaology UI code for an example of how to socket keystones and solve artifacts in one click. I don't have time at the moment to go through your code and compare to figure out what's wrong with it.

sirann 11-22-15 03:21 PM

After a few hours of print debugging, I was able to elucidate the issue. Now I just need to perform archaeology skill checks on login and some other non critical stuff.

When I looked at your code, your "solve button" utilized a blizzard_archaeology template, which I believe is a secure button. Quite literally, if I take out the secure template in my button creation, it'll taint when I try to solve. Setting the secure template back in and reloading fixes the taint.

But all that's fixed!

Thanks for writing your addon so I could learn! And thank you for both of your replies!

semlar 11-22-15 04:33 PM

Quote:

Originally Posted by Phanx (Post 311916)
That is incorrect. I call SolveArtifact() directly in Better Archaeology UI (along with socketing keystones) with no secure templates of any kind.

The error message they posted literally says the call to SolveArtifact was blocked, so if you can call it directly it must have some conditions that aren't being met.

Quote:

Originally Posted by sirann (Post 311921)
When I looked at your code, your "solve button" utilized a blizzard_archaeology template, which I believe is a secure button. Quite literally, if I take out the secure template in my button creation, it'll taint when I try to solve. Setting the secure template back in and reloading fixes the taint.

"ArchaeologyRaceTemplate" is not a secure template, it's a fairly standard button. I don't know what the difference is between that and what you were doing before.

The only thing I can think of is you are somehow attempting to call the function without requiring a hardware event, but the code you've posted thusfar has always included a hardware event.


All times are GMT -6. The time now is 06:13 AM.

vBulletin © 2020, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI