WoWInterface (
-   Lua/XML Help (
-   -   Game Events for damage dealt to player (

bahzeel 01-18-05 11:58 AM

Game Events for damage dealt to player
Hi all,

I'm at work, so I can't try these out for myself just yet. So I'm seeing how far I can get before I get some time tonight to try this out.

Looking through the game events, it looks like the list of events that will fire when you are damaged are:

Fires when a creature does melee damage to the player.
Fires when a hostile realm player does melee damage to you (duels for same realm?)
Fires when a creature hits you with a damaging spell.
Fires when a hostile realm player hits you with a spell (duels?).
Fires when a DoT applied to you ticks.
I've seen damage shield related events in the list also, but none of them seem quite right to handle a damage shield on a creature that you are beating on. For now, I'm assuming those events are handled as CHAT_MSG_COMBAT_CREATURE_VS_SELF_HITS events, but if anybody knows or strongly suspects differently, I'd love to hear about it.

Also, if you can think of any events I've missed, please let me know.

Thanks for looking this over!

Cide 01-18-05 12:31 PM

Pretty sure arg1 is the combat log text. As for damage shield, I believe the same events fire, but the chat message is changed. I know that when you're hit but absorbs less than the full damage(ie the damage shield "expired" during that hit, without absoring all damage), it adds "(X absorbed)" to the normal chat message(example: "Mob hits you for 15 (5 absorbed).").

bahzeel 01-18-05 01:08 PM

Ahh - that's something I hadn't considered - that damage shield actually refers to things like the Priest's absorb shield.

I've been assuming that the events referring to damage shield actually referred to things like the Shaman's Lightning Shield or Druid Thorns (things that do damage to the person doing the hitting when they hit).

It'll take some testing with my priest to get soem of those partially absorbed blows recorded to see how to get the actual damage into the DPS Taken. For now though, I'm hoping that absorbed damage is ignored (so a Priest who shields at the start of the fight and kills before the shield expires will show DPS Taken of 0).

Your comment Cide does start opening up the Pandora's Box of all the different flavors and options that a DPS Taken mod could start tracking and reporting. At least for now, my interest is in the end result after everything that helps defense is applied, so it boils down to DPS Taken.

But misses and miss rate, blocks / block rate, dodges / dodge rate - omg the list can go on and on :) Those will be for somebody else to do!

Cide 01-18-05 02:31 PM

You don't have to subtract the absorbed damage from the "Hits you for X". It's already calculated, so all you have to do is use this regexp:

".+ hits you for (%d+).*" and it will accept both "non-absorb messages" and "absorb" messages".

Please ask if you need any more help :).

All times are GMT -6. The time now is 09:13 PM.

vBulletin © 2020, Jelsoft Enterprises Ltd
© 2004 - 2019 MMOUI