Download
(4Kb)
Download
Updated: 10-19-14 06:34 PM
Addon for:
oUF.
Pictures
File Info
Compatibility:
Warlords of Draenor Pre-Patch (6.0.2)
Updated:10-19-14 06:34 PM
Created:04-25-09 05:40 PM
Downloads:13,073
Favorites:63
MD5:

oUF AuraWatch  Popular! (More than 5000 hits)

Version: 1.6.8-8
by: Astromech [More]

This is an optional addon for oUF by haste. The latest version was verified to work with oUF 1.6.8.

oUF AuraWatch adds the ability to watch specific auras on any unit of your choice. All you need to know is the spell ID!

Some uses include:

  • Grid style HoT indicators.
  • Crowd control warnings.
  • DoT timers.
All integrated within your unit frames.

By default, when an aura is applied to a unit, oUF_AW will display an icon letting you know it has been applied. When the aura expires, oUF_AW will display a faded icon, letting you know to reapply that aura. These affects can be customized in your layout. All icons are cleared when combat ends, so you can start each fight fresh. oUF_AuraWatch used the GUID of players and targets, making sure correct information is shown.

oUF_AW does not display numerical timers on its own. However, it does create a cooldown frame which, when paired with OmniCC by Tuller (or a similar addon), will create a countdown for you.

Additional options as well as an example on how to set up oUF_AW are located in oUF_AuraWatch.lua.

1.6.8-8
-Removed some legacy code from spell ranks. Be sure you use the correct spell ID!

1.5.2-7
-Replaced the numerous frame options with a customIcons option, which gives control of frame creation to the user. This is not backwards compatible! If you previously used hideCount, hideCooldown, or custom textures, slight alterations to your layout will be needed.
-Added Override- and Post- ResetIcon and ExpireIcon fields, which allow the user to better control how frames look when these events occur.
-Updated to oUF version 1.5.2 element standard.

1.3.28-6
Added hideCount and hideCooldown options.
Added a strictMatching option, which will watch auras based on spell ids instead of spell names if true.
Improved documentation in oUF_AuraWatch.lua.
Use new embedding technique.
Slight code improvements.

1.3.14-5:
Added an anyUnit option, which, if true, will display an aura no matter what unit it is from.
Fixed an error in the icon creating code.

1.3.14-4:
Fixed some typos so that the addon works like the documentation says!

1.3.14-3:
Allowed the layout to specify showOnlyPresent and showOnlyMissing on a per aura basis if wanted.
Added a new fromUnits field which specifies which units an aura can originate from.

1.3.11-2:
Fixed global oUF referencing and embedding errors.

1.3.11-1:
Initial upload.
Post A Reply Comment Options
Unread 11-29-15, 06:27 PM  
Astromech
A Kobold Labourer
 
Astromech's Avatar
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 73
Uploads: 6
Re: Buff timer

Hi again!

The cooldown timer should be pretty simple. After you create the icon, you just need to create a cooldown frame and AW will take care of the rest. After

Code:
local icon = CreateFrame("Frame", nil, self)
insert

Code:
local cd = CreateFrame("Cooldown", nil, icon)
cd:SetAllPoints(icon)
icon.cd = cd
For you second problem, I think you're missing an "end" to close the Paladin spell definitions. Right now, the icons are only created for Paladins. You'll need to insert "end" after this part:

Code:
elseif cfg.playerclass == "PALADIN" then
		spellIDs = {
			148039, -- Sacred Shield
			53563, -- Beacon of Light
			157007, -- Beacon of Insight
			86273, -- Illuminated Healing
			6940, -- Hand of Sacrifice
			114039, -- Hand of Purity
			156910, -- Beacon of Faith
      }
You'll have an extra "end" somewhere now, maybe at the end of the file?
__________________
- Astromech
Report comment to moderator  
Reply With Quote
Unread 11-26-15, 06:16 AM  
Joker119
A Flamescale Wyrmkin
 
Joker119's Avatar
AddOn Author - Click to view AddOns

Forum posts: 113
File comments: 504
Uploads: 10
Buff timer

Look, I'm back again!

Ok so I took a break between Highmaul and now, and now that I'm back and into Mythic progression, the lack of a timer on the aurawatch buffs is bugging me.
I remember it use to have one way back when, but it broke (no errors, just doesn't show)
I was wondering if you've run across this issue and fixed it, or could work with me again.
Essentially, I would like a darkened spiral type timer effect over the aurawatch icons (for party and raid)
http://imgur.com/LfWLGYV
In this screenshot, you see the party frame with buffs being tracked (these are the buffs i need a cooldown timer of some sort on)
Also for reference, the cooldown on the action bar that is on prayer of mending, is the type of timer I'd like, just without the number in the center. Something simple to see that doesn't obstruct the icon.
Thanks much.

A second issue.
When using Aurawatch on my Raid frames, for some reason, it will show my paladins just fine, but not my Priests buffs.
Oddly enough, if I remove the Paladin section, the Priest ones work perfectly.

Take a look and see if you can help me out with this one.. :/

Code:
  --create aura watch func
   local createAuraWatch = function(self)
	local auras = {}
	local spellIDs
    if cfg.playerclass == "WARRIOR" then --WARRIOR
        spellIDs = {}
	elseif cfg.playerclass == "PRIEST" then
		spellIDs = {
			139, -- Renew
			17, -- Power Word: Shield
			41635, -- Prayer of Mending
		} 

	elseif cfg.playerclass == "PALADIN" then
		spellIDs = {
			148039, -- Sacred Shield
			53563, -- Beacon of Light
			157007, -- Beacon of Insight
			86273, -- Illuminated Healing
			6940, -- Hand of Sacrifice
			114039, -- Hand of Purity
			156910, -- Beacon of Faith
      }
      local dir = {
        [1] = {size = 15, pos = "CENTER",       x = 0, y = 3 },
        [2] = {size = 15, pos = "CENTER",       x = 15, y = 3 },
        [5] = {size = 15, pos = "CENTER",       x = -15, y = 3 },
        [4] = {size = 15, pos = "CENTER",       x = 30, y = 3 },
        [3] = {size = 15, pos = "CENTER",       x = -30, y = 3 },
        [6] = {size = 15, pos = "CENTER",       x = -30, y = 3 },
        [7] = {size = 15, pos = "CENTER",       x = 15, y = 3 },
        [8] = {size = 15, pos = "CENTER",       x = 0, y = 3 },
      }

      auras.onlyShowPresent = true
      auras.presentAlpha = .75

      auras.PostCreateIcon = function(self, icon, sid)
        if icon.cd then
          icon.cd:SetPoint("TOPLEFT", 1, -1)
          icon.cd:SetPoint("BOTTOMRIGHT", -1, 1)
        end
        --count hack for lifebloom
        if sid == 33763 and icon.count then
          icon.count:SetFont("Interface\\AddOns\\oUF_Diablo\\media\\visitor1.ttf",8,"THINOUTLINE, MONOCHROME")
          icon.count:ClearAllPoints()
          icon.count:SetPoint("CENTER", 3, 3)
          icon.count:SetParent(icon.cd)
        end
      end

      -- Set any other AuraWatch settings
      auras.icons = {}
      for i, sid in pairs(spellIDs) do
        local icon = CreateFrame("Frame", nil, self)
	icon:SetFrameStrata("HIGH")
        icon.spellID = sid
        -- set the dimensions and positions
        icon.size = dir[i].size
        icon:SetSize(dir[i].size,dir[i].size)
        --position icon
        icon:SetPoint(dir[i].pos, self, dir[i].pos, dir[i].x, dir[i].y)
        --make indicator
        if dir[i].indicator then
          local tex = icon:CreateTexture(nil, "OVERLAY")
          tex:SetAllPoints(icon)
          tex:SetTexture("Interface\\AddOns\\oUF_Diablo\\media\\indicator")
          tex:SetVertexColor(dir[i].color.r,dir[i].color.g,dir[i].color.b)
          icon.icon = tex
        end

        auras.icons[sid] = icon
        -- Set any other AuraWatch icon settings
      end
      --call aurawatch
      self.AuraWatch = auras
    end
  end
Last edited by Joker119 : 11-26-15 at 07:38 PM.
Report comment to moderator  
Reply With Quote
Unread 01-10-15, 12:14 PM  
Astromech
A Kobold Labourer
 
Astromech's Avatar
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 73
Uploads: 6
Re: Re: Re: Re: Re: Multiple class OR adaptive icon locations.

Haha, don't worry, it happens to all of us! No problem. Glad it's working!
__________________
- Astromech
Report comment to moderator  
Reply With Quote
Unread 01-10-15, 03:36 AM  
Joker119
A Flamescale Wyrmkin
 
Joker119's Avatar
AddOn Author - Click to view AddOns

Forum posts: 113
File comments: 504
Uploads: 10
Re: Re: Re: Re: Multiple class OR adaptive icon locations.

Originally Posted by Astromech
I think you're getting that error because there's an extra "end" somewhere. I would check to make sure there are no extra "end"s after the code below.
I. Can't. Believe. I. Made. This. Mistake.

I code in BASH script all day 2-3 days a week and NEVER thought to check for extra segment closes..

There was an extra end before the very last one in the aurawatch function (likely the original coders way of closing the if-then-else function) and I never removed it.

I feel like a retard now.

It worked. Perfectly. Will forward this fix to the oUF_Diablo author aswell.

GGWP.

Thx much!
Report comment to moderator  
Reply With Quote
Unread 01-09-15, 05:57 PM  
Astromech
A Kobold Labourer
 
Astromech's Avatar
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 73
Uploads: 6
Re: Re: Re: Multiple class OR adaptive icon locations.

Hello! I hope you had a good new year.

I think you're getting that error because there's an extra "end" somewhere. If you remove the end after the last else, you'll have the problems you described (AuraWatch will only show for that last class). I went through the code again and threw together a small addon to make sure the syntax was OK. If you're getting an error again, I would check to make sure there are no extra "end"s after the code below. Basically, every function, if-elseif-else, and for loop needs an "end" to close it. Lua will complain about extras.

Lua Code:
  1. func.createAuraWatch = function(self)
  2.  
  3.     local auras = {}
  4.     local spellIDs
  5.     if cfg.playerclass == "PRIEST" then --Priest
  6.         spellIDs = {
  7.             139, -- Renew
  8.             17, -- Power Word: Shield
  9.             33076, -- Prayer of Mending
  10.             47515, -- Divine Ageis
  11.             33206, -- Pain Suppression
  12.             109964, -- Spirit Shell
  13.             152118, -- Clairity of Will
  14.         }
  15.  
  16.     elseif cfg.playerclass == "PALADIN" then --Paladin    
  17.         spellIDs = {
  18.             86273, -- Illuminated Healing
  19.             53563, -- Beacon of Light
  20.             114039, -- Hand of Purity
  21.             6940, -- Hand of Sacrifice
  22.             148039, -- Sacred Shield
  23.             156910, -- Beacon of Faith
  24.             114917, -- Stay of Execution
  25.             157047, -- Saved by the Light
  26.             114163, -- Eternal Flame
  27.             157007, -- Beacon of Insight
  28.             54597, -- Glyph of FoL
  29.             31821, -- Devotion Aura
  30.         }
  31.     else --Monk
  32.         spellIDs = {}
  33.     end
  34.  
  35.     auras.onlyShowPresent = true
  36.     auras.presentAlpha = 1
  37.     auras.PostCreateIcon = func.createAuraIcon
  38.  
  39.     -- Set any other AuraWatch settings
  40.     auras.icons = {}
  41.     local columns = 2
  42.     local xGrowth = 19
  43.     local yGrowth = -20
  44.     local parentAnchorPoint = "TOPRIGHT"
  45.     local iconAnchorPoint = "TOPRIGHT"
  46.     for i, sid in pairs(spellIDs) do
  47.         local icon = CreateFrame("Frame", nil, self)
  48.         icon:SetFrameStrata("TOOLTIP")
  49.         icon.spellID = sid
  50.         -- set the dimensions and positions
  51.         icon:SetSize(self.cfg.aurawatch.size,self.cfg.aurawatch.size)
  52.         auras.icons[sid] = icon
  53.         local xOffset = (i % columns) * xGrowth
  54.         local yOffset = math.floor(i / columns) * yGrowth +60
  55.         icon:SetPoint(iconAnchorPoint, self, parentAnchorPoint, xOffset, yOffset)
  56.         -- Set any other AuraWatch icon settings
  57.     end
  58.     --call aurawatch
  59.     self.AuraWatch = auras
  60. end

I seem to remember seeing some oUF layout that had filtered auras back in Cataclysm... Sorry I can't remember specifics.

Never been a big fan of X-Perl or Healbot either, but to each their own! Hope this helps.
__________________
- Astromech
Report comment to moderator  
Reply With Quote
Unread 12-22-14, 03:22 AM  
Joker119
A Flamescale Wyrmkin
 
Joker119's Avatar
AddOn Author - Click to view AddOns

Forum posts: 113
File comments: 504
Uploads: 10
Re: Re: Multiple class OR adaptive icon locations.

Originally Posted by Astromech
It seems your class if-then-end blocks got interwoven with the actual code. I separated them out and added a check for mage, as an example:


Your second question is technically possible, but outside of what I designed AuraWatch for. You would need to watch and check which auras are applied yourself, and rearrange the AuraWatch icons (like how we positioned them before). At that point, I would suggest to use a different addon, more suited to this. I think the default oUF auras module can do this, but you would need a filter so only spellIDs you're interested in show up. I can't help much there - don't use it myself.

Anyway, hope this helps. Happy holidays
Using this, I get this error:
Code:
Message: Interface\AddOns\oUF_Diablo\core\lib.lua:281: '<eof>' expected near 'end'
Time: 12/22/14 01:37:31
Count: 1
Stack: 
Locals:
If i take the "end" out from after the last else function, it restores the addon to useability, however, same problem occurs as before, any spellID in one of the specified class sections will not show, only way to get them to show is to not have the class defined in the above section, and just include them in a general "all" section basically. Possibly an issue with how aurawatch itself takes the settings from the ouf_diablo file and uses them? >< unfortuntly, no lua error to help with that.. Also, in order to get the addon to work, you have to define "local auras" above the "local spellIDs" and specify in each section that auras = {} otherwise you get an error saying the line "auras.presentAlpha = 1" calls "auras" a nil value. Adding the afformentioned items resolved this issue. Here is a copy of my current aurawatch function -
lua Code:
  1. --create aura watch func
  2.       func.createAuraWatch = function(self)
  3.    
  4.         local auras
  5.         local spellIDs
  6.         if cfg.playerclass == "PRIEST" then --Priest
  7.           auras = {}
  8.           spellIDs = {
  9.             139, -- Renew
  10.             17, -- Power Word: Shield
  11.             33076, -- Prayer of Mending
  12.             47515, -- Divine Ageis
  13.             33206, -- Pain Suppression
  14.             109964, -- Spirit Shell
  15.             152118, -- Clairity of Will
  16.           }
  17.  
  18.     elseif cfg.playerclass == "PALADIN" then --Paladin
  19.       auras = {}        
  20.       spellIDs = {
  21.             86273, -- Illuminated Healing
  22.             53563, -- Beacon of Light
  23.             114039, -- Hand of Purity
  24.             6940, -- Hand of Sacrifice
  25.             148039, -- Sacred Shield
  26.             156910, -- Beacon of Faith
  27.             114917, -- Stay of Execution
  28.             157047, -- Saved by the Light
  29.             114163, -- Eternal Flame
  30.             157007, -- Beacon of Insight
  31.             54597, -- Glyph of FoL
  32.             31821, -- Devotion Aura
  33.           }
  34.     else --Monk
  35.        auras = {}
  36.        spellIDs = {}
  37.  
  38.           auras.onlyShowPresent = true
  39.           auras.presentAlpha = 1
  40.           auras.PostCreateIcon = func.createAuraIcon
  41.      
  42.           -- Set any other AuraWatch settings
  43.           auras.icons = {}
  44.           local columns = 2
  45.         local xGrowth = 19
  46.         local yGrowth = -20
  47.         local parentAnchorPoint = "TOPRIGHT"
  48.         local iconAnchorPoint = "TOPRIGHT"
  49.           for i, sid in pairs(spellIDs) do
  50.             local icon = CreateFrame("Frame", nil, self)
  51.         icon:SetFrameStrata("TOOLTIP")
  52.             icon.spellID = sid
  53.             -- set the dimensions and positions
  54.             icon:SetSize(self.cfg.aurawatch.size,self.cfg.aurawatch.size)
  55.             auras.icons[sid] = icon
  56.          local xOffset = (i % columns) * xGrowth
  57.          local yOffset = math.floor(i / columns) * yGrowth +60
  58.         icon:SetPoint(iconAnchorPoint, self, parentAnchorPoint, xOffset, yOffset)
  59.             -- Set any other AuraWatch icon settings
  60.           end
  61.           --call aurawatch
  62.           self.AuraWatch = auras
  63.         end
  64.       end
For example, If I take say, Illuminated healing, and move it into the "else" section at the bottom, and change the "elseif cf.gplayerclass == "PALADIN" then" to say "MONK", it will show Illuminated Healing (paladin mastery) on the aurawatch frame, if I leave it as it, when on a paladin, it shows nothing at all. Same goes for when on the priest, or any other class you specifically define. Have tried on: Priest, Rogue, Mage, Druid, Deathknight, Paladin, Warrior and Monk. All results are the same.

As for the second part, unfortunatly the oUF auras module doesn't really work very well on the party frames, and not at all on the raid frames, also i don't believe there is a way to filter which spellID's are shown. Maybe digging through it's code I can port it's icon placement function into aurawatch, if i'm sucessful i'll post how to do it so you can add it in. I figured it wouldn't be very easy, lol.

On a side note: I can apparently expect no help from the author of oUF_Diablo, as he swears oUF is the worst possible choice for a UI to use while healing, and thus I need to disable the party and raid frames and use something else like X-Perl or *shudders* HealBot. -.-
Last edited by Joker119 : 12-22-14 at 03:58 AM.
Report comment to moderator  
Reply With Quote
Unread 12-21-14, 06:51 PM  
Astromech
A Kobold Labourer
 
Astromech's Avatar
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 73
Uploads: 6
Re: Multiple class OR adaptive icon locations.

It seems your class if-then-end blocks got interwoven with the actual code. I separated them out and added a check for mage, as an example:

Lua Code:
  1. --create aura watch func
  2. func.createAuraWatch = function(self)
  3.      
  4.     local spellIDs
  5.     --start the PRIEST setup
  6.     if cfg.playerclass == "MONK" then
  7.         spellIDs = {
  8.             139, -- Renew
  9.             17, -- Power Word: Shield
  10.             33076, -- Prayer of Mending
  11.             47515, -- Divine Ageis
  12.             33206, -- Pain Suppression
  13.             109964, -- Spirit Shell
  14.             152118, -- Clairity of Will
  15.         }
  16.     elseif cfg.playerclass == "MAGE" then
  17.         -- Mage stuff here
  18.     else -- "PRIEST"
  19.         spellIDs = {
  20.             139, -- Renew
  21.             17, -- Power Word: Shield
  22.             33076, -- Prayer of Mending
  23.             47515, -- Divine Ageis
  24.             33206, -- Pain Suppression
  25.             109964, -- Spirit Shell
  26.             152118, -- Clairity of Will
  27.             124682, -- Enveloping Mist
  28.             115175, -- Soothing mist
  29.             116849, -- Life Cocoon
  30.             115151, -- Renewing Mist
  31.         }
  32.     end
  33.      
  34.     local auras = {}
  35.     auras.onlyShowPresent = true
  36.     auras.presentAlpha = 1
  37.     auras.PostCreateIcon = func.createAuraIcon
  38.  
  39.     -- Set any other AuraWatch settings
  40.     auras.icons = {}
  41.     local columns = 2
  42.     local xGrowth = 19
  43.     local yGrowth = -20
  44.     local parentAnchorPoint = "TOPRIGHT"
  45.     local iconAnchorPoint = "TOPRIGHT"
  46.     for i, sid in pairs(spellIDs) do
  47.         local icon = CreateFrame("Frame", nil, self)
  48.         icon:SetFrameStrata("TOOLTIP")
  49.         icon.spellID = sid
  50.         -- set the dimensions and positions
  51.         icon:SetSize(self.cfg.aurawatch.size,self.cfg.aurawatch.size)
  52.         auras.icons[sid] = icon
  53.         local xOffset = (i % columns) * xGrowth
  54.         local yOffset = math.floor(i / columns) * yGrowth +60
  55.         icon:SetPoint(iconAnchorPoint, self, parentAnchorPoint, xOffset, yOffset)
  56.         -- Set any other AuraWatch icon settings
  57.         end
  58.         --call aurawatch
  59.         self.AuraWatch = auras
  60.     end
  61. end

Change mage to any other class (note class names should be in all caps, and death knight would have no space: "DEATHKNIGHT").

Your second question is technically possible, but outside of what I designed AuraWatch for. You would need to watch and check which auras are applied yourself, and rearrange the AuraWatch icons (like how we positioned them before). At that point, I would suggest to use a different addon, more suited to this. I think the default oUF auras module can do this, but you would need a filter so only spellIDs you're interested in show up. I can't help much there - don't use it myself.

Anyway, hope this helps. Happy holidays
__________________
- Astromech
Report comment to moderator  
Reply With Quote
Unread 12-19-14, 12:37 AM  
Joker119
A Flamescale Wyrmkin
 
Joker119's Avatar
AddOn Author - Click to view AddOns

Forum posts: 113
File comments: 504
Uploads: 10
Multiple class OR adaptive icon locations.

Is there a way to either make aurawatch determine the class of the player, and display a set of spellIDs depending on what that class is, or a way to make the party/raid icons go to the lowest avalible icon location, rather than a set location based on the list number they are.

IE: If an icon is listed, and there are 4 before it, that makes it's position the 5th icon position on the aurawatch frame, even if the first 4 icons are not currently visible. Can this be changed?

As to the first one, a better explanation -

Code:
    --create aura watch func
      func.createAuraWatch = function(self)
     
        --start the PRIEST setup
        if cfg.playerclass == "MONK" then
     
          local auras = {}
          local spellIDs = {
            139, -- Renew
	    17, -- Power Word: Shield
 	    33076, -- Prayer of Mending
	    47515, -- Divine Ageis
     	    33206, -- Pain Suppression
	    109964, -- Spirit Shell
	    152118, -- Clairity of Will
          }

	else
          local auras = {}
          local spellIDs = {
            139, -- Renew
	    17, -- Power Word: Shield
 	    33076, -- Prayer of Mending
	    47515, -- Divine Ageis
     	    33206, -- Pain Suppression
	    109964, -- Spirit Shell
	    152118, -- Clairity of Will
	    124682, -- Enveloping Mist
	    115175, -- Soothing mist
    	    116849, -- Life Cocoon
	    115151, -- Renewing Mist
          }
     
          auras.onlyShowPresent = true
          auras.presentAlpha = 1
          auras.PostCreateIcon = func.createAuraIcon
     
          -- Set any other AuraWatch settings
          auras.icons = {}
          local columns = 2
        local xGrowth = 19
        local yGrowth = -20
        local parentAnchorPoint = "TOPRIGHT"
        local iconAnchorPoint = "TOPRIGHT"
          for i, sid in pairs(spellIDs) do
            local icon = CreateFrame("Frame", nil, self)
	    icon:SetFrameStrata("TOOLTIP")
            icon.spellID = sid
            -- set the dimensions and positions
            icon:SetSize(self.cfg.aurawatch.size,self.cfg.aurawatch.size)
            auras.icons[sid] = icon
         local xOffset = (i % columns) * xGrowth
         local yOffset = math.floor(i / columns) * yGrowth +60
        icon:SetPoint(iconAnchorPoint, self, parentAnchorPoint, xOffset, yOffset)
            -- Set any other AuraWatch icon settings
          end
          --call aurawatch
          self.AuraWatch = auras
        end
      end
I noticed the "start priest config" thing, and was trying to test it, however, when on a priest, it makes aurawatch show no auras at all, wheter listed in that section or not.
If that could be fixed, it would be nice. Also, how would I add more classes to that? if I simply add a second if/then/else function, wether outside of the first, or in the else section of the first, it breats the entire oUF addon.
Report comment to moderator  
Reply With Quote
Unread 12-13-14, 11:34 PM  
Astromech
A Kobold Labourer
 
Astromech's Avatar
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 73
Uploads: 6
Re: Re: Re: Raid - Icon Frame Level

Sure go ahead. Glad it's working!
__________________
- Astromech
Report comment to moderator  
Reply With Quote
Unread 12-13-14, 07:06 PM  
Joker119
A Flamescale Wyrmkin
 
Joker119's Avatar
AddOn Author - Click to view AddOns

Forum posts: 113
File comments: 504
Uploads: 10
Re: Re: Raid - Icon Frame Level

Originally Posted by Astromech
Oops sorry! I gave you the wrong function. It should be

Lua Code:
  1. icon:SetFrameStrata("TOOLTIP")
I should have known to try that myself..
*facepalm*

Working perfectly now. Thanks!!!

<3

With your permission I'll forward some of these changes to the developer of ouf_Diablo so he can integrate them if he sees fit.
Report comment to moderator  
Reply With Quote
Unread 12-13-14, 05:16 PM  
Astromech
A Kobold Labourer
 
Astromech's Avatar
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 73
Uploads: 6
Re: Raid - Icon Frame Level

Oops sorry! I gave you the wrong function. It should be

Lua Code:
  1. icon:SetFrameStrata("TOOLTIP")
__________________
- Astromech
Report comment to moderator  
Reply With Quote
Unread 12-11-14, 12:36 PM  
Joker119
A Flamescale Wyrmkin
 
Joker119's Avatar
AddOn Author - Click to view AddOns

Forum posts: 113
File comments: 504
Uploads: 10
Raid - Icon Frame Level

Ok, after trying the
Code:
	  icon:SetFrameLevel("TOOLTIP")
I kept getting a blank raid frame with white health/mana bars.


Here is the snippet of code from the raid.lua file in the ouf_Diablo folder. It controls everything for the aurawatch relating to raid frames.

Code:
  --create aura watch func
  local createAuraWatch = function(self)

    if cfg.playerclass == "PRIEST" then
      local auras = {}
      local spellIDs = {
        139, -- Renew
      }
    else
      local auras = {}
      local spellIDs = {
        148039, -- Sacred Shield
        53563, -- Beacon of Light
        157007, -- Beacon of Insight
        86273, -- Illuminated Healing
        6940, -- Hand of Sacrifice
        114039, -- Hand of Purity
        156910, -- Beacon of Faith
      }

      local dir = {
        [1] = {size = 15, pos = "CENTER",       x = 0, y = 3 },
        [2] = {size = 15, pos = "CENTER",       x = 15, y = 3 },
        [5] = {size = 15, pos = "CENTER",       x = -15, y = 3 },
        [4] = {size = 15, pos = "CENTER",       x = 30, y = 3 },
        [3] = {size = 15, pos = "CENTER",       x = -30, y = 3 },
        [6] = {size = 15, pos = "CENTER",       x = -30, y = 3 },
        [7] = {size = 15, pos = "CENTER",       x = 15, y = 3 },
      }

      auras.onlyShowPresent = true
      auras.presentAlpha = 1

      auras.PostCreateIcon = function(self, icon, sid)
        if icon.cd then
          icon.cd:SetPoint("TOPLEFT", 1, -1)
          icon.cd:SetPoint("BOTTOMRIGHT", -1, 1)
        end
        --count hack for lifebloom
        if sid == 33763 and icon.count then
          icon.count:SetFont("Interface\\AddOns\\oUF_Diablo\\media\\visitor1.ttf",8,"THINOUTLINE, MONOCHROME")
          icon.count:ClearAllPoints()
          icon.count:SetPoint("CENTER", 3, 3)
          icon.count:SetParent(icon.cd)
        end
      end

      -- Set any other AuraWatch settings
      auras.icons = {}
      for i, sid in pairs(spellIDs) do
        local icon = CreateFrame("Frame", nil, self)
        icon.spellID = sid
        -- set the dimensions and positions
        icon.size = dir[i].size
        icon:SetSize(dir[i].size,dir[i].size)
        --position icon
        icon:SetPoint(dir[i].pos, self, dir[i].pos, dir[i].x, dir[i].y)
        --make indicator
        if dir[i].indicator then
          local tex = icon:CreateTexture(nil, "OVERLAY")
          tex:SetAllPoints(icon)
          tex:SetTexture("Interface\\AddOns\\oUF_Diablo\\media\\indicator")
          tex:SetVertexColor(dir[i].color.r,dir[i].color.g,dir[i].color.b)
          icon.icon = tex
        end

        auras.icons[sid] = icon
        -- Set any other AuraWatch icon settings
      end
      --call aurawatch
      self.AuraWatch = auras
    end
  end
There is only one mention of the CreateFrame and when I put the icon:SetFrameLevel beneath it, I get this LuA Error:
Code:
Message: Interface\AddOns\oUF_Diablo\units\raid.lua:164: Usage: <unnamed>:SetFrameLevel(level)
Time: 12/11/14 10:33:18
Count: 8
Stack: [C]: ?
[C]: ?
Interface\FrameXML\RestrictedFrames.lua:604: in function <Interface\FrameXML\RestrictedFrames.lua:603>
Interface\FrameXML\RestrictedFrames.lua:742: in function `CallMethod'
[string "		local header = self:GetParent()..."]:52: in function <[string "		local header = self:GetParent()..."]:1>
(tail call): ?
[C]: ?
Interface\FrameXML\RestrictedExecution.lua:441: in function <Interface\FrameXML\RestrictedExecution.lua:412>
Interface\FrameXML\SecureGroupHeaders.lua:116: in function <Interface\FrameXML\SecureGroupHeaders.lua:110>
Interface\FrameXML\SecureGroupHeaders.lua:166: in function <Interface\FrameXML\SecureGroupHeaders.lua:123>
Interface\FrameXML\SecureGroupHeaders.lua:488: in function <Interface\FrameXML\SecureGroupHeaders.lua:387>
[C]: in function `Show'
Interface\FrameXML\SecureStateDriver.lua:100: in function <Interface\FrameXML\SecureStateDriver.lua:95>
Interface\FrameXML\SecureStateDriver.lua:164: in function <Interface\FrameXML\SecureStateDriver.lua:146>
[C]: in function `SetAttribute'
Interface\FrameXML\SecureStateDriver.lua:11: in function `RegisterAttributeDriver'
Interface\AddOns\oUF\ouf.lua:530: in function `SpawnHeader'
Interface\AddOns\oUF_Diablo\units\raid.lua:426: in main chunk

Locals:
I wish this was in BASH script because I would have been able to solve all these problems in a matter of hours on my own.. Unfortunatly I don't know the first thing about Lua. T_T
Report comment to moderator  
Reply With Quote
Unread 12-10-14, 04:16 PM  
Joker119
A Flamescale Wyrmkin
 
Joker119's Avatar
AddOn Author - Click to view AddOns

Forum posts: 113
File comments: 504
Uploads: 10
Originally Posted by Astromech
Glad it's working!

To move the icons up, change

Lua Code:
  1. local yOffset = math.floor(i / columns) * yGrowth

to

Lua Code:
  1. local yOffset = math.floor(i / columns) * yGrowth + x

just replace x with some number until it's in the right place.

To change to the tooltip layer, after

Lua Code:
  1. local icon = CreateFrame("Frame", nil, self)

add

Lua Code:
  1. icon:SetFrameLevel("TOOLTIP")

That should do it!
YOUR THE BEST!! <3 Thanks much!

If I have any other problems I'll let you know, but that seems to be it for now!!
Report comment to moderator  
Reply With Quote
Unread 12-09-14, 06:30 PM  
Astromech
A Kobold Labourer
 
Astromech's Avatar
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 73
Uploads: 6
Glad it's working!

To move the icons up, change

Lua Code:
  1. local yOffset = math.floor(i / columns) * yGrowth

to

Lua Code:
  1. local yOffset = math.floor(i / columns) * yGrowth + x

just replace x with some number until it's in the right place.

To change to the tooltip layer, after

Lua Code:
  1. local icon = CreateFrame("Frame", nil, self)

add

Lua Code:
  1. icon:SetFrameLevel("TOOLTIP")

That should do it!
__________________
- Astromech
Report comment to moderator  
Reply With Quote
Unread 12-08-14, 08:48 AM  
Joker119
A Flamescale Wyrmkin
 
Joker119's Avatar
AddOn Author - Click to view AddOns

Forum posts: 113
File comments: 504
Uploads: 10
Originally Posted by Astromech
I just kind of collapsed the two for loops together. I hope this will fix things for you!
PERFECT!!! EXACTLY WHAT I WANTED!!!!!

Ok now I have 2 more quick questions. In the above segment, how, other than the "TOPRIGHT" , can I position the icon start point? They are alittle lower than I'd like.

I want to move the icons up to about halfway to the top of the players portrait.
Note: I changed the iconAnchorPoint to TOPRIGHT as TOPLEFT for some reason has it too close to the next players frame, and the edge of the icons overlapped the other players frame. Also, I changed the column limit from 4 to 2.

Second question relates to the Raid Frames, tho i'm sure it's a universal setting somewhere, I need to make the icons be on the "TOOLTIP" frame layer, the reason is to make one of the icons I position on the raid frames be ontop of the healthbar, as it is the main one I'd like to be able to easily track. The other 4 icons i'm tracking on raid frames aren't as important.
Last edited by Joker119 : 12-08-14 at 08:59 AM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: