diff options
author | Fate <fate-tmw@googlemail.com> | 2009-05-30 19:23:53 +0000 |
---|---|---|
committer | Fate <fate-tmw@googlemail.com> | 2009-05-30 19:23:53 +0000 |
commit | ddfefa739951234c13144c58fe959faf917fa5cc (patch) | |
tree | b754925052aec69db2d864894e4803a37be6a3fc /src/map | |
parent | 21c2dceddb86302b4255f2a581b5c2092ef30806 (diff) | |
download | tmwa-ddfefa739951234c13144c58fe959faf917fa5cc.tar.gz tmwa-ddfefa739951234c13144c58fe959faf917fa5cc.tar.bz2 tmwa-ddfefa739951234c13144c58fe959faf917fa5cc.tar.xz tmwa-ddfefa739951234c13144c58fe959faf917fa5cc.zip |
Added documentation for several eAthena extensions. Moved OnPCKillEvent magic label to OnPCKilledEvent, added complementary OnPCKillEvent that is the same, except invoked on a killer RID context.
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/pc.c | 13 | ||||
-rw-r--r-- | src/map/script.c | 3 |
2 files changed, 10 insertions, 6 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index 84dc028..1d2f61a 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -5143,10 +5143,15 @@ int pc_damage(struct block_list *src,struct map_session_data *sd,int damage) if (src && src->type == BL_PC) { // [Fate] PK death, trigger scripts - argrec_t arg; - arg.name = "@killerrid"; - arg.v.i = src->id; - npc_event_doall_l("OnPCKillEvent", sd->bl.id, 1, &arg); + argrec_t arg[3]; + arg[0].name = "@killerrid"; + arg[0].v.i = src->id; + arg[1].name = "@victimrid"; + arg[1].v.i = sd->bl.id; + arg[2].name = "@victimlvl"; + arg[2].v.i = sd->status.base_level; + npc_event_doall_l("OnPCKilledEvent", sd->bl.id, 3, arg); + npc_event_doall_l("OnPCKillEvent", src->id, 3, arg); } npc_event_doall_l("OnPCDieEvent", sd->bl.id, 0, NULL); diff --git a/src/map/script.c b/src/map/script.c index e3f82d6..96ace2c 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -209,7 +209,7 @@ int buildin_hideonnpc(struct script_state *st); int buildin_sc_start(struct script_state *st); int buildin_sc_start2(struct script_state *st); int buildin_sc_end(struct script_state *st); -int buildin_sc_check(struct script_state *st); +int buildin_sc_check(struct script_state *st); // [Fate] int buildin_getscrate(struct script_state *st); int buildin_debugmes(struct script_state *st); int buildin_resetlvl(struct script_state *st); @@ -6430,7 +6430,6 @@ int run_script_l(unsigned char *script,int pos,int rid,int oid, int args_nr, arg struct map_session_data *sd=map_id2sd(rid); unsigned char *rootscript=script; int i; - if(script==NULL || pos<0) return -1; |