Browse Source

* Fixed missing check in cooking, causing cooking kit requirement could be bypassed by sending 0x25b (CZ_REQ_MAKINGITEM) directly (bugreport:4642, since r13628).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14592 54d463be-8e91-2dee-dedb-b68131a5f0ec
ai4rei 14 năm trước cách đây
mục cha
commit
98c85e0d33
2 tập tin đã thay đổi với 7 bổ sung0 xóa
  1. 2 0
      Changelog-Trunk.txt
  2. 5 0
      src/map/clif.c

+ 2 - 0
Changelog-Trunk.txt

@@ -1,5 +1,7 @@
 Date	Added
 
+2010/12/15
+	* Fixed missing check in cooking, causing cooking kit requirement could be bypassed by sending 0x25b (CZ_REQ_MAKINGITEM) directly (bugreport:4642, since r13628). [Ai4rei]
 2010/12/13
 	* Fixed plugin 'sig' not being compilable on Mac OS X, due to different return value type of 'strsignal' (bugreport:4637). [Ai4rei]
 2010/12/12

+ 5 - 0
src/map/clif.c

@@ -10180,6 +10180,11 @@ void clif_parse_Cooking(int fd,struct map_session_data *sd)
 	//int type = RFIFOW(fd,2); // '1' for cooking, but what do other values mean?
 	int nameid = RFIFOW(fd,4);
 
+	if( sd->menuskill_id != AM_PHARMACY )
+	{
+		return;
+	}
+
 	if (pc_istrading(sd)) {
 		//Make it fail to avoid shop exploits where you sell something different than you see.
 		clif_skill_fail(sd,sd->ud.skillid,0,0);