diff options
author | mekolat <mekolat@users.noreply.github.com> | 2015-06-24 21:36:28 -0400 |
---|---|---|
committer | mekolat <mekolat@users.noreply.github.com> | 2016-04-15 11:45:18 -0400 |
commit | e5c60513d5b9c41cdca5ff0c01023d9ef4eb0cfb (patch) | |
tree | bbe4567c808236fb13361d653e7789e770e3476e /src/map/npc.hpp | |
parent | 9cc8039347c5136adf4c1936db0d221a8217b26a (diff) | |
download | tmwa-e5c60513d5b9c41cdca5ff0c01023d9ef4eb0cfb.tar.gz tmwa-e5c60513d5b9c41cdca5ff0c01023d9ef4eb0cfb.tar.bz2 tmwa-e5c60513d5b9c41cdca5ff0c01023d9ef4eb0cfb.tar.xz tmwa-e5c60513d5b9c41cdca5ff0c01023d9ef4eb0cfb.zip |
merge npc_event_do_l into npc_event
Diffstat (limited to 'src/map/npc.hpp')
-rw-r--r-- | src/map/npc.hpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/map/npc.hpp b/src/map/npc.hpp index be4686a..fa5b6a3 100644 --- a/src/map/npc.hpp +++ b/src/map/npc.hpp @@ -44,7 +44,18 @@ constexpr Species FAKE_NPC_CLASS = wrap<Species>(127); constexpr Species INVISIBLE_CLASS = wrap<Species>(32767); int npc_event_dequeue(dumb_ptr<map_session_data> sd); -int npc_event(dumb_ptr<map_session_data> sd, NpcEvent npcname, int); +int npc_event(dumb_ptr<map_session_data>, NpcEvent, int, Slice<argrec_t>); +int npc_event(BlockId, NpcEvent, int, Slice<argrec_t>); +inline +int npc_event(dumb_ptr<map_session_data> sd, NpcEvent npcname, int i) +{ + return npc_event(sd, npcname, i, nullptr); +} +inline +int npc_event(BlockId rid, NpcEvent eventname, int mob_kill, Slice<argrec_t> args) +{ + return npc_event(rid ? map_id2bl(rid)->is_player() : nullptr, eventname, mob_kill, args); +} int npc_addeventtimer(dumb_ptr<block_list> bl, interval_t tick, NpcEvent name); int npc_touch_areanpc(dumb_ptr<map_session_data>, Borrowed<map_local>, int, int); int npc_click(dumb_ptr<map_session_data>, BlockId); @@ -67,7 +78,11 @@ void npc_free(dumb_ptr<npc_data> npc); int npc_event_do_oninit(void); int npc_event_doall_l(ScriptLabel name, BlockId rid, Slice<argrec_t> argv); -int npc_event_do_l(NpcEvent name, BlockId rid, Slice<argrec_t> argv); +inline +int npc_event_do_l(NpcEvent name, BlockId rid, Slice<argrec_t> argv) +{ + return npc_event(rid, name, 0, argv); +} inline int npc_event_doall(ScriptLabel name) { |