From 3a9eb85f8271f6e0110bdf6181205ff29ddf5e57 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sat, 17 Mar 2012 20:21:44 +0000 Subject: Fixed bugreport:5456 you can no exploit creation of crafting items by mixing packets thru wpe/rpe/whatever. it now checks if the item you're attempting to create belongs to the trigger used. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15698 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/clif.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/map/clif.c b/src/map/clif.c index d3ac3b8a1..7d90f43bf 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -10779,7 +10779,8 @@ void clif_parse_ProduceMix(int fd,struct map_session_data *sd) sd->menuskill_val = sd->menuskill_id = 0; return; } - skill_produce_mix(sd,0,RFIFOW(fd,2),RFIFOW(fd,4),RFIFOW(fd,6),RFIFOW(fd,8), 1); + 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); sd->menuskill_val = sd->menuskill_id = 0; } @@ -10798,8 +10799,7 @@ void clif_parse_Cooking(int fd,struct map_session_data *sd) //int type = RFIFOW(fd,2); int nameid = RFIFOW(fd,4); - if( sd->menuskill_id != AM_PHARMACY ) - { + if( sd->menuskill_id != AM_PHARMACY ) { return; } @@ -10809,7 +10809,8 @@ void clif_parse_Cooking(int fd,struct map_session_data *sd) sd->menuskill_val = sd->menuskill_id = 0; return; } - skill_produce_mix(sd,0,nameid,0,0,0,1); + if( skill_can_produce_mix(sd,nameid,sd->menuskill_val, 1) ) + skill_produce_mix(sd,0,nameid,0,0,0,1); sd->menuskill_val = sd->menuskill_id = 0; } -- cgit v1.2.3-70-g09d2