summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/chrif.c4
-rw-r--r--src/map/pc.c4
2 files changed, 5 insertions, 3 deletions
diff --git a/src/map/chrif.c b/src/map/chrif.c
index 583c22ad6..36f57a892 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -400,8 +400,12 @@ int chrif_changemapserverack(int account_id, int login_id1, int login_id2, int c
} else
clif_changemapserver(node->sd, map_index, x, y, ntohl(ip), ntohs(port));
+ //Free session data from this map server [Kevin]
+ unit_free_pc(sd);
+
//Player has been saved already, remove him from memory. [Skotlex]
chrif_auth_delete(account_id, char_id, ST_MAPCHANGE);
+
return 0;
}
diff --git a/src/map/pc.c b/src/map/pc.c
index acc8af40c..e55ae2014 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -3594,9 +3594,7 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y
pc_clean_skilltree(sd);
chrif_save(sd,2);
chrif_changemapserver(sd, ip, (short)port);
- //It is important to invoke remove_map separately from unit_free before
- //saving so that the data saved corresponds to that AFTER warping.
- unit_free_pc(sd);
+
return 0;
}