From 4263ee83e107ed434f68827225f73c62c162aeac Mon Sep 17 00:00:00 2001 From: shagu Date: Sun, 30 Sep 2018 14:47:51 +0200 Subject: [PATCH] nameplates: fix index of UnitDebuff timers --- modules/nameplates.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/nameplates.lua b/modules/nameplates.lua index d1ec64f4..c42713a7 100644 --- a/modules/nameplates.lua +++ b/modules/nameplates.lua @@ -627,14 +627,14 @@ pfUI:RegisterModule("nameplates", function () this.debuffs[j].icon:SetTexture(icon) this.debuffs[j].icon:SetTexCoord(.078, .92, .079, .937) - if name and libdebuff then + if icon then this.debuffs[j].cd = this.debuffs[j].cd or CreateFrame("Model", nil, this.debuffs[j], "CooldownFrameTemplate") this.debuffs[j].cd.pfCooldownType = "ALL" - local name, rank, texture, stacks, dtype, duration, timeleft = libdebuff:UnitDebuff("target", i) + local name, rank, texture, stacks, dtype, duration, timeleft = libdebuff:UnitDebuff("target", j) if duration and timeleft then this.debuffs[j].cd:SetAlpha(0) - CooldownFrame_SetTimer(this.debuffs[i].cd, GetTime() + timeleft - duration, duration, 1) + CooldownFrame_SetTimer(this.debuffs[j].cd, GetTime() + timeleft - duration, duration, 1) end end