diff options
author | Haru <haru@dotalux.com> | 2017-07-12 11:42:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-12 11:42:01 +0200 |
commit | 39523884e457363b5bec504a8eef3d3e44530408 (patch) | |
tree | ec3fb26ee05ac31339f1bddd1c10386b1a7269a4 | |
parent | 67f43dbe233ec0b2649e7c7762b4760a8fcc0183 (diff) | |
parent | b21dd603acb3f77f941db8457a544ebc62658569 (diff) | |
download | hercules-39523884e457363b5bec504a8eef3d3e44530408.tar.gz hercules-39523884e457363b5bec504a8eef3d3e44530408.tar.bz2 hercules-39523884e457363b5bec504a8eef3d3e44530408.tar.xz hercules-39523884e457363b5bec504a8eef3d3e44530408.zip |
Merge pull request #1790 from mekolat/channel2
Allow to use channelmes without attached player
-rw-r--r-- | src/map/script.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/map/script.c b/src/map/script.c index 628598584..c23a335c3 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -23106,7 +23106,7 @@ BUILDIN(shopcount) */ BUILDIN(channelmes) { - struct map_session_data *sd = script->rid2sd(st); + struct map_session_data *sd = map->id2sd(st->rid); const char *channelname = script_getstr(st, 2); struct channel_data *chan = channel->search(channelname, sd); @@ -23124,9 +23124,10 @@ BUILDIN(channelmes) BUILDIN(addchannelhandler) { int i; + struct map_session_data *sd = map->id2sd(st->rid); const char *channelname = script_getstr(st, 2); const char *eventname = script_getstr(st, 3); - struct channel_data *chan = channel->search(channelname, NULL); + struct channel_data *chan = channel->search(channelname, sd); if (!chan) { script_pushint(st, 0); @@ -23149,9 +23150,10 @@ BUILDIN(addchannelhandler) BUILDIN(removechannelhandler) { int i; + struct map_session_data *sd = map->id2sd(st->rid); const char *channelname = script_getstr(st, 2); const char *eventname = script_getstr(st, 3); - struct channel_data *chan = channel->search(channelname, NULL); + struct channel_data *chan = channel->search(channelname, sd); if (!chan) { script_pushint(st, 0); |