Thread Tools Display Modes
02-10-13, 12:39 PM   #1
Malpy
A Defias Bandit
Join Date: Oct 2010
Posts: 3
AuraWatch and specs

Hi was looking for some help to get Aurawatch to change filters based on class current spec.

My Current scripts are

Lua Code:
  1. lib.CreateAuraWatch = function(self, unit, icon)
  2.     local auras = CreateFrame("Frame", nil, self)
  3.     auras:SetPoint("TOPLEFT", self.Health, -1, 1)
  4.     auras:SetPoint("BOTTOMRIGHT", self.Power, 1, -1)
  5.     auras.presentAlpha = 1
  6.     auras.missingAlpha = 0
  7.     auras.hideCooldown = cfg.hidecooldown
  8.     auras.icons = {}
  9.     auras.PostCreateIcon = CreateAuraWatchIcon
  10.  
  11.     local buffs = {}
  12.     -- Non Class Specific Buffs --
  13.     if (filters.buffids["ALL"]) then
  14.         for key, value in pairs(filters.buffids["ALL"]) do
  15.             tinsert(buffs, value)
  16.         end
  17.     end
  18.     -- Toggle Roles --
  19.     if (filters.healbuffids[lib.playerClass]) then
  20.         for key, value in pairs(filters.healbuffids[lib.playerClass]) do
  21.             tinsert(buffs, value)
  22.         end
  23.     end
  24.    
  25.     -- "Cornerbuffs"
  26.     if (buffs) then
  27.         for key, spell in pairs(buffs) do
  28.             local icon = CreateFrame("Frame", nil, auras)
  29.             icon.spellID = spell[1]
  30.             icon.anyUnit = spell[4]
  31.             icon:SetWidth(cfg.raidiconsize)
  32.             icon:SetHeight(cfg.raidiconsize)
  33.             icon:SetPoint(spell[2], spell[3], 0)
  34.             icon:SetFrameLevel(50)
  35.             -- Overlay for Count Text --
  36.             local iconoverlayFrame = CreateFrame("Frame", nil, icon, nil)
  37.             iconoverlayFrame:SetFrameStrata("HIGH")
  38.             iconoverlayFrame:SetFrameLevel(95)
  39.             -- Count text --
  40.             local count = iconoverlayFrame:CreateFontString(nil, "OVERLAY")
  41.             count:SetFont(cfg.Font, 11, cfg.FontF)
  42.             count:SetPoint('TOPRIGHT', icon, 2, 1)
  43.             count:SetParent(iconoverlayFrame)
  44.             icon.count = count
  45.             auras.icons[spell[1]] = icon
  46.         end
  47.     end
  48.     self.AuraWatch = auras
  49. end

I want to be able to have the filters change based on what my current spec is for the class
For Healing
Lua Code:
  1. -- Toggle Roles --
  2.     if (filters.healbuffids[lib.playerClass]) then
  3.         for key, value in pairs(filters.healbuffids[lib.playerClass]) do
  4.             tinsert(buffs, value)
  5.         end
  6.     end

For Tanking it would change to
Lua Code:
  1. -- Toggle Roles --
  2.     if (filters.tankbuffids[lib.playerClass]) then
  3.         for key, value in pairs(filters.tankbuffids[lib.playerClass]) do
  4.             tinsert(buffs, value)
  5.         end
  6.     end


Any help would be appreciated

Thanks in Advance
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » AuraWatch and specs


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