فهرست منبع

Missing part for new banchat config in clientpackets. This option allow to use voice command while chat banned.

Denser 14 سال پیش
والد
کامیت
2589736f2a
1فایلهای تغییر یافته به همراه7 افزوده شده و 4 حذف شده
  1. 7 4
      L2J_Server_BETA/java/com/l2jserver/gameserver/network/clientpackets/Say2.java

+ 7 - 4
L2J_Server_BETA/java/com/l2jserver/gameserver/network/clientpackets/Say2.java

@@ -153,12 +153,15 @@ public final class Say2 extends L2GameClientPacket
 			return;
 		}
 		
-		if (activeChar.isChatBanned())
+		if (activeChar.isChatBanned() && !_text.startsWith("."))
 		{
-			if (_type == ALL || _type == SHOUT || _type == TRADE || _type == HERO_VOICE)
+			for (int chatId : Config.BAN_CHAT_CHANNELS)
 			{
-				activeChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.CHATTING_IS_CURRENTLY_PROHIBITED));
-				return;
+				if (_type == chatId)
+				{
+					activeChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.CHATTING_IS_CURRENTLY_PROHIBITED));
+					return;
+				}
 			}
 		}