diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/map/clif.c | 22 | ||||
-rw-r--r-- | src/map/packets_struct.h | 10 |
2 files changed, 24 insertions, 8 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 797e872ac..a666f4724 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -7153,22 +7153,28 @@ static void clif_movetoattack(struct map_session_data *sd, struct block_list *bl /// 1 = failure /// 2 = success (alchemist) /// 3 = failure (alchemist) +/// 4 = success (???) +/// 5 = failure (???) +/// 6 = failure (???) +/// 7 = failure (???) static void clif_produceeffect(struct map_session_data *sd, int flag, int nameid) { - int view,fd; + int view, fd; + struct PACKET_ZC_ACK_REQMAKINGITEM p; nullpo_retv(sd); fd = sd->fd; clif->solved_charname(fd, sd->status.char_id, sd->status.name); - WFIFOHEAD(fd,packet_len(0x18f)); - WFIFOW(fd, 0)=0x18f; - WFIFOW(fd, 2)=flag; - if((view = itemdb_viewid(nameid)) > 0) - WFIFOW(fd, 4)=view; + WFIFOHEAD(fd, sizeof(p)); + p.packetType = 0x18f; + p.result = flag; + if ((view = itemdb_viewid(nameid)) > 0) + p.itemId = view; else - WFIFOW(fd, 4)=nameid; - WFIFOSET(fd,packet_len(0x18f)); + p.itemId = nameid; + memcpy(WFIFOP(fd, 0), &p, sizeof(p)); + WFIFOSET(fd, sizeof(p)); } /// Initiates the pet taming process (ZC_START_CAPTURE). diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h index 3dfc1a570..3c8ec9428 100644 --- a/src/map/packets_struct.h +++ b/src/map/packets_struct.h @@ -1913,6 +1913,16 @@ struct PACKET_CZ_REQMAKINGITEM { #endif } __attribute__((packed)); +struct PACKET_ZC_ACK_REQMAKINGITEM { + int16 packetType; + int16 result; +#if PACKETVER_RE_NUM >= 20180704 + uint32 itemId; +#else + uint16 itemId; +#endif +} __attribute__((packed)); + #if !defined(sun) && (!defined(__NETBSD__) || __NetBSD_Version__ >= 600000000) // NetBSD 5 and Solaris don't like pragma pack but accept the packed attribute #pragma pack(pop) #endif // not NetBSD < 6 / Solaris |