diff options
author | shennetsind <ind@henn.et> | 2013-07-31 12:21:22 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-07-31 12:21:22 -0300 |
commit | 0bec4034abe023e3f3759506ac95237aa2d82512 (patch) | |
tree | 3cfb9d5f2d19fb2e3dfe5d16badd0577905ea9e9 /src | |
parent | 298f02f380d4de88129f0a296456d461cbc6505e (diff) | |
download | hercules-0bec4034abe023e3f3759506ac95237aa2d82512.tar.gz hercules-0bec4034abe023e3f3759506ac95237aa2d82512.tar.bz2 hercules-0bec4034abe023e3f3759506ac95237aa2d82512.tar.xz hercules-0bec4034abe023e3f3759506ac95237aa2d82512.zip |
New 'close2' warning
When attempting to use this command without a prior dialog window it now will throw a warning and skip halting the script.
Special Thanks to j-tkay, Gepard.
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src')
-rw-r--r-- | src/map/script.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/map/script.c b/src/map/script.c index 3033a281b..4385ef07d 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -3942,7 +3942,13 @@ BUILDIN(close2) { if( sd == NULL ) return true; - st->state = STOP; + if( sd->state.dialog == 1 ) + st->state = STOP; + else { + ShowWarning("misuse of 'close2'! trying to use it without prior dialog! skipping...\n"); + script_reportsrc(st); + } + clif->scriptclose(sd, st->oid); return true; } |