Permalink
Browse files

Fix dps reset

  • Loading branch information...
1 parent f5d3a3e commit ffe14f4a5696f95546c3a46c7954627c9e2421e3 @Zariel committed Jan 7, 2011
Showing with 13 additions and 3 deletions.
  1. +1 −1 Fiend.toc
  2. +12 −2 display.lua
View
@@ -1,4 +1,4 @@
-## Interface: 305000
+## Interface: 400000
## Title: Fiend
## Notes: Tracks Damage, Healing, Overhealing. And some DPS for fun.
View
@@ -104,6 +104,12 @@ if(fiend.trackDPS) then
return total
end
+
+ function View:ResetDPS()
+ for k, v in pairs(self.dps) do
+ v.reset = true
+ end
+ end
end
function View:Update(guid, ammount, name)
@@ -189,6 +195,10 @@ function View:UpdateDisplay()
end
function View:RemoveAllBars()
+ if(self.dps) then
+ self:ResetDPS()
+ end
+
local bar
for i = 1, #self.bars do
bar = table.remove(self.bars, 1)
@@ -454,7 +464,7 @@ function Display:NewView(title, events, size, bg, color, dps)
if(fiend.trackDPS) then
t.dps = setmetatable({}, dpsMeta)
- if dps then
+ if(dps) then
t.showDPS = true
end
elseif(dps) then
@@ -587,7 +597,7 @@ function Display:ToolTip()
text = L["Reset"],
owner = drop,
func = function()
- if self.currentView then
+ if(self.currentView) then
self.currentView:RemoveAllBars()
end
end,

0 comments on commit ffe14f4

Please sign in to comment.