View Single Post
08-23-14, 12:35 PM   #1
liquidbase
A Warpwood Thunder Caller
 
liquidbase's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2010
Posts: 97
Cooldownspirale for HoT on Grid

Hi @all!

On LiveServer I use oUF_AuraWatch to display the various HoTs, debuffs and buffs from healer on the embed grid and the remaining time will be displayed with a cooldown spiral. In the beta I now have the problem that this cooldown spiral is no longer displayed. Currently I know that it is not due to the code I use for the display. The icon is displayed, so I know it works oUF_AuraWatch until the cooldown spiral. I have now been trying since yesterday to find out where the error is found and either I overlooked something or there is no error.

Link to oUF_AuraWatch

Display code:
Lua Code:
  1. D.countOffsets = {
  2.     TOPLEFT = {6, 1},
  3.     TOPRIGHT = {-6, 1},
  4.     BOTTOMLEFT = {6, 1},
  5.     BOTTOMRIGHT = {-6, 1},
  6.     LEFT = {6, 1},
  7.     RIGHT = {-6, 1},
  8.     TOP = {0, 0},
  9.     BOTTOM = {0, 0},
  10. }
  11.  
  12. D.CreateAuraWatchIcon = function(self, icon)
  13.     icon:SetTemplate()
  14.     icon.icon:Point("TOPLEFT", 1, -1)
  15.     icon.icon:Point("BOTTOMRIGHT", -1, 1)
  16.     icon.icon:SetTexCoord(.08, .92, .08, .92)
  17.     icon.icon:SetDrawLayer("ARTWORK")
  18.     if (icon.cd) then
  19.         icon.cd:SetReverse()
  20.     end
  21.     icon.overlay:SetTexture()
  22. end
  23.  
  24. D.createAuraWatch = function(self, unit)
  25.     local auras = CreateFrame("Frame", nil, self)
  26.     auras:SetPoint("TOPLEFT", self.Health, 2, -2)
  27.     auras:SetPoint("BOTTOMRIGHT", self.Health, -2, 2)
  28.     auras.presentAlpha = 1
  29.     auras.missingAlpha = 0
  30.     auras.hideCooldown = false
  31.     auras.icons = {}
  32.     auras.PostCreateIcon = D.CreateAuraWatchIcon
  33.  
  34.     local buffs = {}
  35.  
  36.     if D.buffids["ALL"] then
  37.         for key, value in pairs(D.buffids["ALL"]) do
  38.             tinsert(buffs, value)
  39.         end
  40.     end
  41.  
  42.     if (D.buffids[D.Class]) then
  43.         for key, value in pairs(D.buffids[D.Class]) do
  44.             tinsert(buffs, value)
  45.         end
  46.     end
  47.  
  48.     if (buffs) then
  49.         for key, spell in pairs(buffs) do
  50.             local icon = CreateFrame("Frame", nil, auras)
  51.             icon.spellID = spell[1]
  52.             icon.anyUnit = spell[5]
  53.             icon:Width(6)
  54.             icon:Height(6)
  55.             icon:SetPoint(spell[2], unpack(spell[3]))
  56.  
  57.             local tex = icon:CreateTexture(nil, "OVERLAY")
  58.             tex:SetAllPoints(icon)
  59.             tex:SetTexture(C["media"].blank)
  60.             if (spell[4]) then
  61.                 tex:SetVertexColor(unpack(spell[4]))
  62.             else
  63.                 tex:SetVertexColor(.8, .8, .8)
  64.             end
  65.  
  66.             local count = icon:CreateFontString(nil, "OVERLAY")
  67.             count:SetFont(C["media"].font, 8, "THINOUTLINE")
  68.             count:SetPoint("CENTER", unpack(D.countOffsets[spell[2]]))
  69.             icon.count = count
  70.  
  71.             auras.icons[spell[1]] = icon
  72.         end
  73.     end
  74.     self.AuraWatch = auras
  75. end
  76.  
  77. if C["raid"].raidunitdebuffwatch == true then
  78.     do
  79.         D.buffids = {
  80.             PRIEST = {
  81.                 {6788, "TOPRIGHT", {0, 0}, {1, 0, 0}, true}, -- Weakened Soul
  82.                 {33076, "BOTTOMRIGHT", {0, 0}, {.2, .7, .2}}, -- Prayer of Mending
  83.                 {139, "BOTTOMLEFT", {0, 0}, {.4, .7, .2}}, -- Renew
  84.                 {17, "TOPLEFT", {0, 0}, {.81, .85, .1}, true}, -- Power Word: Shield
  85.             },
  86.             DRUID = {
  87.                 {774, "TOPLEFT", {0, 0}, {.8, .4, .8}}, -- Rejuvenation
  88.                 {162359, "TOPLEFT", {0, 0}, {.1, .3, .8}}, -- Genesis
  89.                 {155777, "TOPLEFT", {0, -8}, {.3, .3, .8}}, -- Germination
  90.                 {8936, "TOPRIGHT", {0, 0}, {.2, .8, .2}}, -- Regrowth
  91.                 {33763, "BOTTOMLEFT", {0, 0}, {.4, .8, .2}}, -- Lifebloom
  92.                 {48438, "BOTTOMRIGHT", {0, 0}, {.8, .4, 0}}, -- Wild Growth
  93.             },
  94.             PALADIN = {
  95.                 {53563, "TOPRIGHT", {0, 0}, {.7, .3, .7}}, -- Beacon of Light
  96.                 {1022, "BOTTOMRIGHT", {0, 0}, {.2, .2, 1}, true}, -- Hand of Protection
  97.                 {1044, "BOTTOMRIGHT", {0, 0}, {.89, .45, 0}, true}, -- Hand of Freedom
  98.                 {1038, "BOTTOMRIGHT", {0, 0}, {.93, .75, 0}, true}, -- Hand of Salvation
  99.                 {6940, "BOTTOMRIGHT", {0, 0}, {.89, .1, .1}, true}, -- Hand of Sacrifice
  100.                 {114163, "BOTTOMLEFT", {0, 0}, {.89, .1, .1}, true}, -- Eternal Flame
  101.                 {20925, "TOPLEFT", {0, 0}, {.81, .85, .1}, true}, -- Sacred Shield
  102.             },
  103.             SHAMAN = {
  104.                 {61295, "TOPLEFT", {0, 0}, {.7, .3, .7}}, -- Riptide
  105.                 {974, "BOTTOMRIGHT", {0, 0}, {.7, .4, 0}, true}, -- Earth Shield
  106.             },
  107.             MONK = {
  108.                 {119611, "TOPLEFT", {0, 0}, {.8, .4, .8}}, --Renewing Mist
  109.                 {116849, "TOPRIGHT", {0, 0}, {.2, .8, .2}}, -- Life Cocoon
  110.                 {124682, "BOTTOMLEFT", {0, 0}, {.4, .8, .2}}, -- Enveloping Mist
  111.                 {124081, "BOTTOMRIGHT", {0, 0}, {.7, .4, 0}}, -- Zen Sphere
  112.             },
  113.             ALL = {
  114.                 {14253, "RIGHT", {0, 0}, {0, 1, 0}}, -- Abolish Poison
  115.             },
  116.         }
  117.     end
  118. [Debufftable removed]
  119. end

If I forgot something or if you still need anything, just say modest and I submit the missing after.

Thanks in advance for all input

Last edited by liquidbase : 08-23-14 at 12:52 PM. Reason: Clicking to fast on Send is bad