Download
(18Kb)
Download
Updated: 12-11-14 05:49 PM
Pictures
File Info
Compatibility:
Warlords of Draenor (6.0.3)
Warlords of Draenor Pre-Patch (6.0.2)
Updated:12-11-14 05:49 PM
Created:08-19-09 05:31 PM
Downloads:4,301
Favorites:18
MD5:

damagereport

Version: 4
by: Mickelus [More]

Reports duration of combat, damage dealt and dps to the frame of your choice when you exit combat. IT should be pretty lightweight compared to most damage meters since it makes use of statistics instead of combat log events.

By default this reports to UIErrorsFrame, that can be changed with this:

Code:
/run dmgrprtsv="frame"
where frame can be any frame with an AddMessage method.

Here's a few frames you may use:
UIErrorsFrame,
ChatFrame1,
ChatFrame2,
ChatFrame3
These might also work:
noticeFrame,
RaidWarningFrame,
RaidBossEmoteFrame

/run dmgrprtsv="ChatFrame1" for example.

There's a git repository hosted over at github, feel free to contribute, or submit bug reports and feature requests.

Release 4:
- updated interface number
- code cleanup
Optional Files (0)


Post A Reply Comment Options
Unread 08-21-09, 09:32 AM  
xJ3x
A Kobold Labourer
 
xJ3x's Avatar

Forum posts: 0
File comments: 8
Uploads: 0
Not sure why I'm getting this

Message: Interface\AddOns\damagereport\moon.lua:11: attempt to perform arithmetic on global 'vistime' (a nil value)
Time: 08/21/09 10:30:33
Count: 2
Stack: [string "Interface\FrameXML\BasicControls.xml:<Scrip..."]:18: in function <[string "Interface\FrameXML\BasicControls.xml:<Scrip..."]:4>
(tail call): ?
[C]: ?
Interface\AddOns\damagereport\moon.lua:11: in function `?'
Interface\AddOns\damagereport\moon.lua:16: in function <Interface\AddOns\damagereport\moon.lua:14>

Locals:
Report comment to moderator  
Reply With Quote
Unread 08-20-09, 06:53 AM  
Mickelus
A Murloc Raider
AddOn Author - Click to view AddOns

Forum posts: 4
File comments: 117
Uploads: 8
Originally posted by Dawn
If you want to print it to the ChatFrame1 as well, just add

Code:
ChatFrame1:AddMessage(((GetStatistic(197)-damage)>0) and ((GetStatistic(197)-damage).." damage dealt at "..(floor((GetStatistic(197)-damage)/(vistime-time))).." dps"))
ChatFrame1:AddMessage("Combat lasted: "..((floor((vistime-time)/60)>0) and ((floor((vistime-time)/60)).."m "..(floor((vistime-time)%60)).."s") or floor((vistime-time)).."s"))
and leave everything else as is.

Btw, How do I add Healing done? *AAAARGH feature request inc*
you need the statistic id for healing done, I'm out of gametime so you have to check for yourself. I hooked GetStatistic to get the id for damage done, perhaps you could do the same for healing done. Try something like this:

local funky = GetStatistic
hooksecurefunc(GetStatistic, function(id)
print(id, funky(id))
end)

Then open up the statistics frame and make your healing done show.
Now search trough your chat for an id followed by a value that's the same as your healing done. Then change 197 in every GetStatistic(197) you find to the id you got earlier. If you find an easier way to do this please let me know.
And I updated it by the way, so now you can pretty easily change what frame you want it to report to.
Report comment to moderator  
Reply With Quote
Unread 08-20-09, 06:05 AM  
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view AddOns

Forum posts: 918
File comments: 959
Uploads: 22
Originally posted by Purity
I would much rather it be printed to the chatframe1 as well. Please let me know if that change works.
If you want to print it to the ChatFrame1 as well, just add

Code:
ChatFrame1:AddMessage(((GetStatistic(197)-damage)>0) and ((GetStatistic(197)-damage).." damage dealt at "..(floor((GetStatistic(197)-damage)/(vistime-time))).." dps"))
ChatFrame1:AddMessage("Combat lasted: "..((floor((vistime-time)/60)>0) and ((floor((vistime-time)/60)).."m "..(floor((vistime-time)%60)).."s") or floor((vistime-time)).."s"))
and leave everything else as is.

Btw, How do I add Healing done? *AAAARGH feature request inc*
Report comment to moderator  
Reply With Quote
Unread 08-20-09, 05:14 AM  
Mickelus
A Murloc Raider
AddOn Author - Click to view AddOns

Forum posts: 4
File comments: 117
Uploads: 8
Originally posted by Dawn
Nice, I always liked such a small summary at the end of a fight from eavesdrop.

Just curious, if I would want to show that in ChatFrame1 instead of the Error Frame. Would it be sufficient to use:

Code:
function f.PLAYER_REGEN_ENABLED()
ChatFrame1:AddMessage(((GetStatistic(197)-damage)>0) and ((GetStatistic(197)-damage).." damage dealt at "..(floor((GetStatistic(197)-damage)/(vistime-time))).." dps"))
ChatFrame1:AddMessage("Combat lasted: "..((floor((vistime-time)/60)>0) and ((floor((vistime-time)/60)).."m "..(floor((vistime-time)%60)).."s") or floor((vistime-time)).."s"))
end

and getting rid of
Code:
hooksecurefunc(UIErrorsFrame, "AddMessage", function()
if fix and vistime+5<GetTime() then
	fix=nil
	UIErrorsFrame:SetTimeVisible(2)
end
end)
?
I think so C=
Report comment to moderator  
Reply With Quote
Unread 08-19-09, 08:02 PM  
Purity
A Deviate Faerie Dragon

Forum posts: 16
File comments: 170
Uploads: 0
I would much rather it be printed to the chatframe1 as well. Please let me know if that change works.
__________________
Report comment to moderator  
Reply With Quote
Unread 08-19-09, 06:50 PM  
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view AddOns

Forum posts: 918
File comments: 959
Uploads: 22
Nice, I always liked such a small summary at the end of a fight from eavesdrop.

Just curious, if I would want to show that in ChatFrame1 instead of the Error Frame. Would it be sufficient to use:

Code:
function f.PLAYER_REGEN_ENABLED()
ChatFrame1:AddMessage(((GetStatistic(197)-damage)>0) and ((GetStatistic(197)-damage).." damage dealt at "..(floor((GetStatistic(197)-damage)/(vistime-time))).." dps"))
ChatFrame1:AddMessage("Combat lasted: "..((floor((vistime-time)/60)>0) and ((floor((vistime-time)/60)).."m "..(floor((vistime-time)%60)).."s") or floor((vistime-time)).."s"))
end

and getting rid of
Code:
hooksecurefunc(UIErrorsFrame, "AddMessage", function()
if fix and vistime+5<GetTime() then
	fix=nil
	UIErrorsFrame:SetTimeVisible(2)
end
end)
?
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: