Openkore.com
http://forums.openkore.com/

[Source] Edit hook: 'target_died'
http://forums.openkore.com/viewtopic.php?f=29&t=18950
Page 1 of 1

Author:  Spherical [ 09 Jan 2013, 02:38 ]
Post subject:  [Source] Edit hook: 'target_died'

I suggest that we edit the following hook call:
Code:
#src\AI\attack.pm line 167
      Plugins::callHook("target_died");

To the following:
Code:
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?)

Author:  EternalHarvest [ 06 May 2013, 04:13 ]
Post subject:  Re: [Source] Edit hook: 'target_died'

Good idea.

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/