summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-03-17 20:21:44 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-03-17 20:21:44 +0000
commit3a9eb85f8271f6e0110bdf6181205ff29ddf5e57 (patch)
tree63140fd4be2e91c713419ecca8919e7c7b665d64 /src
parent28ce4da81258c2c23ab03ae4ca19aa9141a94a5c (diff)
downloadhercules-3a9eb85f8271f6e0110bdf6181205ff29ddf5e57.tar.gz
hercules-3a9eb85f8271f6e0110bdf6181205ff29ddf5e57.tar.bz2
hercules-3a9eb85f8271f6e0110bdf6181205ff29ddf5e57.tar.xz
hercules-3a9eb85f8271f6e0110bdf6181205ff29ddf5e57.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/map/clif.c9
1 files 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;
}