Page 1 of 1

Hook - DamageProjector:final - how to get target

Posted: Tue Oct 22, 2013 2:52 pm
by MisiuPysiu
Hi there,

In the wiki i read:

DamageProjector:final

/data/damage_types.lua/setDefaultProjector

data = { src=src, x=x, y=y, type=type, dam=dam}
my question is, how can i get the target based on x and y so i can do things to the target, like activating a buff for instance:

Code: Select all

if not target.dead and dam > 0 and target:attr("might_in_pain") and not target:hasEffect(target.EFF_MIGHT_IN_PAIN) and type == "BLEED"
	then
	target:setEffect(target.EFF_MIGHT_IN_PAIN, target:callTalent(target.T_MIGHT_IN_PAIN, "getDuration"), {power=target:attr("might_in_pain"), type=type, no_ct_effect=true})			
	end

Cheers.

Re: Hook - DamageProjector:final - how to get target

Posted: Tue Oct 22, 2013 3:26 pm
by MisiuPysiu
Nevermind,

I found it:)