소스 검색

* Fixed @accept not checking, whether or not a duel is already full (bugreport:2740, since r4111).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14684 54d463be-8e91-2dee-dedb-b68131a5f0ec
ai4rei 14 년 전
부모
커밋
b3efe1d8b4
2개의 변경된 파일8개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      Changelog-Trunk.txt
  2. 7 0
      src/map/atcommand.c

+ 1 - 0
Changelog-Trunk.txt

@@ -1,6 +1,7 @@
 Date	Added
 
 2011/01/27
+	* Fixed @accept not checking, whether or not a duel is already full (bugreport:2740, since r4111). [Ai4rei]
 	* Resolving allow/deny IP rules not working (bugreport:2632). [Ai4rei]
 	- Fixed 'mask' being filled with 'ip' when standard mask was specified (since r9647).
 	- Fixed 'ip' and 'mask' (bit mask) being stored in wrong byte order (network order instead of host order) (since r10162).

+ 7 - 0
src/map/atcommand.c

@@ -7963,6 +7963,13 @@ ACMD_FUNC(accept)
 		return 0;
 	}
 
+	if( duel_list[sd->duel_invite].max_players_limit > 0 && duel_list[sd->duel_invite].members_count >= duel_list[sd->duel_invite].max_players_limit )
+	{
+		// "Duel: Limit of players is reached."
+		clif_displaymessage(fd, msg_txt(351));
+		return 0;
+	}
+
 	duel_accept(sd->duel_invite, sd);
 	// "Duel: Invitation has been accepted."
 	clif_displaymessage(fd, msg_txt(361));