summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
authorgumi <git@gumi.ca>2020-05-02 09:35:01 -0400
committergumi <git@gumi.ca>2020-05-03 11:46:22 -0400
commitb12f1ff8be37346ec70ab50447c8f03bd9a990e1 (patch)
tree3e209166b7982bb065de402a040fc87bc7a928d8 /src/map/npc.c
parentd958a36388644a9e58b63da0458f836d198833c8 (diff)
downloadhercules-b12f1ff8be37346ec70ab50447c8f03bd9a990e1.tar.gz
hercules-b12f1ff8be37346ec70ab50447c8f03bd9a990e1.tar.bz2
hercules-b12f1ff8be37346ec70ab50447c8f03bd9a990e1.tar.xz
hercules-b12f1ff8be37346ec70ab50447c8f03bd9a990e1.zip
add a config flag to allow to local functions to be event handlers
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index 570305ba1..2f03623e4 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -390,7 +390,9 @@ static int npc_event_export(struct npc_data *nd, int i)
lname = nd->u.scr.label_list[i].name;
pos = nd->u.scr.label_list[i].pos;
- if ((nd->u.scr.label_list[i].flags & LABEL_IS_EXTERN) != 0 && (nd->u.scr.label_list[i].flags & LABEL_IS_USERFUNC) == 0) {
+ if ((nd->u.scr.label_list[i].flags & LABEL_IS_EXTERN) != 0
+ && ((nd->u.scr.label_list[i].flags & LABEL_IS_USERFUNC) == 0
+ || script->config.functions_as_events)) {
struct event_data *ev;
struct linkdb_node **label_linkdb = NULL;
char buf[EVENT_NAME_LENGTH];