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?)