diff options
author | mekolat <mekolat@users.noreply.github.com> | 2016-03-24 15:10:40 -0400 |
---|---|---|
committer | mekolat <mekolat@users.noreply.github.com> | 2016-04-15 11:47:28 -0400 |
commit | 2a581450a6ff87c5a183be3855e68b3f2e1b53f3 (patch) | |
tree | 7caf4a3c16fa11b92d5cbaf5881d0829aa75b9dc /src/map/mob.cpp | |
parent | 6eb63903cd839b2c0dbf3acefceee4ba7b07b0f8 (diff) | |
download | tmwa-2a581450a6ff87c5a183be3855e68b3f2e1b53f3.tar.gz tmwa-2a581450a6ff87c5a183be3855e68b3f2e1b53f3.tar.bz2 tmwa-2a581450a6ff87c5a183be3855e68b3f2e1b53f3.tar.xz tmwa-2a581450a6ff87c5a183be3855e68b3f2e1b53f3.zip |
improvements, cleanup, bug fixes
Diffstat (limited to 'src/map/mob.cpp')
-rw-r--r-- | src/map/mob.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/map/mob.cpp b/src/map/mob.cpp index 1be40f0..0da946a 100644 --- a/src/map/mob.cpp +++ b/src/map/mob.cpp @@ -2701,7 +2701,6 @@ int mob_damage(dumb_ptr<block_list> src, dumb_ptr<mob_data> md, int damage, } // [MouseJstr] // SCRIPT実行 - if (md->npc_event) { if (sd == nullptr) { @@ -2711,7 +2710,17 @@ int mob_damage(dumb_ptr<block_list> src, dumb_ptr<mob_data> md, int damage, } } if (sd) - npc_event(sd, md->npc_event, 0); + { + if (md->npc_event) + npc_event(sd, md->npc_event, 0); + + // TODO: in the future, OnPCKillEvent, OnMobKillEvent and OnPCDieEvent should be combined + argrec_t arg[1] = + { + {"@mobID"_s, static_cast<int32_t>(unwrap<Species>(md->mob_class))}, + }; + npc_event_doall_l(stringish<ScriptLabel>("OnMobKillEvent"_s), sd->bl_id, arg); + } } clif_clearchar(md, BeingRemoveWhy::DEAD); |