U3Games

Games | Desarrollo & Soporte => L2 | Sección de Servidores => Lineage => L2 | Implementaciones => Mensaje iniciado por: Swarlog en Jul 27, 2025, 12:33 AM

Título: Anti Change Weapons In PvP
Publicado por: Swarlog en Jul 27, 2025, 12:33 AM
===============================================
Config.java
===============================================
        public static boolean WELCOME_HTM;
+     public static boolean  ALLOW_RESTRICT_ITEM;

            /** Welcome Htm **/
            WELCOME_HTM = Boolean.parseBoolean(L2JFrozenSettings.getProperty("WelcomeHtm", "False"));
+                      ALLOW_RESTRICT_ITEM = Boolean.parseBoolean(L2JFrozenSettings.getProperty("AllowRestrictItem" , "False"));
                 

===============================================
gameserver\network\clientpackets\UseItem.java
===============================================
       
        if (item.isEquipable())
        {

 +           // No unequipping/equipping Weapons while the player is in pvp
 +           // Created By Dagger All Right Reserved
 + if(Config.ALLOW_RESTRICT_ITEM)
 +           if (activeChar.isInDuel() || activeChar.getPvpFlag() > 0 || activeChar.isProcessingTransaction())
 +           {
 +            activeChar.sendMessage("No es posible desequiparse items en PvP, duelo o en proceso de trade.");
 +            return;
 +           }
 +           // Created By Dagger All Right Reserved

By Dagger