summaryrefslogtreecommitdiff
path: root/src/map/npc.hpp
diff options
context:
space:
mode:
authormekolat <mekolat@users.noreply.github.com>2016-04-19 09:41:31 -0400
committermekolat <mekolat@users.noreply.github.com>2016-04-19 09:41:31 -0400
commit1ba24673e7064e39406e6faf11d790c2dcc2ac00 (patch)
tree7e2645f6fdec1dcc63ae56366371246f62865dcd /src/map/npc.hpp
parentc3e06ffe6437d27a2a7c6ddb2dc487ff2f007adf (diff)
parentc786a93e91adaf68780a5fd7585f51d0528f92ed (diff)
downloadtmwa-1ba24673e7064e39406e6faf11d790c2dcc2ac00.tar.gz
tmwa-1ba24673e7064e39406e6faf11d790c2dcc2ac00.tar.bz2
tmwa-1ba24673e7064e39406e6faf11d790c2dcc2ac00.tar.xz
tmwa-1ba24673e7064e39406e6faf11d790c2dcc2ac00.zip
Merge self-fork from mekolat/magic-v3
Magic v3
Diffstat (limited to 'src/map/npc.hpp')
-rw-r--r--src/map/npc.hpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/map/npc.hpp b/src/map/npc.hpp
index b587f5f..e230ffe 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>);
+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);
int npc_scriptcont(dumb_ptr<map_session_data>, BlockId);
@@ -57,6 +68,7 @@ dumb_ptr<npc_data> npc_name2id(NpcName name);
BlockId npc_get_new_npc_id(void);
+int magic_message(dumb_ptr<map_session_data> caster, XString source_invocation);
/**
* Uninstalls and frees an NPC
*/
@@ -65,7 +77,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)
{