mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 22:51:53 -05:00
- only show Lacerates if they were applied to the target by the player (not by other players); had problems with bear tank + feral dps in the same group
- made the same change to SunderCount's version of the debuff function, but didn't set it to restrict to the player
This commit is contained in:
@ -203,15 +203,15 @@ function LacerateCount.prototype:CreateLacerateFrame()
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function LacerateCount.prototype:GetDebuffCount(unit, ability)
|
function LacerateCount.prototype:GetDebuffCount(unit, ability, onlyMine)
|
||||||
for i = 1, MAX_DEBUFF_COUNT do
|
for i = 1, MAX_DEBUFF_COUNT do
|
||||||
local name, _, texture, applications = UnitDebuff(unit, i)
|
local name, _, texture, applications, _, duration = UnitDebuff(unit, i)
|
||||||
|
|
||||||
if not texture then
|
if not texture then
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
|
||||||
if string.match(texture, ability) then
|
if string.match(texture, ability) and (not onlyMine or duration) then
|
||||||
return applications
|
return applications
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -221,7 +221,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
function LacerateCount.prototype:UpdateLacerateCount()
|
function LacerateCount.prototype:UpdateLacerateCount()
|
||||||
local points = self:GetDebuffCount("target", "Ability_Druid_Lacerate")
|
local points = self:GetDebuffCount("target", "Ability_Druid_Lacerate", true)
|
||||||
|
|
||||||
if (points == 0) then
|
if (points == 0) then
|
||||||
points = nil
|
points = nil
|
||||||
|
@ -203,15 +203,15 @@ function SunderCount.prototype:CreateSunderFrame()
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function SunderCount.prototype:GetDebuffCount(unit, ability)
|
function SunderCount.prototype:GetDebuffCount(unit, ability, onlyMine)
|
||||||
for i = 1, MAX_DEBUFF_COUNT do
|
for i = 1, MAX_DEBUFF_COUNT do
|
||||||
local name, _, texture, applications = UnitDebuff(unit, i)
|
local name, _, texture, applications, _, duration = UnitDebuff(unit, i)
|
||||||
|
|
||||||
if not texture then
|
if not texture then
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
|
||||||
if string.match(texture, ability) then
|
if string.match(texture, ability) and (not onlyMine or duration) then
|
||||||
return applications
|
return applications
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user