diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-07-05 19:33:05 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-07-12 02:29:12 +0300 |
commit | c6871ff29e0e6d58f6915aafaf1b86e464aae623 (patch) | |
tree | 4443ad8120ea3be7ca083b600ebe167eca697ad4 /src/map/clif.c | |
parent | 2f2ceeb24b8d469b98b410772563731d5921e470 (diff) | |
download | hercules-c6871ff29e0e6d58f6915aafaf1b86e464aae623.tar.gz hercules-c6871ff29e0e6d58f6915aafaf1b86e464aae623.tar.bz2 hercules-c6871ff29e0e6d58f6915aafaf1b86e464aae623.tar.xz hercules-c6871ff29e0e6d58f6915aafaf1b86e464aae623.zip |
Update packet ZC_MVP_GETTING_ITEM.
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 6723cbe9f..943c166a7 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -7496,20 +7496,23 @@ static void clif_mvp_effect(struct map_session_data *sd) /// MVP item reward message (ZC_MVP_GETTING_ITEM). /// 010a <name id>.W +/// 010a <name id>.L static void clif_mvp_item(struct map_session_data *sd, int nameid) { - int view,fd; + int view, fd; + struct PACKET_ZC_MVP_GETTING_ITEM p; nullpo_retv(sd); - fd=sd->fd; - WFIFOHEAD(fd,packet_len(0x10a)); - WFIFOW(fd,0)=0x10a; - if((view = itemdb_viewid(nameid)) > 0) - WFIFOW(fd,2)=view; + fd = sd->fd; + WFIFOHEAD(fd, sizeof(p)); + p.packetType = 0x10a; + if ((view = itemdb_viewid(nameid)) > 0) + p.itemId = view; else - WFIFOW(fd,2)=nameid; - WFIFOSET(fd,packet_len(0x10a)); + p.itemId = nameid; + memcpy(WFIFOP(fd, 0), &p, sizeof(p)); + WFIFOSET(fd, sizeof(p)); } /// MVP EXP reward message (ZC_MVP_GETTING_SPECIAL_EXP). |