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/pc.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/pc.c')
-rw-r--r-- | src/map/pc.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index 1b7fcd610..43adf331b 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -1126,8 +1126,7 @@ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_tim sd->bg_queue.client_has_bg_data = 0; sd->bg_queue.type = 0; - sd->queues = NULL; - sd->queues_count = 0; + VECTOR_INIT(sd->script_queues); sd->state.dialog = 0; @@ -5526,8 +5525,8 @@ int pc_setpos(struct map_session_data* sd, unsigned short map_index, int x, int int i; sd->state.pmap = sd->bl.m; - 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_mapchange[0] != '\0') { pc->setregstr(sd, script->add_str("@Queue_Destination_Map$"), map->list[m].name); npc->event(sd, queue->event_mapchange, 0); @@ -7634,8 +7633,8 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) { npc->event(sd, bgd->die_event, 0); } - 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_death[0] != '\0') npc->event(sd, queue->event_death, 0); } |