Thread Tools Display Modes
01-03-14, 06:14 AM   #1
Pinghansen
Certified Insane
AddOn Author - Click to view addons
Join Date: Nov 2010
Posts: 3
Question 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)

Last edited by Pinghansen : 01-03-14 at 06:14 AM. Reason: clarification
  Reply With Quote
01-03-14, 06:26 AM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by Pinghansen View Post
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...
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
01-03-14, 09:19 AM   #3
Pinghansen
Certified Insane
AddOn Author - Click to view addons
Join Date: Nov 2010
Posts: 3
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

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

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

Last edited by Pinghansen : 01-03-14 at 01:23 PM.
  Reply With Quote
01-03-14, 06:59 PM   #4
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
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.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
01-04-14, 06:37 AM   #5
Pinghansen
Certified Insane
AddOn Author - Click to view addons
Join Date: Nov 2010
Posts: 3
Originally Posted by Phanx View Post
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

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

Originally Posted by Phanx View Post
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.

Originally Posted by Phanx View Post
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
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Linking spells to unit frames


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