summaryrefslogtreecommitdiff
path: root/src/map/map.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/map.c')
-rw-r--r--src/map/map.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/map/map.c b/src/map/map.c
index 422d1f3a9..6d359e412 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -1670,9 +1670,9 @@ int map_quit(struct map_session_data *sd) {
npc_script_event(sd, NPCE_LOGOUT);
sd->state.waitingdisconnect = 1;
- if (sd->pd) unit_free(&sd->pd->bl);
- if (sd->hd) unit_free(&sd->hd->bl);
- unit_free(&sd->bl);
+ if (sd->pd) unit_free(&sd->pd->bl,0);
+ if (sd->hd) unit_free(&sd->hd->bl,0);
+ unit_free(&sd->bl,3);
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)
@@ -1991,7 +1991,7 @@ int mob_cache_cleanup_sub(struct block_list *bl, va_list ap) {
md->status.hp < md->status.max_hp)
return 0; //Do not remove damaged mobs.
- unit_free(&md->bl);
+ unit_free(&md->bl,0);
return 1;
}
@@ -3617,7 +3617,7 @@ int cleanup_sub(struct block_list *bl, va_list ap) {
npc_unload((struct npc_data *)bl);
break;
case BL_MOB:
- unit_free(bl);
+ unit_free(bl,0);
break;
case BL_PET:
//There is no need for this, the pet is removed together with the player. [Skotlex]