Browse Source

Disconnect user on forged selectegg packet (may be temporary fix). (bugreport: 1257)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12484 54d463be-8e91-2dee-dedb-b68131a5f0ec
Kevin 17 years ago
parent
commit
62325eff60
2 changed files with 6 additions and 1 deletions
  1. 1 0
      Changelog-Trunk.txt
  2. 5 1
      src/map/clif.c

+ 1 - 0
Changelog-Trunk.txt

@@ -4,6 +4,7 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
 2008/04/04
+	* Disconnect user when receive select egg packet with no menu open. (r12484) [Kevin]
 	* Fixed @rura between maps on more then one map server. (r12483) [Kevin]
 	* Update to Auth Glitch fix: moved unit_free_pc back to where it was
 	- and updated it so unit_free_pc just tells the script to end

+ 5 - 1
src/map/clif.c

@@ -6708,7 +6708,7 @@ void clif_wedding_effect(struct block_list *bl)
 	clif_send(buf, packet_len(0x1ea), bl, AREA);
 }
 /*==========================================
- * なたに逢いたい使用時名前叫び
+ * なたに逢いたい使用時名前叫び
  *------------------------------------------
 
 void clif_callpartner(struct map_session_data *sd)
@@ -10294,7 +10294,11 @@ void clif_parse_CatchPet(int fd, struct map_session_data *sd)
 void clif_parse_SelectEgg(int fd, struct map_session_data *sd)
 {
 	if (sd->menuskill_id != SA_TAMINGMONSTER || sd->menuskill_val != -1)
+	{
+		//Forged packet, disconnect them [Kevin]
+		clif_authfail_fd(fd, 0);
 		return;
+	}
 	pet_select_egg(sd,RFIFOW(fd,2)-2);
 	sd->menuskill_val = sd->menuskill_id = 0;
 }