A Project for Chronicle 4 based on L2JServer.


    Travelers/Adventurers Weapons equip condition

    Share
    avatar
    Karakan

    Posts : 421
    Join date : 2013-10-04

    Travelers/Adventurers Weapons equip condition

    Post  Karakan on 31st January 2015, 12:07

    Code:
    Index: D:/workspace/Lisvus_GameServer/java/net/sf/l2j/gameserver/clientpackets/UseItem.java
    ===================================================================
    --- D:/workspace/Lisvus_GameServer/java/net/sf/l2j/gameserver/clientpackets/UseItem.java   (revision 507)
    +++ D:/workspace/Lisvus_GameServer/java/net/sf/l2j/gameserver/clientpackets/UseItem.java   (working copy)
    @@ -152,8 +152,18 @@
     
                sm = null;
                return;
    -        }
    +        }
    +      
    +      // Cannot use Travelers/Adventurers weapons with PK Count > 0
    +        if(activeChar.getPkKills() > 0 && (itemId >= 7816 && itemId <= 7831))
    +        {
    +            SystemMessage sm = new SystemMessage(SystemMessage.S1_CANNOT_BE_USED);
    +            sm.addItemName(itemId);
    +            activeChar.sendPacket(sm);
     
    +            sm = null;
    +         
    +        }      
     
            L2Clan cl = activeChar.getClan();
            // A shield that can only be used by the members of a clan that owns a castle.

    fissban

    Posts : 81
    Join date : 2013-12-10

    Re: Travelers/Adventurers Weapons equip condition

    Post  fissban on 1st February 2015, 06:23

    good fix

    but I prefer to do it in itemhandler
    avatar
    Karakan

    Posts : 421
    Join date : 2013-10-04

    Re: Travelers/Adventurers Weapons equip condition

    Post  Karakan on 1st February 2015, 16:02

    Then do it and contribute.

    Sponsored content

    Re: Travelers/Adventurers Weapons equip condition

    Post  Sponsored content


      Current date/time is 24th September 2017, 11:27