Thread Tools Display Modes
04-30-12, 08:18 PM   #1
ampere
A Kobold Labourer
Join Date: Apr 2012
Posts: 1
oUF Phanx modifications, new to lua

Hi, I was looking for some help at modifying the code for the addon oUF Phanx (found here). I am not particularly familiar with lua editing, the extent of what I have done in the past is editing the Yorsahj raid warnings addon to say the messages I wanted.

A summary of the things I wanted to change so that people can advise me better:

Add a threat percentage attached to the target frame (similar to the optional one on standard Blizzard frames).
When out of combat, display all buffs such as mounts, costumes, etc on the target frame.

I understand why the addon author chose to not include certain features, but I really like the basic set up of the addon and just want to make a few modifications so that it works for me.

Any advice or tips are much appreciated, thanks.

edit: Suppose I should also mention that I would like to change some of the buffs/debuffs that display for certain classes while in combat.

Last edited by ampere : 04-30-12 at 08:25 PM.
  Reply With Quote
04-30-12, 10:19 PM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by ampere View Post
Add a threat percentage attached to the target frame (similar to the optional one on standard Blizzard frames).
This is actually something I plan to add. I just haven't gotten around to it yet.

Originally Posted by ampere View Post
When out of combat, display all buffs such as mounts, costumes, etc on the target frame.
You'd need to register the PLAYER_REGEN_DISABLED and PLAYER_REGEN_ENABLED events on the target frame's Buff element, and handle them with a function that removed the filter while out of combat, and reapplied it when entering combat. This is also something I've considered, but haven't decided whether I want to add, or in what form.

Originally Posted by ampere View Post
I should also mention that I would like to change some of the buffs/debuffs that display for certain classes while in combat.
The aura filtering uses simple lists, which you can see in the auras.lua file. To add more buffs or debuffs, just add them to the list with the relevant value to control how you want it filtered (there's an explanation at the top of the file). To find the correct spell ID for the buff or debuff, look it up on Wowhead and copy the number in the URL.
  Reply With Quote
10-11-12, 12:39 AM   #3
Mordekai03
A Murloc Raider
Join Date: Aug 2008
Posts: 4
Originally Posted by Phanx View Post
You'd need to register the PLAYER_REGEN_DISABLED and PLAYER_REGEN_ENABLED events on the target frame's Buff element, and handle them with a function that removed the filter while out of combat, and reapplied it when entering combat. This is also something I've considered, but haven't decided whether I want to add, or in what form.
Just wanted to say that I would be in favor of this change. It would make your unit frames pretty much perfect for me. I definitely don't know enough about coding to do it myself.
  Reply With Quote
10-17-12, 12:04 AM   #4
Lysiander
An Aku'mai Servant
Join Date: Dec 2007
Posts: 37
You'd need to register the PLAYER_REGEN_DISABLED and PLAYER_REGEN_ENABLED events on the target frame's Buff element, and handle them with a function that removed the filter while out of combat, and reapplied it when entering combat. This is also something I've considered, but haven't decided whether I want to add, or in what form.
Just out of curiosity, since i use something similar in my layout, wouldn't it be more efficient to just add a combat check to the filter itself instead of changing the filter? Both ways work fine obviously, im just wondering about performance here.
  Reply With Quote
10-17-12, 03:20 AM   #5
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by Lysiander View Post
... wouldn't it be more efficient to just add a combat check to the filter itself instead of changing the filter?
No, that would just add an extra function call on every single aura change for every unit. That's a lot of extra function calls. Much simpler to just change one table value per frame when entering or leaving combat.
__________________
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
10-17-12, 02:02 PM   #6
Lysiander
An Aku'mai Servant
Join Date: Dec 2007
Posts: 37
Interesting. Thanks for the info. I do believe I have some updating to do now.
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » oUF Phanx modifications, new to lua


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