diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-07-07 21:51:04 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-07-15 20:36:22 +0300 |
commit | 6b84a369d9b972ce9719d941bae933f666110e82 (patch) | |
tree | ce5094e1e88265590a7676507e962111201005f5 /src/map/clif.c | |
parent | 33d045acfba3a6dbde16a4bb26fde5ecab427e4e (diff) | |
download | hercules-6b84a369d9b972ce9719d941bae933f666110e82.tar.gz hercules-6b84a369d9b972ce9719d941bae933f666110e82.tar.bz2 hercules-6b84a369d9b972ce9719d941bae933f666110e82.tar.xz hercules-6b84a369d9b972ce9719d941bae933f666110e82.zip |
Update packet CZ_REQ_MAKINGITEM.
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 2cb3bebaa..db3d4beef 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -11949,10 +11949,11 @@ static void clif_parse_Cooking(int fd, struct map_session_data *sd) __attribute_ /// 6 = GN_S_PHARMACY static void clif_parse_Cooking(int fd, struct map_session_data *sd) { - int type = RFIFOW(fd,2); - int nameid = RFIFOW(fd,4); - int amount = sd->menuskill_val2?sd->menuskill_val2:1; - if( type == 6 && sd->menuskill_id != GN_MIX_COOKING && sd->menuskill_id != GN_S_PHARMACY ) + const struct PACKET_CZ_REQ_MAKINGITEM *p = RFIFOP(fd, 0); + int type = p->type; + int nameid = p->itemId; + int amount = sd->menuskill_val2 ? sd->menuskill_val2 : 1; + if (type == 6 && sd->menuskill_id != GN_MIX_COOKING && sd->menuskill_id != GN_S_PHARMACY) return; if (pc_istrading(sd)) { @@ -11961,8 +11962,8 @@ static void clif_parse_Cooking(int fd, struct map_session_data *sd) clif_menuskill_clear(sd); return; } - if( skill->can_produce_mix(sd,nameid,sd->menuskill_val, amount) ) - skill->produce_mix(sd,(type>1?sd->menuskill_id:0),nameid,0,0,0,amount); + if (skill->can_produce_mix(sd, nameid, sd->menuskill_val, amount)) + skill->produce_mix(sd, (type > 1 ? sd->menuskill_id : 0), nameid, 0, 0, 0, amount); clif_menuskill_clear(sd); } |