Noticias:

Debes de estar registrado para poder ver el contenido indicado. Registrate o Conectate

Menú Principal

Proteccion lvl chat

Iniciado por Swarlog, Ago 31, 2022, 08:07 PM

Tema anterior - Siguiente tema

Swarlog

Index: java/com/l2jserver/gameserver/network/clientpackets/Say2.java
===================================================================
--- java/com/l2jserver/gameserver/network/clientpackets/Say2.java    (revision 4422)
+++ java/com/l2jserver/gameserver/network/clientpackets/Say2.java    (working copy)
@@ -196,6 +196,13 @@
         if (Config.USE_SAY_FILTER)
             checkText();
         
+       
+        if ((activeChar.getLevel() < 80) && (_type == TRADE || _type == SHOUT || _type == HERO_VOICE))
+        {
+            activeChar.sendMessage("Shout, trade and hero chatting cannot be used until level 80.");
+            return;
+        }
+       
         IChatHandler handler = ChatHandler.getInstance().getChatHandler(_type);
         if (handler != null)
             handler.handleChat(_type, activeChar, _target, _text);