summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-03-14 17:17:06 -0600
committerJared Adams <jaxad0127@gmail.com>2009-03-14 17:17:06 -0600
commitdc1c0ca6d41a3cb15a98cda7a324a948f40c90f7 (patch)
tree19e7e7d10b00d09a18971e32d494833d9c9913a0 /src/map/clif.c
parent3dfbb9bbd106502f95c8d3e4f05a26940e0e290d (diff)
downloadtmwa-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/clif.c')
-rw-r--r--src/map/clif.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index b555231..a309111 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -7611,7 +7611,7 @@ void clif_parse_MoveToKafra(int fd, struct map_session_data *sd) {
item_index = RFIFOW(fd,2) - 2;
item_amount = RFIFOL(fd,4);
- if (sd->npc_id != 0)
+ if (sd->npc_id != 0 && !sd->npc_flags.storage)
return;
if (sd->state.storage_flag)
@@ -7632,7 +7632,7 @@ void clif_parse_MoveFromKafra(int fd,struct map_session_data *sd) {
item_index = RFIFOW(fd,2) - 1;
item_amount = RFIFOL(fd,4);
- if (sd->npc_id != 0)
+ if (sd->npc_id != 0 && !sd->npc_flags.storage)
return;
if (sd->state.storage_flag)
@@ -7648,7 +7648,7 @@ void clif_parse_MoveFromKafra(int fd,struct map_session_data *sd) {
void clif_parse_MoveToKafraFromCart(int fd, struct map_session_data *sd) {
nullpo_retv(sd);
- if (sd->npc_id != 0)
+ if (sd->npc_id != 0 && !sd->npc_flags.storage)
return;
if (sd->state.storage_flag)
storage_guild_storageaddfromcart(sd, RFIFOW(fd,2) - 2, RFIFOL(fd,4));
@@ -7683,7 +7683,10 @@ void clif_parse_CloseKafra(int fd, struct map_session_data *sd) {
else
storage_storageclose(sd);
- map_scriptcont(sd, sd->npc_id);
+ if (sd->npc_flags.storage) {
+ sd->npc_flags.storage = 0;
+ map_scriptcont(sd, sd->npc_id);
+ }
}
/*==========================================