diff options
Diffstat (limited to 'src/map/intif.c')
-rw-r--r-- | src/map/intif.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/map/intif.c b/src/map/intif.c index 5fafc0913..ed4c0e2d2 100644 --- a/src/map/intif.c +++ b/src/map/intif.c @@ -513,7 +513,7 @@ static void intif_parse_account_storage(int fd) * @packet 0x3011 [out] <packet_len>.W <account_id>.L <struct item[]>.P * @param sd [in] pointer to session data. */ -static void intif_send_account_storage(const struct map_session_data *sd) +static void intif_send_account_storage(struct map_session_data *sd) { int len = 0, i = 0, c = 0; @@ -541,6 +541,8 @@ static void intif_send_account_storage(const struct map_session_data *sd) } WFIFOSET(inter_fd, len); + + sd->storage.save = false; // Save request has been sent } /** @@ -562,10 +564,9 @@ static void intif_parse_account_storage_save_ack(int fd) if (saved == 0) { ShowError("intif_parse_account_storage_save_ack: Storage has not been saved! (AID: %d)\n", account_id); + sd->storage.save = true; // Flag it as unsaved, to re-attempt later return; } - - sd->storage.save = false; // Storage has been saved. } //================================================================= @@ -1324,7 +1325,7 @@ static void intif_parse_Registers(int fd) safestrncpy(sval, RFIFOP(fd, cursor + 1), min((int)sizeof(sval), len)); cursor += len + 1; - script->set_reg(NULL,sd,reference_uid(script->add_str(key), index), key, sval, NULL); + script->set_reg(NULL,sd,reference_uid(script->add_variable(key), index), key, sval, NULL); } /** * Vessel! @@ -1346,7 +1347,7 @@ static void intif_parse_Registers(int fd) ival = RFIFOL(fd, cursor); cursor += 4; - script->set_reg(NULL,sd,reference_uid(script->add_str(key), index), key, (const void *)h64BPTRSIZE(ival), NULL); + script->set_reg(NULL,sd,reference_uid(script->add_variable(key), index), key, (const void *)h64BPTRSIZE(ival), NULL); } } script->parser_current_file = NULL;/* reset */ |