Adds var 'killedrid' to script monster OnKillEvents. (Closes #1278)
This commit is contained in:
parent
2b61f45a94
commit
5b35e1afd0
@ -5628,7 +5628,8 @@ The only very special thing about this command is an event label, which is an
|
||||
optional parameter. This label is written like '<NPC object name>::<label name>'
|
||||
and upon the monster being killed, it will execute the script inside of the
|
||||
specified NPC object starting from the label given. The RID of the player
|
||||
attached at this execution will be the RID of the killing character.
|
||||
attached at this execution will be the RID of the killing character. The variable
|
||||
'killedrid' is set to the Class (mob ID) of the monster killed.
|
||||
|
||||
<size> can be:
|
||||
0 = medium (default)
|
||||
|
@ -2790,9 +2790,11 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
|
||||
|
||||
if( md->npc_event[0] && !md->state.npc_killmonster ) {
|
||||
if( sd && battle_config.mob_npc_event_type ) {
|
||||
pc_setparam(sd, SP_KILLEDRID, md->mob_id);
|
||||
pc_setparam(sd, SP_KILLERRID, sd->bl.id);
|
||||
npc_event(sd,md->npc_event,0);
|
||||
} else if( mvp_sd ) {
|
||||
pc_setparam(mvp_sd, SP_KILLEDRID, md->mob_id);
|
||||
pc_setparam(mvp_sd, SP_KILLERRID, sd?sd->bl.id:0);
|
||||
npc_event(mvp_sd,md->npc_event,0);
|
||||
} else
|
||||
|
Loading…
x
Reference in New Issue
Block a user