summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-07-05 23:09:59 +0300
committerAndrei Karas <akaras@inbox.ru>2018-07-15 20:36:16 +0300
commit17f0779e1b05095696ab135e937fa948bf4e17eb (patch)
treeb37252ec8dd701daef77c405fa87f36dd95679dd /src
parentb8b65a031b79ff9ec1d5b6ecd138fc47613c0b65 (diff)
downloadhercules-17f0779e1b05095696ab135e937fa948bf4e17eb.tar.gz
hercules-17f0779e1b05095696ab135e937fa948bf4e17eb.tar.bz2
hercules-17f0779e1b05095696ab135e937fa948bf4e17eb.tar.xz
hercules-17f0779e1b05095696ab135e937fa948bf4e17eb.zip
Update packet CZ_REQMAKINGITEM.
Diffstat (limited to 'src')
-rw-r--r--src/map/clif.c9
-rw-r--r--src/map/packets_struct.h11
2 files changed, 17 insertions, 3 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 5b4643de2..797e872ac 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -11948,7 +11948,9 @@ static void clif_parse_ProduceMix(int fd, struct map_session_data *sd) __attribu
/// 018e <name id>.W { <material id>.W }*3
static void clif_parse_ProduceMix(int fd, struct map_session_data *sd)
{
- switch( sd->menuskill_id ) {
+ const struct PACKET_CZ_REQMAKINGITEM *p = RFIFOP(fd, 0);
+
+ switch (sd->menuskill_id) {
case -1:
case AM_PHARMACY:
case RK_RUNEMASTERY:
@@ -11963,8 +11965,9 @@ static void clif_parse_ProduceMix(int fd, struct map_session_data *sd)
clif_menuskill_clear(sd);
return;
}
- if( skill->can_produce_mix(sd,RFIFOW(fd,2),sd->menuskill_val, 1) )
- skill->produce_mix(sd,0,RFIFOW(fd,2),RFIFOW(fd,4),RFIFOW(fd,6),RFIFOW(fd,8), 1);
+
+ if (skill->can_produce_mix(sd, p->itemId, sd->menuskill_val, 1))
+ skill->produce_mix(sd, 0, p->itemId, p->material[0], p->material[1], p->material[2], 1);
clif_menuskill_clear(sd);
}
diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h
index 1a30ee7e2..3dfc1a570 100644
--- a/src/map/packets_struct.h
+++ b/src/map/packets_struct.h
@@ -1902,6 +1902,17 @@ struct PACKET_ZC_ADD_ITEM_TO_CART {
struct ItemOptions option_data[MAX_ITEM_OPTIONS];
} __attribute__((packed));
+struct PACKET_CZ_REQMAKINGITEM {
+ int16 packetType;
+#if PACKETVER_RE_NUM >= 20180704
+ uint32 itemId;
+ uint32 material[3];
+#else
+ uint16 itemId;
+ uint16 material[3];
+#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