This commit is contained in:
Bunny67
2018-06-02 09:42:43 +03:00
parent 8c23ccd523
commit 3578bd7521
5 changed files with 27 additions and 29 deletions
+6 -6
View File
@@ -14,8 +14,8 @@ local GetItemInfo = GetItemInfo
local GetQuestGreenRange = GetQuestGreenRange local GetQuestGreenRange = GetQuestGreenRange
local GetRealZoneText = GetRealZoneText local GetRealZoneText = GetRealZoneText
local IsInInstance = IsInInstance local IsInInstance = IsInInstance
local UnitBuff = UnitBuff --local UnitBuff = UnitBuff
local UnitDebuff = UnitDebuff --local UnitDebuff = UnitDebuff
local UnitLevel = UnitLevel local UnitLevel = UnitLevel
--WoW Variables --WoW Variables
local DUNGEON_DIFFICULTY1 = DUNGEON_DIFFICULTY1 local DUNGEON_DIFFICULTY1 = DUNGEON_DIFFICULTY1
@@ -145,11 +145,11 @@ function UnitAura(unit, i, filter)
end end
if not filter or match(filter, "(HELPFUL)") then if not filter or match(filter, "(HELPFUL)") then
local name, rank, aura, count, duration, maxDuration = UnitBuff(unit, i, filter) local texture, count = UnitBuff(unit, i, filter)
return name, rank, aura, count, nil, duration or 0, maxDuration or 0 return texture, count
else else
local name, rank, aura, count, dType, duration, maxDuration = UnitDebuff(unit, i, filter) local texture, count, dType = UnitDebuff(unit, i, filter)
return name, rank, aura, count, dType, duration or 0, maxDuration or 0 return texture, count, dType
end end
end end
+4 -4
View File
@@ -138,8 +138,8 @@ local function createAuraIcon(element, index)
return button return button
end end
local function customFilter(element, unit, button, name) local function customFilter(element, unit, button, texture)
if name then return true end if texture then return true end
end end
local function updateIcon(element, unit, index, offset, filter, isDebuff, visible) local function updateIcon(element, unit, index, offset, filter, isDebuff, visible)
@@ -156,7 +156,7 @@ local function updateIcon(element, unit, index, offset, filter, isDebuff, visibl
end end
if element.forceShow then if element.forceShow then
name, rank, texture = GetSpellInfo(26993) texture = "Interface\\Icons\\Spell_Holy_DivineSpirit"
count, dispelType, duration, expiration = 5, 'Magic', 0, 60 count, dispelType, duration, expiration = 5, 'Magic', 0, 60
end end
@@ -198,7 +198,7 @@ local function updateIcon(element, unit, index, offset, filter, isDebuff, visibl
--]] --]]
local show = true local show = true
if not element.forceShow then if not element.forceShow then
-- show = (element.CustomFilter or customFilter) (element, unit, button, name, rank, texture, count, dispelType, duration, expiration) show = (element.CustomFilter or customFilter) (element, unit, button, texture, count, dispelType, duration, expiration)
end end
if not show then return HIDDEN end if not show then return HIDDEN end
+17 -17
View File
@@ -445,7 +445,7 @@ function UF:UpdateAuraTimer(elapsed)
end end
end end
function UF:AuraFilter(unit, button, name, _, _, _, dispelType, duration, expiration, caster, isStealable, _, spellID) function UF:AuraFilter(unit, button, texture, count, dispelType, duration, expiration)
local db = self:GetParent().db local db = self:GetParent().db
if not db or not db[self.type] then return true end if not db or not db[self.type] then return true end
@@ -491,10 +491,10 @@ function UF:UpdateBuffsHeaderPosition()
if numDebuffs == 0 then if numDebuffs == 0 then
buffs:ClearAllPoints() buffs:ClearAllPoints()
buffs:Point(debuffs.point, debuffs.attachTo, debuffs.anchorPoint, debuffs.xOffset, debuffs.yOffset) E:Point(buffs, debuffs.point, debuffs.attachTo, debuffs.anchorPoint, debuffs.xOffset, debuffs.yOffset)
else else
buffs:ClearAllPoints() buffs:ClearAllPoints()
buffs:Point(buffs.point, buffs.attachTo, buffs.anchorPoint, buffs.xOffset, buffs.yOffset) E:Point(buffs, buffs.point, buffs.attachTo, buffs.anchorPoint, buffs.xOffset, buffs.yOffset)
end end
end end
@@ -506,10 +506,10 @@ function UF:UpdateDebuffsHeaderPosition()
if numBuffs == 0 then if numBuffs == 0 then
debuffs:ClearAllPoints() debuffs:ClearAllPoints()
debuffs:Point(buffs.point, buffs.attachTo, buffs.anchorPoint, buffs.xOffset, buffs.yOffset) E:Point(debuff, sbuffs.point, buffs.attachTo, buffs.anchorPoint, buffs.xOffset, buffs.yOffset)
else else
debuffs:ClearAllPoints() debuffs:ClearAllPoints()
debuffs:Point(debuffs.point, debuffs.attachTo, debuffs.anchorPoint, debuffs.xOffset, debuffs.yOffset) E:Point(debuff, sdebuffs.point, debuffs.attachTo, debuffs.anchorPoint, debuffs.xOffset, debuffs.yOffset)
end end
end end
@@ -522,17 +522,17 @@ function UF:UpdateBuffsPositionAndDebuffHeight()
if numDebuffs == 0 then if numDebuffs == 0 then
buffs:ClearAllPoints() buffs:ClearAllPoints()
buffs:Point(debuffs.point, debuffs.attachTo, debuffs.anchorPoint, debuffs.xOffset, debuffs.yOffset) E:Point(buffs, debuffs.point, debuffs.attachTo, debuffs.anchorPoint, debuffs.xOffset, debuffs.yOffset)
else else
buffs:ClearAllPoints() buffs:ClearAllPoints()
buffs:Point(buffs.point, buffs.attachTo, buffs.anchorPoint, buffs.xOffset, buffs.yOffset) E:Point(buffs, buffs.point, buffs.attachTo, buffs.anchorPoint, buffs.xOffset, buffs.yOffset)
end end
if numDebuffs > 0 then if numDebuffs > 0 then
local numRows = ceil(numDebuffs/db.debuffs.perrow) local numRows = ceil(numDebuffs/db.debuffs.perrow)
debuffs:Height(debuffs.size * (numRows > db.debuffs.numrows and db.debuffs.numrows or numRows)) E:Height(debuffs, debuffs.size * (numRows > db.debuffs.numrows and db.debuffs.numrows or numRows))
else else
debuffs:Height(debuffs.size) E:Height(debuffs, debuffs.size)
end end
end end
@@ -545,17 +545,17 @@ function UF:UpdateDebuffsPositionAndBuffHeight()
if numBuffs == 0 then if numBuffs == 0 then
debuffs:ClearAllPoints() debuffs:ClearAllPoints()
debuffs:Point(buffs.point, buffs.attachTo, buffs.anchorPoint, buffs.xOffset, buffs.yOffset) E:Point(debuffs, buffs.point, buffs.attachTo, buffs.anchorPoint, buffs.xOffset, buffs.yOffset)
else else
debuffs:ClearAllPoints() debuffs:ClearAllPoints()
debuffs:Point(debuffs.point, debuffs.attachTo, debuffs.anchorPoint, debuffs.xOffset, debuffs.yOffset) E:Point(debuffs, debuffs.point, debuffs.attachTo, debuffs.anchorPoint, debuffs.xOffset, debuffs.yOffset)
end end
if numBuffs > 0 then if numBuffs > 0 then
local numRows = ceil(numBuffs/db.buffs.perrow) local numRows = ceil(numBuffs/db.buffs.perrow)
buffs:Height(buffs.size * (numRows > db.buffs.numrows and db.buffs.numrows or numRows)) E:Height(buffs, buffs.size * (numRows > db.buffs.numrows and db.buffs.numrows or numRows))
else else
buffs:Height(buffs.size) E:Height(buffs, buffs.size)
end end
end end
@@ -567,9 +567,9 @@ function UF:UpdateBuffsHeight()
if numBuffs > 0 then if numBuffs > 0 then
local numRows = ceil(numBuffs/db.buffs.perrow) local numRows = ceil(numBuffs/db.buffs.perrow)
buffs:Height(buffs.size * (numRows > db.buffs.numrows and db.buffs.numrows or numRows)) E:Height(buffs, buffs.size * (numRows > db.buffs.numrows and db.buffs.numrows or numRows))
else else
buffs:Height(buffs.size) E:Height(buffs, buffs.size)
-- Any way to get rid of the last row as well? -- Any way to get rid of the last row as well?
-- Using buffs:SetHeight(0) makes frames anchored to this one disappear -- Using buffs:SetHeight(0) makes frames anchored to this one disappear
end end
@@ -583,9 +583,9 @@ function UF:UpdateDebuffsHeight()
if numDebuffs > 0 then if numDebuffs > 0 then
local numRows = ceil(numDebuffs/db.debuffs.perrow) local numRows = ceil(numDebuffs/db.debuffs.perrow)
debuffs:Height(debuffs.size * (numRows > db.debuffs.numrows and db.debuffs.numrows or numRows)) E:Height(debuffs, debuffs.size * (numRows > db.debuffs.numrows and db.debuffs.numrows or numRows))
else else
debuffs:Height(debuffs.size) E:Height(debuffs, debuffs.size)
-- Any way to get rid of the last row as well? -- Any way to get rid of the last row as well?
-- Using debuffs:SetHeight(0) makes frames anchored to this one disappear -- Using debuffs:SetHeight(0) makes frames anchored to this one disappear
end end
@@ -28,7 +28,6 @@ function UF:Construct_PlayerFrame(frame)
frame.RaidTargetIndicator = UF:Construct_RaidIcon(frame) frame.RaidTargetIndicator = UF:Construct_RaidIcon(frame)
frame.RestingIndicator = self:Construct_RestingIndicator(frame) frame.RestingIndicator = self:Construct_RestingIndicator(frame)
frame.CombatIndicator = self:Construct_CombatIndicator(frame) frame.CombatIndicator = self:Construct_CombatIndicator(frame)
frame.AuraBars = self:Construct_AuraBarHeader(frame)
frame.InfoPanel = self:Construct_InfoPanel(frame) frame.InfoPanel = self:Construct_InfoPanel(frame)
frame:SetPoint("BOTTOMLEFT", E.UIParent, "BOTTOM", -413, 68) frame:SetPoint("BOTTOMLEFT", E.UIParent, "BOTTOM", -413, 68)
@@ -25,7 +25,6 @@ function UF:Construct_TargetFrame(frame)
frame.RaidTargetIndicator = UF:Construct_RaidIcon(frame) frame.RaidTargetIndicator = UF:Construct_RaidIcon(frame)
frame.GPS = self:Construct_GPS(frame) frame.GPS = self:Construct_GPS(frame)
frame.InfoPanel = self:Construct_InfoPanel(frame) frame.InfoPanel = self:Construct_InfoPanel(frame)
frame.AuraBars = self:Construct_AuraBarHeader(frame)
E:Point(frame, "BOTTOMRIGHT", E.UIParent, "BOTTOM", 413, 68) E:Point(frame, "BOTTOMRIGHT", E.UIParent, "BOTTOM", 413, 68)
E:CreateMover(frame, frame:GetName().."Mover", L["Target Frame"], nil, nil, nil, "ALL,SOLO") E:CreateMover(frame, frame:GetName().."Mover", L["Target Frame"], nil, nil, nil, "ALL,SOLO")