WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   oUF (Otravi Unit Frames) (https://www.wowinterface.com/forums/forumdisplay.php?f=87)
-   -   Linking spells to unit frames (https://www.wowinterface.com/forums/showthread.php?t=48757)

Pinghansen 01-03-14 06:14 AM

Linking spells to unit frames
 
I'd be very happy if I could get at few pointers on linking spells to the unit frames.

I've tried using Clique, and it sorta works, but at the same time, it seems to tickle both oUF (Phanx) and Dominos into behaving weirdly, forcing me to /reload often, which is not exactly handy in battlegrounds ;)

The best solution for me, may be writing a simple addon that hard-codes the relevant spells by hooking into the innards of oUF (and/or oUF Phanx), but I simply don't know where to start.

(Yes, yes, I know ... RTFM. Problem is that my ADHD makes reading documentation a loosing battle)

Phanx 01-03-14 06:26 AM

Quote:

Originally Posted by Pinghansen (Post 289116)
I've tried using Clique, and it sorta works, but at the same time, it seems to tickle both oUF (Phanx) and Dominos into behaving weirdly, forcing me to /reload often

I am using (and have been using for 5+ years) Clique with oUF_Phanx without any problems whatsoever. Can you be more specific about the problems you're having?

Also not sure how Clique would interact with Dominos at all, since Dominos doesn't create any unit frames, and Clique doesn't do anything with frames that are not unit frames... :confused:

Pinghansen 01-03-14 09:19 AM

Perhaps I should point out, that I in no way am putting the blame for the errors on Clique (even if my first post could be read that way). Hope this clears that :o

Quite frankly, I'm at loss trying to figure out what's happening. Several seemingly unrelated things are happening at different times. All I know, is that "the trigger" was installing Clique, which I know is a very well tested addon.

Most likely, the culprit is some other addon (or more), using colliding globals. I have been trying out some BG related addons to see which ones I want to rip and reform for my own purposes.

Yes, I could try removing all other addons to find the culprit (and I will be doing so later), but right now, I've decided to use this "opportunity" to learn something about oUF, which is something that I've been wanting to do for quite a while.

Alas, here are some of the more obvious things I've seen:
  • Some times in BG's, enemy unit frames are marked friendly (green). That will pass after a while (out of combat?).
  • Some times (in PVE) my (locked) Omen frame is moved about a standard minimap button to the left, and a bit up. A /reload will fix this.
  • Some times the Dominos keybinds quit working, or I seem to fire other spells than I configured. This soon passes.
Not exactly very typical errors :confused:

No, I don't have any lua errors available.

Edit: I now have my eye firmly on one particular addon as the culprit (and certainly not Clique, oUF (*), nor Dominos). But I'd still like to know how to link those spells :D

Phanx 01-03-14 06:59 PM

None of those sound like problems that could possibly be caused by Clique. When dealing with such a random assortment of errors, the first thing I'd recommend is clearing your game cache. WoW is pretty bad at detecting when its cached data is corrupted, and corrupted cached data can cause all kinds of bizarre problems. My personal favorite was the time that the letter "e" was being added after every character I typed in the chat edit box. Reloading didn't fix it, restarting didn't fix it, disabling addons didn't fix it, and "deleting" WTF didn't fix it. Clearing the cache did fix it.

Anyway, assigning a spell to a unit button is pretty simple:

Code:

-- Cast "Dispel Magic" on the unit with shift-rightclick
unitframe:SetAttribute("shift-type2", "spell")
unitframe:SetAttribute("shift-spell2", "Dispel Magic")

See here or here for more details, with lists/tables of available attributes. They're the same attributes available for action buttons.

Pinghansen 01-04-14 06:37 AM

Quote:

Originally Posted by Phanx (Post 289148)
None of those sound like problems that could possibly be caused by Clique.

Nope. After grokking it for a while, I figure it was because I, after installing the BG addons, didn't actually start doing BG's, until some days later. That Clique was installed immediately before that, was perhaps a bit inopportune. The good old "change only one thing at a time" principle still rules :o

Of course, there is the unlikely possibility that Clique was the innocent catalyst by providing something that a less-than-optimal coded addon could corrupt, but during the short browse I took through the code, globals weren't exactly in abundance ;)

Quote:

Originally Posted by Phanx (Post 289148)
Clearing the cache did fix it.

My own particular experience with cache problems, was back in 3dotsomething, where the renderer often dissolved Dalaran in larger and larger triangles. Took me a while to get that one fixed.

Quote:

Originally Posted by Phanx (Post 289148)
Anyway, assigning a spell to a unit button is pretty simple:

Many thanks.

It will be interesting experimenting with that, but I expect that in the long term, I'll stay with Clique. The more I delve into it, the more I like it.

I'm also hoping to experiment with making some primitive enemy "unit frames", mostly for targeting and getting an overview of the opposing teams composition, but if I could figure out a way to do some crude range checking .. probably not ;)


All times are GMT -6. The time now is 06:21 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI