summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-11-15 00:45:28 +0300
committerAndrei Karas <akaras@inbox.ru>2015-11-15 00:45:28 +0300
commit8ee5eafc741d581579efd696765fb0646b72a553 (patch)
treef2be1be92fc4bf5f16e5b8097dd13aaa0f4c3eec /src/map/clif.c
parent45be44cc833bc47991218b90f1bbc1fc6dbd04f4 (diff)
parentd8edfe7eb9e7d86da24c87198f03432b73e72284 (diff)
downloadhercules-8ee5eafc741d581579efd696765fb0646b72a553.tar.gz
hercules-8ee5eafc741d581579efd696765fb0646b72a553.tar.bz2
hercules-8ee5eafc741d581579efd696765fb0646b72a553.tar.xz
hercules-8ee5eafc741d581579efd696765fb0646b72a553.zip
Merge pull request #857 from HerculesWS/scriptqueue
Scriptqueue
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 80703fa12..621f0b44a 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -610,12 +610,12 @@ bool clif_send(const void* buf, int len, struct block_list* bl, enum send_target
case BG_QUEUE:
if( sd && sd->bg_queue.arena ) {
- struct hQueue *queue = &script->hq[sd->bg_queue.arena->queue_id];
+ struct script_queue *queue = script->queue(sd->bg_queue.arena->queue_id);
- for( i = 0; i < queue->size; i++ ) {
- struct map_session_data *qsd = NULL;
+ for (i = 0; i < VECTOR_LENGTH(queue->entries); i++) {
+ struct map_session_data *qsd = map->id2sd(VECTOR_INDEX(queue->entries, i));
- if (queue->item[i] > 0 && (qsd = map->id2sd(queue->item[i])) != NULL) {
+ if (qsd != NULL) {
WFIFOHEAD(qsd->fd,len);
memcpy(WFIFOP(qsd->fd,0), buf, len);
WFIFOSET(qsd->fd,len);