Thread Tools Display Modes
01-18-05, 11:58 AM   #1
bahzeel
A Deviate Faerie Dragon
Join Date: Jan 2005
Posts: 10
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:

CHAT_MSG_COMBAT_CREATURE_VS_SELF_HITS
Fires when a creature does melee damage to the player.
CHAT_MSG_COMBAT_HOSTILEPLAYER_HITS
Fires when a hostile realm player does melee damage to you (duels for same realm?)
CHAT_MSG_SPELL_CREATURE_VS_SELF_DAMAGE
Fires when a creature hits you with a damaging spell.
CHAT_MSG_SPELL_HOSTILEPLAYER_DAMAGE
Fires when a hostile realm player hits you with a spell (duels?).
CHAT_MSG_SPELL_PERIODIC_SELF_DAMAGE
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!
  Reply With Quote
01-18-05, 12:31 PM   #2
Cide
Swedeheart
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 96
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).").
__________________
CTMod Developer
  Reply With Quote
01-18-05, 01:08 PM   #3
bahzeel
A Deviate Faerie Dragon
Join Date: Jan 2005
Posts: 10
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!
  Reply With Quote
01-18-05, 02:31 PM   #4
Cide
Swedeheart
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 96
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 .
__________________
CTMod Developer
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Game Events for damage dealt to player

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off