Hook - DamageProjector:final - how to get target

All development conversation and discussion takes place here

Moderator: Moderator

Post Reply
Message
Author
MisiuPysiu
Archmage
Posts: 379
Joined: Tue Nov 11, 2003 10:54 am
Location: Wroclaw/Poland

Hook - DamageProjector:final - how to get target

#1 Post 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.

MisiuPysiu
Archmage
Posts: 379
Joined: Tue Nov 11, 2003 10:54 am
Location: Wroclaw/Poland

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

#2 Post by MisiuPysiu »

Nevermind,

I found it:)

Post Reply