summaryrefslogtreecommitdiff
path: root/src/map/mob.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/mob.cpp')
-rw-r--r--src/map/mob.cpp13
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);