diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-03-14 17:17:06 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-03-14 17:17:06 -0600 |
commit | dc1c0ca6d41a3cb15a98cda7a324a948f40c90f7 (patch) | |
tree | 19e7e7d10b00d09a18971e32d494833d9c9913a0 /src/map/script.c | |
parent | 3dfbb9bbd106502f95c8d3e4f05a26940e0e290d (diff) | |
download | tmwa-dc1c0ca6d41a3cb15a98cda7a324a948f40c90f7.tar.gz tmwa-dc1c0ca6d41a3cb15a98cda7a324a948f40c90f7.tar.bz2 tmwa-dc1c0ca6d41a3cb15a98cda7a324a948f40c90f7.tar.xz tmwa-dc1c0ca6d41a3cb15a98cda7a324a948f40c90f7.zip |
Fix some storage-related code
You can't end NPC scripts with openstorage, which will now wait for the
user.
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/map/script.c b/src/map/script.c index a51f65f..c5bcae1 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -376,7 +376,7 @@ struct { {buildin_gettimetick,"gettimetick","i"}, {buildin_gettime,"gettime","i"}, {buildin_gettimestr,"gettimestr","si"}, - {buildin_openstorage,"openstorage",""}, + {buildin_openstorage,"openstorage","*"}, {buildin_guildopenstorage,"guildopenstorage","*"}, {buildin_itemskill,"itemskill","iis"}, {buildin_monster,"monster","siisii*"}, @@ -3522,8 +3522,16 @@ int buildin_gettimestr(struct script_state *st) */ int buildin_openstorage(struct script_state *st) { - st->state=STOP; - storage_storageopen(script_rid2sd(st)); +// int sync = 0; +// if (st->end >= 3) sync = conv_num(st,& (st->stack->stack_data[st->start+2])); + struct map_session_data *sd=script_rid2sd(st); + +// if (sync) { + st->state=STOP; + sd->npc_flags.storage = 1; +// } else st->state = END; + + storage_storageopen(sd); return 0; } @@ -3531,6 +3539,7 @@ int buildin_guildopenstorage(struct script_state *st) { struct map_session_data *sd=script_rid2sd(st); int ret; + st->state=STOP; ret = storage_guild_storageopen(sd); push_val(st->stack,C_INT,ret); return 0; |