Kaynağa Gözat

BETA: Removing length limit from Community Board, like [4538] by qwerty13 and me.

Zoey76 14 yıl önce
ebeveyn
işleme
79a97c7aa1

+ 8 - 9
L2J_Server_BETA/java/com/l2jserver/gameserver/network/serverpackets/ShowBoard.java

@@ -20,9 +20,9 @@ import com.l2jserver.util.StringUtil;
 
 public class ShowBoard extends L2GameServerPacket
 {
-	private static final String _S__6E_SHOWBOARD = "[S] 7b ShowBoard";
+	private static final String _S__7B_SHOWBOARD = "[S] 7B ShowBoard";
 	
-	private StringBuilder _htmlCode;
+	private final StringBuilder _htmlCode;
 	
 	public ShowBoard(String htmlCode, String id)
 	{
@@ -33,13 +33,15 @@ public class ShowBoard extends L2GameServerPacket
 	{
 		_htmlCode = StringUtil.startAppend(500, "1002\u0008");
 		for (String str : arg)
+		{
 			StringUtil.append(_htmlCode, str, " \u0008");
+		}
 	}
 	
 	@Override
 	protected final void writeImpl()
 	{
-		writeC(0x7b);
+		writeC(0x7B);
 		writeC(0x01); //c4 1 to show community 00 to hide
 		writeS("bypass _bbshome"); // top
 		writeS("bypass _bbsgetfav"); // favorite
@@ -49,18 +51,15 @@ public class ShowBoard extends L2GameServerPacket
 		writeS("bypass _bbsmail"); // mail
 		writeS("bypass _bbsfriends"); // friends
 		writeS("bypass bbs_add_fav"); // add fav.
-		if (_htmlCode.length() < 8192)
-			writeS(_htmlCode.toString());
-		else
-			writeS("<html><body>Html is too long!</body></html>");
+		writeS(_htmlCode.toString());
 	}
 	
-	/* (non-Javadoc)
+	/**
 	 * @see com.l2jserver.gameserver.serverpackets.ServerBasePacket#getType()
 	 */
 	@Override
 	public String getType()
 	{
-		return _S__6E_SHOWBOARD;
+		return _S__7B_SHOWBOARD;
 	}
 }