Guest User

AuraWatch

a guest
Apr 20th, 2013
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.66 KB | None | 0 0
  1. local AWPostCreateIcon = function(AWatch, icon, spellID, name, self)
  2.     icon.cd:SetReverse(true)
  3.     local count = lib.gen_fontstring(icon, cfg.font, cfg.fontsize, "OUTLINEMONOCHROME")
  4.     count:SetPoint("CENTER", icon, "BOTTOM", 3, 3)
  5.     icon.count = count     
  6.     local h = CreateFrame("Frame", nil, icon)
  7.     h:SetFrameLevel(4)
  8.     h:SetPoint("TOPLEFT",-3,3)
  9.     h:SetPoint("BOTTOMRIGHT",3,-3)
  10.    
  11. end
  12. lib.createAuraWatch = function(self, unit)
  13.     if cfg.showAuraWatch then
  14.         local auras = {}
  15.         local spellIDs = {
  16.             DEATHKNIGHT = {
  17.             },
  18.             DRUID = {
  19.                 33763, -- Lifebloom
  20.                 8936, -- Regrowth
  21.                 774, -- Rejuvenation
  22.                 48438, -- Wild Growth
  23.             },
  24.             HUNTER = {
  25.                 34477, -- Misdirection
  26.             },
  27.             MAGE = {
  28.                 1459, -- Arcane Brilliance
  29.             },
  30.             PALADIN = {
  31.                 53563, -- Beacon of Light
  32.                 25771, -- Forbearance
  33.             },
  34.             PRIEST = {
  35.                 17, -- Power Word: Shield
  36.                 139, -- Renew
  37.                 33076, -- Prayer of Mending
  38.             },
  39.             ROGUE = {
  40.                 57934, -- Tricks of the Trade
  41.             },
  42.             SHAMAN = {
  43.                 974, -- Earth Shield
  44.                 61295, -- Riptide
  45.             },
  46.             WARLOCK = {
  47.                 20707, -- Soulstone Resurrection
  48.             },
  49.             WARRIOR = {
  50.                 114030, -- Vigilance
  51.             },
  52.         }
  53.         auras.onlyShowPresent = true
  54.         auras.anyUnit = true
  55.         auras.PostCreateIcon = AWPostCreateIcon
  56.         -- Set any other AuraWatch settings
  57.         auras.icons = {}
  58.         for i, sid in pairs(spellIDs[playerClass]) do
  59.             local icon = CreateFrame("Frame", nil, self)
  60.             icon.spellID = sid
  61.             -- set the dimensions and positions
  62.             icon:SetWidth(16)
  63.             icon:SetHeight(16)
  64.             icon:SetFrameLevel(5)
  65.             icon:SetPoint("TOPRIGHT", self, "TOPLEFT", 9 * i, 1)
  66.             auras.icons[sid] = icon
  67.         end
  68.         self.AuraWatch = auras
  69.     end
  70. end
Add Comment
Please, Sign In to add comment