Page 1 of 1

[Source] Edit hook: 'target_died'

Posted: 09 Jan 2013, 02:38
by Spherical
I suggest that we edit the following hook call:

Code: Select all

#src\AI\attack.pm line 167
		Plugins::callHook("target_died");
To the following:

Code: Select all

Plugins::callHook("target_died", {ID => $ID});
I understand that the hook Plugins::callHook('attack_end', {ID => $ID}) is also at the end of this function but it is called even if the target isn't dead. So I suggest either editing the attack_end to contain information regarding if the player killed it or not, or editing the target_died hook. (I guess you could call both $monsters_old{$ID}{dead} and $monsters_old{$ID} like it does just before the target_died hook call, but why on earth are there two hooks then?)

Re: [Source] Edit hook: 'target_died'

Posted: 06 May 2013, 04:13
by EternalHarvest
Good idea.