viewing paste Unknown #5800 | C (LoadRunner)

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
/// Sends list of all quest states (ZC_ALL_QUEST_LIST).
/// 02b1 <packet len>.W <num>.L { <quest id>.L <active>.B }*num
/// 097a <packet len>.W <num>.L { <quest id>.L <active>.B }*num
void clif_quest_send_list(struct map_session_data * sd)
{
    int fd = sd->fd;
    int i, header;
    int len = sd->avail_quests*5+8;
 
#if PACKETVER < 20130320
    header = 0x2b1;
#else
    header = 0x97a;
#endif
 
    WFIFOHEAD(fd,len);
    WFIFOW(fd, 0) = header;
    WFIFOW(fd, 2) = len;
    WFIFOL(fd, 4) = sd->avail_quests;
 
    for( i = 0; i < sd->avail_quests; i++ ) {
        WFIFOL(fd, i*5+8) = sd->quest_log[i].quest_id;
        WFIFOB(fd, i*5+12) = sd->quest_log[i].state;
    }
 
    WFIFOSET(fd, len);
}
Viewed 709 times, submitted by Guest.