- 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:
Parnic
2008-08-10 03:10:53 +00:00
parent 9ee0b435c1
commit 3edac3cacd
2 changed files with 7 additions and 7 deletions

View File

@ -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

View File

@ -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