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,293
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-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
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-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-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, 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-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-21-09, 10:41 AM  
Mickelus
A Murloc Raider
AddOn Author - Click to view AddOns

Forum posts: 4
File comments: 117
Uploads: 8
Ah yes, uploaded a new version that hopefully fixed it(or I just caused more problems). I can't log on to test it myself so you have to tell me if it works ^^
Report comment to moderator  
Reply With Quote
Unread 08-21-09, 11:58 AM  
xJ3x
A Kobold Labourer
 
xJ3x's Avatar

Forum posts: 0
File comments: 8
Uploads: 0
Fixed it for me, thanks.
Report comment to moderator  
Reply With Quote
Unread 09-20-09, 01:47 PM  
Namica
A Kobold Labourer
 
Namica's Avatar

Forum posts: 0
File comments: 169
Uploads: 0
Works fine, simple and useful, thanks!
Report comment to moderator  
Reply With Quote
Unread 09-20-09, 04:17 PM  
Mickelus
A Murloc Raider
AddOn Author - Click to view AddOns

Forum posts: 4
File comments: 117
Uploads: 8
C=
Report comment to moderator  
Reply With Quote
Unread 10-23-09, 09:41 PM  
Sintacks
A Murloc Raider

Forum posts: 4
File comments: 121
Uploads: 0
Does anyone know of a way to get the report to display with MikScrollingCombatText in the Notification frame?
Report comment to moderator  
Reply With Quote
Unread 10-24-09, 04:51 AM  
Mickelus
A Murloc Raider
AddOn Author - Click to view AddOns

Forum posts: 4
File comments: 117
Uploads: 8
In the damagereport folder there is a file called moon.lua, open it up with a text editor. On line 11 and 12 change _G[dmgrprtsv]:AddMessage to MikSBT.DisplayMessage
Last edited by Mickelus : 10-24-09 at 04:57 AM.
Report comment to moderator  
Reply With Quote
Unread 11-07-09, 10:12 PM  
KleinerMink
A Deviate Faerie Dragon

Forum posts: 11
File comments: 70
Uploads: 0
Very nice and minimalistic!

It doesn't work with the training puppets in the capital cities though...

Another question: Does it count in pet damage?
Last edited by KleinerMink : 11-07-09 at 10:13 PM.
Report comment to moderator  
Reply With Quote
Unread 11-08-09, 07:00 AM  
Mickelus
A Murloc Raider
AddOn Author - Click to view AddOns

Forum posts: 4
File comments: 117
Uploads: 8
It should count pet damage.
Report comment to moderator  
Reply With Quote
Unread 11-08-09, 08:17 AM  
KleinerMink
A Deviate Faerie Dragon

Forum posts: 11
File comments: 70
Uploads: 0
Originally posted by Mickelus
It should count pet damage.
Great and what about training puppets?
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: