diff options
author | Haru <haru@dotalux.com> | 2015-09-14 16:21:12 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2015-11-14 21:13:54 +0100 |
commit | d8edfe7eb9e7d86da24c87198f03432b73e72284 (patch) | |
tree | 5f297cb815897d1b73b790b7ffc19cd8d82a46f8 /src/map/map.c | |
parent | 1d064776214d3f962b9af585555cca686906665a (diff) | |
download | hercules-d8edfe7eb9e7d86da24c87198f03432b73e72284.tar.gz hercules-d8edfe7eb9e7d86da24c87198f03432b73e72284.tar.bz2 hercules-d8edfe7eb9e7d86da24c87198f03432b73e72284.tar.xz hercules-d8edfe7eb9e7d86da24c87198f03432b73e72284.zip |
Changed struct map_session_data::queues into a VECTOR and renamed to ::script_queues
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/map.c')
-rw-r--r-- | src/map/map.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/map/map.c b/src/map/map.c index dd5baa626..fff1593a4 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -1802,16 +1802,16 @@ int map_quit(struct map_session_data *sd) { skill->cooldown_save(sd); pc->itemcd_do(sd,false); - for( i = 0; i < sd->queues_count; i++ ) { - struct script_queue *queue = script->queue(sd->queues[i]); + for (i = 0; i < VECTOR_LENGTH(sd->script_queues); i++) { + struct script_queue *queue = script->queue(VECTOR_INDEX(sd->script_queues, i)); if (queue && queue->event_logout[0] != '\0') { npc->event(sd, queue->event_logout, 0); } } /* two times, the npc event above may assign a new one or delete others */ - for( i = 0; i < sd->queues_count; i++ ) { - if( sd->queues[i] != -1 ) - script->queue_remove(sd->queues[i],sd->status.account_id); + while (VECTOR_LENGTH(sd->script_queues)) { + int qid = VECTOR_LAST(sd->script_queues); + script->queue_remove(qid, sd->status.account_id); } npc->script_event(sd, NPCE_LOGOUT); |