diff options
Diffstat (limited to 'src/map/map.c')
-rw-r--r-- | src/map/map.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/map/map.c b/src/map/map.c index ee56f140f..10d413676 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -132,6 +132,8 @@ int enable_grf = 0; //To enable/disable reading maps from GRF files, bypassing m struct eri *map_iterator_ers; char *map_cache_buffer = NULL; // Has the uncompressed gat data of all maps, so just one allocation has to be made +struct map_interface iMap_s; + /*========================================== * server player count (of all mapservers) *------------------------------------------*/ @@ -1647,6 +1649,7 @@ int map_quit(struct map_session_data *sd) { if( sd->bg_id ) bg_team_leave(sd,1); + skill->cooldown_save(sd); pc->itemcd_do(sd,false); for( i = 0; i < sd->queues_count; i++ ) { @@ -1657,7 +1660,8 @@ int map_quit(struct map_session_data *sd) { } /* two times, the npc event above may assign a new one or delete others */ for( i = 0; i < sd->queues_count; i++ ) { - script->queue_remove(sd->queues[i],sd->status.account_id); + if( sd->queues[i] != -1 ) + script->queue_remove(sd->queues[i],sd->status.account_id); } npc_script_event(sd, NPCE_LOGOUT); |