buff: make sure to create backdrop first

This commit is contained in:
shagu
2020-06-07 12:18:30 +02:00
parent 7b8a036aa0
commit 6a8549e103
+5 -5
View File
@@ -17,6 +17,11 @@ pfUI:RegisterModule("buff", "vanilla:tbc", function ()
end
buff.bid = GetPlayerBuff(PLAYER_BUFF_START_ID+buff.id, buff.btype)
if not buff.backdrop then
CreateBackdrop(buff)
CreateBackdropShadow(buff)
end
--detect weapon buffs
if buff.btype == "HELPFUL" and ((C.buffs.separateweapons == "0" and buff.gid <= pfUI.buff.wepbuffs.count) or (pfUI.buff.wepbuffs.count > 0 and buff.weapon ~= nil)) then
local mh, mhtime, mhcharge, oh, ohtime, ohcharge = GetWeaponEnchantInfo()
@@ -52,11 +57,6 @@ pfUI:RegisterModule("buff", "vanilla:tbc", function ()
buff.mode = buff.btype
buff.texture:SetTexture(GetPlayerBuffTexture(buff.bid))
if not buff.backdrop then
CreateBackdrop(buff)
CreateBackdropShadow(buff)
end
if buff.btype == "HARMFUL" then
local dtype = GetPlayerBuffDispelType(buff.bid)
if dtype == "Magic" then