diff options
Diffstat (limited to 'src/map/chrif.c')
-rw-r--r-- | src/map/chrif.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/map/chrif.c b/src/map/chrif.c index 43ea7ebe3..ddc106d0c 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -975,14 +975,14 @@ static bool chrif_divorceack(int char_id, int partner_id) if( ( sd = map->charid2sd(char_id) ) != NULL && sd->status.partner_id == partner_id ) { sd->status.partner_id = 0; - for(i = 0; i < MAX_INVENTORY; i++) + for (i = 0; i < sd->status.inventorySize; i++) if (sd->status.inventory[i].nameid == WEDDING_RING_M || sd->status.inventory[i].nameid == WEDDING_RING_F) pc->delitem(sd, i, 1, 0, DELITEM_NORMAL, LOG_TYPE_DIVORCE); } if( ( sd = map->charid2sd(partner_id) ) != NULL && sd->status.partner_id == char_id ) { sd->status.partner_id = 0; - for(i = 0; i < MAX_INVENTORY; i++) + for (i = 0; i < sd->status.inventorySize; i++) if (sd->status.inventory[i].nameid == WEDDING_RING_M || sd->status.inventory[i].nameid == WEDDING_RING_F) pc->delitem(sd, i, 1, 0, DELITEM_NORMAL, LOG_TYPE_DIVORCE); } @@ -1226,6 +1226,7 @@ static bool chrif_save_scdata(struct map_session_data *sd) } else { data.tick = INFINITE_DURATION; } + data.total_tick = sc->data[i]->total_tick; data.type = i; data.val1 = sc->data[i]->val1; data.val2 = sc->data[i]->val2; @@ -1273,8 +1274,8 @@ static bool chrif_load_scdata(int fd) for (i = 0; i < count; i++) { const struct status_change_data *data = RFIFOP(fd,14 + i*sizeof(struct status_change_data)); - status->change_start(NULL, &sd->bl, (sc_type)data->type, 10000, data->val1, data->val2, data->val3, data->val4, - data->tick, SCFLAG_NOAVOID|SCFLAG_FIXEDTICK|SCFLAG_LOADED|SCFLAG_FIXEDRATE); + status->change_start_sub(NULL, &sd->bl, (sc_type)data->type, 10000, data->val1, data->val2, data->val3, data->val4, + data->tick, data->total_tick, SCFLAG_NOAVOID|SCFLAG_FIXEDTICK|SCFLAG_LOADED|SCFLAG_FIXEDRATE); } pc->scdata_received(sd); @@ -1592,6 +1593,7 @@ static int check_connect_char_server(int tid, int64 tick, int id, intptr_t data) sockt->session[chrif->fd]->func_parse = chrif->parse; sockt->session[chrif->fd]->flag.server = 1; + sockt->session[chrif->fd]->flag.validate = 0; sockt->realloc_fifo(chrif->fd, FIFOSIZE_SERVERLINK, FIFOSIZE_SERVERLINK); chrif->connect(chrif->fd); |