summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-07 13:19:12 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-07 13:19:12 +0000
commit32d5d6568057bf8a832e2c8566f3e4147544063b (patch)
tree30b074e51a8b4ca4b4274c3e95373d3cdaccb893 /src/map
parentfda081264f919912287ce1b0cd2ef4c008912d25 (diff)
downloadhercules-32d5d6568057bf8a832e2c8566f3e4147544063b.tar.gz
hercules-32d5d6568057bf8a832e2c8566f3e4147544063b.tar.bz2
hercules-32d5d6568057bf8a832e2c8566f3e4147544063b.tar.xz
hercules-32d5d6568057bf8a832e2c8566f3e4147544063b.zip
- Removed char_nick2id from char-sql server as it's no longer needed.
- Fixed quitting the map server not properly saving the storage before deleting it. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7030 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/map.c3
-rw-r--r--src/map/unit.c8
2 files changed, 6 insertions, 5 deletions
diff --git a/src/map/map.c b/src/map/map.c
index 3833acb34..a26430776 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -1662,9 +1662,6 @@ int map_quit(struct map_session_data *sd) {
npc_script_event(sd, NPCE_LOGOUT);
if (sd->pd) unit_free(&sd->pd->bl);
unit_free(&sd->bl);
- pc_clean_skilltree(sd);
- if(sd->pet.intimate > 0)
- intif_save_petdata(sd->status.account_id,&sd->pet);
chrif_save(sd,1);
} else { //Try to free some data, without saving anything (this could be invoked on map server change. [Skotlex]
if (sd->bl.prev != NULL)
diff --git a/src/map/unit.c b/src/map/unit.c
index 4703820cc..a87dfa16b 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -1618,9 +1618,9 @@ int unit_free(struct block_list *bl) {
pc_cleareventtimer(sd);
pc_delspiritball(sd,sd->spiritball,1);
chrif_save_scdata(sd); //Save status changes, then clear'em out from memory. [Skotlex]
- storage_delete(sd->status.account_id);
pc_makesavestatus(sd);
sd->state.waitingdisconnect = 1;
+ pc_clean_skilltree(sd);
} else if( bl->type == BL_PET ) {
struct pet_data *pd = (struct pet_data*)bl;
struct map_session_data *sd = pd->msd;
@@ -1662,7 +1662,11 @@ int unit_free(struct block_list *bl) {
aFree (pd->loot);
pd->loot = NULL;
}
- if (sd) sd->pd = NULL;
+ if (sd) {
+ if(sd->pet.intimate > 0)
+ intif_save_petdata(sd->status.account_id,&sd->pet);
+ sd->pd = NULL;
+ }
} else if(bl->type == BL_MOB) {
struct mob_data *md = (struct mob_data*)bl;
if(md->deletetimer!=-1)