diff options
author | AnnieRuru <jeankofannie2@gmail.com> | 2019-02-20 17:11:39 +0800 |
---|---|---|
committer | AnnieRuru <jeankofannie2@gmail.com> | 2019-02-20 17:11:39 +0800 |
commit | ec43ccf2d3d992386b2ba9d7812bcbd24639b063 (patch) | |
tree | 18d494a49727c5cc9ff328e655466bff481788e1 /src/map/script.c | |
parent | d496d8963fb4c2eb9015a2911a88299e29644681 (diff) | |
download | hercules-ec43ccf2d3d992386b2ba9d7812bcbd24639b063.tar.gz hercules-ec43ccf2d3d992386b2ba9d7812bcbd24639b063.tar.bz2 hercules-ec43ccf2d3d992386b2ba9d7812bcbd24639b063.tar.xz hercules-ec43ccf2d3d992386b2ba9d7812bcbd24639b063.zip |
Fix *atcommand cannot be use when PCBLOCK_COMMANDS is true
- also minor fix when atcommand failed, print source npc twice
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/map/script.c b/src/map/script.c index 7578fcdcc..68c3f2fbc 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -15431,7 +15431,6 @@ static BUILDIN(atcommand) struct map_session_data *sd, *dummy_sd = NULL; int fd; const char* cmd; - bool ret = true; cmd = script_getstr(st,2); @@ -15454,11 +15453,10 @@ static BUILDIN(atcommand) if (!atcommand->exec(fd, sd, cmd, false)) { ShowWarning("script: buildin_atcommand: failed to execute command '%s'\n", cmd); - script->reportsrc(st); - ret = false; + return false; } if (dummy_sd) aFree(dummy_sd); - return ret; + return true; } /** |