summaryrefslogtreecommitdiff
path: root/src/map/chrif.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/chrif.c')
-rw-r--r--src/map/chrif.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/map/chrif.c b/src/map/chrif.c
index cd24c5fea..a3277d4c2 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -336,6 +336,8 @@ static bool chrif_save(struct map_session_data *sd, int flag)
elemental->save(sd->ed);
if( sd->save_quest )
intif->quest_save(sd);
+ if (VECTOR_LENGTH(sd->achievement) > 0)
+ intif->achievements_save(sd);
if (sd->storage.received == true && sd->storage.save == true)
intif->send_account_storage(sd);
@@ -457,7 +459,7 @@ static bool chrif_changemapserverack(int account_id, int login_id1, int login_id
ShowError("chrif_changemapserverack: map server change failed.\n");
clif->authfail_fd(node->fd, 0); // Disconnected from server
} else
- clif->changemapserver(node->sd, map_index, x, y, ntohl(ip), ntohs(port));
+ clif->changemapserver(node->sd, map_index, x, y, ntohl(ip), ntohs(port), NULL);
//Player has been saved already, remove him from memory. [Skotlex]
chrif->auth_delete(account_id, char_id, ST_MAPCHANGE);
@@ -973,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);
}
@@ -1590,6 +1592,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);