Page 1 of 1

How to tell how someone died

Posted: Wed May 29, 2013 3:23 am
by Castler
I'm trying to trigger special effects based on how a monster was killed (so a main-hand attack triggers one effect, an off-hand attack triggers a different effects, talents and DoTs a third effect, etc.).

It looks like I could make up a last_damage_source field and set it as appropriate in preUseTalent, attackTarget, timedEffects, etc., then check it in die or on_die. But I don't know if I'm missing anything or if there's a cleaner solution.

Ideas or suggestions?

Thanks.

Re: How to tell how someone died

Posted: Wed May 29, 2013 6:48 am
by lukep
A different solution would be to put in in Combat.lua (and elsewhere). You would just add checks for "if target.dead then" at the appropriate points.

Re: How to tell how someone died

Posted: Wed May 29, 2013 12:37 pm
by darkgod
Your solution sounds about right, since it's your own module you do control everything so should work.