diff options
author | Haru <haru@dotalux.com> | 2017-05-27 19:24:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-27 19:24:42 +0200 |
commit | cb3e2f5f3b91d0a1f7711eff9c10ae9a655a74f2 (patch) | |
tree | 1b1df55f4143bae6bed85093f3424b6af11e4a01 /src/map/script.c | |
parent | be118c7fad6df29dc691452ef511ac12fea37a06 (diff) | |
parent | d966a8e6860d418bb3a235e57928436127eba555 (diff) | |
download | hercules-cb3e2f5f3b91d0a1f7711eff9c10ae9a655a74f2.tar.gz hercules-cb3e2f5f3b91d0a1f7711eff9c10ae9a655a74f2.tar.bz2 hercules-cb3e2f5f3b91d0a1f7711eff9c10ae9a655a74f2.tar.xz hercules-cb3e2f5f3b91d0a1f7711eff9c10ae9a655a74f2.zip |
Merge pull request #1722 from Smokexyz/mmo_charstatus-fix
Dismemberment of `storage_data` from `mmo_charstatus`.
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/map/script.c b/src/map/script.c index 599285e1e..75f747fb6 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -10424,9 +10424,17 @@ BUILDIN(openstorage) { struct map_session_data *sd = script->rid2sd(st); if (sd == NULL) - return true; + return false; + + if (sd->storage.received == false) { + script_pushint(st, 0); + ShowWarning("buildin_openstorage: Storage data for AID %d has not been loaded.\n", sd->bl.id); + return false; + } storage->open(sd); + + script_pushint(st, 1); // success flag. return true; } |