L2JLisvus

Would you like to react to this message? Create an account in a few clicks or log in to continue.

2 posters

    Remove items from subclass/ Freeze Player in Subclass/ No mastery - no armor equipping

    yusuketh
    yusuketh


    Posts : 58
    Join date : 2013-07-12

    Remove items from subclass/ Freeze Player in Subclass/ No mastery - no armor equipping Empty Remove items from subclass/ Freeze Player in Subclass/ No mastery - no armor equipping

    Post  yusuketh 14th July 2014, 04:57

    at least these first 2 mods deserve enter ^^

    Remove items from subclass:
    Code:
    --- trunk/gameserver/head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java (revision 910)
    +++ trunk/gameserver/head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java (revision 912)
    @@ -12563,43 +12579,8 @@
        */
        public synchronized boolean addSubClass(int classId, int classIndex)
        {
    +      //Anti stuck Skills/Augments
    +      //Remove Chest
    +      L2ItemInstance chest = getInventory().getPaperdollItem(Inventory.PAPERDOLL_CHEST);
    +      if (chest != null)
    +      {
    +             
    +                L2ItemInstance[] unequipped = getInventory().unEquipItemInBodySlotAndRecord(chest.getItem().getBodyPart());
    +                InventoryUpdate iu = new InventoryUpdate();
    +                for (L2ItemInstance element : unequipped)
    +                 iu.addModifiedItem(element);
    +                sendPacket(iu);
    +             
    +      }
    +      //Remove Item RHAND
    +      L2ItemInstance rhand = getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND);
    +      if (rhand != null)
    +      {
    +             
    +                L2ItemInstance[] unequipped = getInventory().unEquipItemInBodySlotAndRecord(rhand.getItem().getBodyPart());
    +                InventoryUpdate iu = new InventoryUpdate();
    +                for (L2ItemInstance element : unequipped)
    +                 iu.addModifiedItem(element);
    +                sendPacket(iu);
    +             
    +      }
    +      //Remove Item LHAND      
    +      L2ItemInstance lhand = getInventory().getPaperdollItem(Inventory.PAPERDOLL_LHAND);
    +      if (lhand != null)
    +      {
    +             
    +                L2ItemInstance[] unequipped = getInventory().unEquipItemInBodySlotAndRecord(lhand.getItem().getBodyPart());
    +                InventoryUpdate iu = new InventoryUpdate();
    +                for (L2ItemInstance element : unequipped)
    +                 iu.addModifiedItem(element);
    +                sendPacket(iu);
    +             
    +      }
    -      // Reload skills from armors / jewels / weapons
    -      getInventory().reloadEquippedItems();
             
           if(getTotalSubClasses() == Config.ALLOWED_SUBCLASS || classIndex == 0)
              return false;
    @@ -12848,61 +12829,7 @@
              sendPacket( ActionFailed.STATIC_PACKET );
              return false;
           }
    +         
    +      L2ItemInstance rhand = getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND);

    +      if(rhand != null)
    +      {
    +         L2ItemInstance[] unequipped = getInventory().unEquipItemInBodySlotAndRecord(rhand.getItem().getBodyPart());
    +         InventoryUpdate iu = new InventoryUpdate();
    +
    +         for(L2ItemInstance element : unequipped)
    +         {
    +            iu.addModifiedItem(element);
    +         }
    +
    +         sendPacket(iu);
    +         rhand = null;
    +         iu = null;
    +         unequipped = null;
    +      }
    +
    +      L2ItemInstance lhand = getInventory().getPaperdollItem(Inventory.PAPERDOLL_LHAND);
    +
    +      if(lhand != null)
    +      {
    +         L2ItemInstance[] unequipped = getInventory().unEquipItemInBodySlotAndRecord(lhand.getItem().getBodyPart());
    +         InventoryUpdate iu = new InventoryUpdate();
    +
    +         for(L2ItemInstance element : unequipped)
    +         {
    +            iu.addModifiedItem(element);
    +         }
    +
    +         sendPacket(iu);
    +         lhand = null;
    +         iu = null;
    +         unequipped = null;
    +      }
    +      
    +      L2ItemInstance chest = getInventory().getPaperdollItem(Inventory.PAPERDOLL_CHEST);
    +
    +      if(chest != null)
    +      {
    +         L2ItemInstance[] unequipped = getInventory().unEquipItemInBodySlotAndRecord(chest.getItem().getBodyPart());
    +         InventoryUpdate iu = new InventoryUpdate();
    +
    +         for(L2ItemInstance element : unequipped)
    +         {
    +            iu.addModifiedItem(element);
    +         }
    +
    +         sendPacket(iu);
    +         chest = null;
    +         iu = null;
    +         unequipped = null;
    +      }
    +
           // Delete a force buff upon class change.
           //thank l2j-arhid
           if(_forceBuff != null)
    @@ -13019,6 +12946,9 @@
              restoreEffects();
           }
          
    -      // Reload skills from armors / jewels / weapons
    -      getInventory().reloadEquippedItems();
    -      
           checkAllowedSkills();

           sendPacket(new EtcStatusUpdate(this));

    You are paralized untill your subclass load:

    Code:
    Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
    ===================================================================

    @@ -8425,4 +8425,6 @@
        public boolean addSubClass(int classId, int classIndex)
        {
           if (getTotalSubClasses() == 3 || classIndex == 0)
              return false;
    @@ -8430,4 +8432,8 @@
           if (getSubClasses().containsKey(classIndex))
              return false;
    +       
    +       startAbnormalEffect(L2Character.ABNORMAL_EFFECT_HOLD_1);
    +       setIsParalyzed(true);
    +       sendMessage("You are paralized untill your subclass load.");
     
           // Note: Never change _classIndex in any method other than setActiveClass().
    @@ -8492,4 +8498,8 @@
            if (Config.DEBUG)
                _log.info(getName() + " was given " + getAllSkills().length + " skills for their new sub class.");
    +        
    +        setIsParalyzed(false);
    +        stopAbnormalEffect(L2Character.ABNORMAL_EFFECT_HOLD_1);
    +        sendMessage("You are unparalized.");
     
            return true;

    No mastery - no armor equipping:
    Code:
    Index: java/net/sf/l2j/gameserver/network/clientpackets/UseItem.java
    ===================================================================
    --- java/net/sf/l2j/gameserver/network/clientpackets/UseItem.java   (revision 3297)
    +++ java/net/sf/l2j/gameserver/network/clientpackets/UseItem.java   (working copy)
    @@ -326,6 +326,31 @@
                          activeChar.sendPacket(new SystemMessage(SystemMessageId.CANNOT_EQUIP_ITEM_DUE_TO_BAD_CONDITION));
                          return;
                       }
    +                  if (activeChar.getLevel() >= 40)
    +                  {
    +                     if (!(activeChar.getSkillLevel(227) >= 1) || !(activeChar.getSkillLevel(233) >= 1)
    +                         || !(activeChar.getSkillLevel(236) >= 1) || !(activeChar.getSkillLevel(252) >= 1)
    +                         || !(activeChar.getSkillLevel(258) >= 1) || !(activeChar.getSkillLevel(465) >= 1) &&
    +                         (item.getItem().getItemType() == L2ArmorType.LIGHT))
    +                     {
    +                       activeChar.sendMessage("You cannot wear this type of armor unless you have a mastery for it.");
    +                       return;
    +                     }
    +                     if (!(activeChar.getSkillLevel(231) >= 1) || !(activeChar.getSkillLevel(232) >= 1)
    +                         || !(activeChar.getSkillLevel(253) >= 1) || !(activeChar.getSkillLevel(259) >= 1) &&
    +                         (item.getItem().getItemType() == L2ArmorType.HEAVY))
    +                     {
    +                       activeChar.sendMessage("You cannot wear this type of armor unless you have a mastery for it.");
    +                       return;
    +                     }
    +                     if (!(activeChar.getSkillLevel(234) >= 1) || !(activeChar.getSkillLevel(235) >= 1)
    +                         || !(activeChar.getSkillLevel(251) >= 1) &&
    +                         (item.getItem().getItemType() == L2ArmorType.MAGIC))
    +                     {
    +                       activeChar.sendMessage("You cannot wear this type of armor unless you have a mastery for it.");
    +                       return;
    +                     }
    +                  }
                       break;
                    }
                    case L2Item.SLOT_DECO:

    awaiting response from DNR, hope you like.
    DnR
    DnR
    Admin
    Admin


    Posts : 1475
    Join date : 2012-12-03
    Age : 34

    Remove items from subclass/ Freeze Player in Subclass/ No mastery - no armor equipping Empty Re: Remove items from subclass/ Freeze Player in Subclass/ No mastery - no armor equipping

    Post  DnR 14th July 2014, 12:37

    These were measures taken by some servers to avoid stucking item passive skills exploit in the past.
    We have no such bugs here, though. Smile
    yusuketh
    yusuketh


    Posts : 58
    Join date : 2013-07-12

    Remove items from subclass/ Freeze Player in Subclass/ No mastery - no armor equipping Empty Re: Remove items from subclass/ Freeze Player in Subclass/ No mastery - no armor equipping

    Post  yusuketh 14th July 2014, 12:58

    DnR wrote:These were measures taken by some servers to avoid stucking item passive skills exploit in the past.
    We have no such bugs here, though. Smile
    as in c4 evasion is not very high, has very dagger that will use a tallum heavy with shield, without counting the archers, if he pulls a great sword to kill you if u get near it XD,  good times Zeus L2 C4 ^ ^.

    Sponsored content


    Remove items from subclass/ Freeze Player in Subclass/ No mastery - no armor equipping Empty Re: Remove items from subclass/ Freeze Player in Subclass/ No mastery - no armor equipping

    Post  Sponsored content


      Current date/time is 19th May 2024, 14:46