BossForever

Amorsets

Dec 27th, 2016
424
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 52.69 KB | None | 0 0
  1. ### Eclipse Workspace Patch 1.0
  2. #P L2jFrozen_GameServer
  3. Index: head-src/com/l2jfrozen/gameserver/model/Inventory.java
  4. ===================================================================
  5. --- head-src/com/l2jfrozen/gameserver/model/Inventory.java  (revision 1132)
  6. +++ head-src/com/l2jfrozen/gameserver/model/Inventory.java  (working copy)
  7. @@ -494,11 +497,45 @@
  8.                             {
  9.                                 LOGGER.warn("Inventory.ArmorSetListener: Incorrect skill: " + armorSet.getEnchant6skillId() + ".");
  10.                             }
  11. -                          
  12. +
  13.                             skille = null;
  14.                         }
  15.                     }
  16. -                  
  17. +                   if (armorSet.isEnchanted12(player)) // has all parts of set enchanted to 12 or more
  18. +                   {
  19. +                       final int skillId12 = armorSet.getEnchant12skillId();
  20. +
  21. +                       if (skillId12 > 0)
  22. +                       {
  23. +                           L2Skill skille = SkillTable.getInstance().getInfo(skillId12, 1);
  24. +
  25. +                           if (skille != null)
  26. +                           {
  27. +                               player.addSkill(skille, false);
  28. +                               player.sendSkillList();
  29. +                           }
  30. +                           else
  31. +                               LOGGER.warn("Inventory.ArmorSetListener: Incorrect skill: " + armorSet.getEnchant12skillId() + ".");
  32. +                       }
  33. +                   }
  34. +                   if (armorSet.isEnchanted16(player)) // has all parts of set enchanted to 16 or more
  35. +                   {
  36. +                       final int skillId16 = armorSet.getEnchant16skillId();
  37. +
  38. +                       if (skillId16 > 0)
  39. +                       {
  40. +                           L2Skill skille = SkillTable.getInstance().getInfo(skillId16, 1);
  41. +
  42. +                           if (skille != null)
  43. +                           {
  44. +                               player.addSkill(skille, false);
  45. +                               player.sendSkillList();
  46. +                           }
  47. +                           else
  48. +                               LOGGER.warn("Inventory.ArmorSetListener: Incorrect skill: " + armorSet.getEnchant16skillId() + ".");
  49. +                       }
  50. +                   }
  51. +
  52.                     skill = null;
  53.                 }
  54.             }
  55. @@ -517,24 +554,26 @@
  56.         @Override
  57.         public void notifyUnequiped(final int slot, final L2ItemInstance item)
  58.         {
  59.             if (!(getOwner() instanceof L2PcInstance))
  60.                 return;
  61. -          
  62. +
  63.             L2PcInstance player = (L2PcInstance) getOwner();
  64. -          
  65. +
  66.             boolean remove = false;
  67.             int removeSkillId1 = 0; // set skill
  68.             int removeSkillId2 = 0; // shield skill
  69.             int removeSkillId3 = 0; // enchant +6 skill
  70. +           int removeSkillId4 = 0; // enchant +12 skill
  71. +           int removeSkillId5 = 0; // enchant +16 skill
  72.            
  73.             if (slot == PAPERDOLL_CHEST)
  74.             {
  75. @@ -541,11 +580,13 @@
  76.                 L2ArmorSet armorSet = ArmorSetsTable.getInstance().getSet(item.getItemId());
  77.                 if (armorSet == null)
  78.                     return;
  79. -              
  80. +
  81.                 remove = true;
  82.                 removeSkillId1 = armorSet.getSkillId();
  83.                 removeSkillId2 = armorSet.getShieldSkillId();
  84.                 removeSkillId3 = armorSet.getEnchant6skillId();
  85. +               removeSkillId4 = armorSet.getEnchant12skillId();
  86. +               removeSkillId5 = armorSet.getEnchant16skillId();
  87.                
  88.                 armorSet = null;
  89.             }
  90. @@ -565,6 +606,8 @@
  91.                     removeSkillId1 = armorSet.getSkillId();
  92.                     removeSkillId2 = armorSet.getShieldSkillId();
  93.                     removeSkillId3 = armorSet.getEnchant6skillId();
  94. +                   removeSkillId4 = armorSet.getEnchant12skillId();
  95. +                   removeSkillId5 = armorSet.getEnchant16skillId();
  96.                 }
  97.                 else if (armorSet.containShield(item.getItemId())) // removed shield
  98.                 {
  99. @@ -622,21 +665,43 @@
  100.                     {
  101.                         LOGGER.warn("Inventory.ArmorSetListener: Incorrect skill: " + removeSkillId3 + ".");
  102.                     }
  103. -                  
  104. +
  105.                     skill = null;
  106.                 }
  107. +               if (removeSkillId4 != 0)
  108. +                {
  109. +                    L2Skill skill = SkillTable.getInstance().getInfo(removeSkillId4,1);
  110. +                    if (skill != null)
  111. +                        player.removeSkill(skill);
  112. +                    else
  113. +                       LOGGER.warn("Inventory.ArmorSetListener: Incorrect skill: "+removeSkillId4+".");
  114. +                }
  115. +                
  116. +                if (removeSkillId5 != 0)
  117. +                {
  118. +                    L2Skill skill = SkillTable.getInstance().getInfo(removeSkillId5,1);
  119. +                    if (skill != null)
  120. +                        player.removeSkill(skill);
  121. +                    else
  122. +                       LOGGER.warn("Inventory.ArmorSetListener: Incorrect skill: "+removeSkillId5+".");
  123. +                }
  124. +  
  125.                 player.sendSkillList();
  126.             }
  127. -          
  128. +
  129.             player = null;
  130.         }
  131.     }
  132. -  
  133. +
  134.     /*
  135. -    * final class FormalWearListener implements PaperdollListener { public void notifyUnequiped(int slot, L2ItemInstance item) { if (!(getOwner() != null && getOwner() instanceof L2PcInstance)) return; L2PcInstance owner = (L2PcInstance)getOwner(); if (item.getItemId() == 6408)
  136. -    * owner.setIsWearingFormalWear(false); } public void notifyEquiped(int slot, L2ItemInstance item) { if (!(getOwner() != null && getOwner() instanceof L2PcInstance)) return; L2PcInstance owner = (L2PcInstance)getOwner(); // If player equip Formal Wear unequip weapons and abort cast/attack if
  137. -    * (item.getItemId() == 6408) { owner.setIsWearingFormalWear(true); if (owner.isCastingNow()) owner.abortCast(); if (owner.isAttackingNow()) owner.abortAttack(); setPaperdollItem(PAPERDOLL_LHAND, null); setPaperdollItem(PAPERDOLL_RHAND, null); setPaperdollItem(PAPERDOLL_LRHAND, null); } else {
  138. -    * if (!owner.isWearingFormalWear()) return; // Don't let weapons be equipped if player is wearing Formal Wear if (slot == PAPERDOLL_LHAND || slot == PAPERDOLL_RHAND || slot == PAPERDOLL_LRHAND) { setPaperdollItem(slot, null); } } } }
  139. +    * final class FormalWearListener implements PaperdollListener { public void notifyUnequiped(int slot, L2ItemInstance item) { if (!(getOwner() != null && getOwner() instanceof
  140. +    * L2PcInstance)) return; L2PcInstance owner = (L2PcInstance)getOwner(); if (item.getItemId() == 6408)
  141. +    * owner.setIsWearingFormalWear(false); } public void notifyEquiped(int slot, L2ItemInstance item) { if (!(getOwner() != null && getOwner() instanceof L2PcInstance)) return;
  142. +    * L2PcInstance owner = (L2PcInstance)getOwner(); // If player equip Formal Wear unequip weapons and abort cast/attack if
  143. +    * (item.getItemId() == 6408) { owner.setIsWearingFormalWear(true); if (owner.isCastingNow()) owner.abortCast(); if (owner.isAttackingNow()) owner.abortAttack();
  144. +    * setPaperdollItem(PAPERDOLL_LHAND, null); setPaperdollItem(PAPERDOLL_RHAND, null); setPaperdollItem(PAPERDOLL_LRHAND, null); } else {
  145. +    * if (!owner.isWearingFormalWear()) return; // Don't let weapons be equipped if player is wearing Formal Wear if (slot == PAPERDOLL_LHAND || slot == PAPERDOLL_RHAND || slot ==
  146. +    * PAPERDOLL_LRHAND) { setPaperdollItem(slot, null); } } } }
  147.      */
  148.     /**
  149.      * Constructor of the inventory
  150. @@ -651,11 +716,12 @@
  151.         addPaperdollListener(new StatsListener());
  152.         addPaperdollListener(new FormalWearListener());
  153.     }
  154. -  
  155. +
  156.     protected abstract ItemLocation getEquipLocation();
  157. -  
  158. +
  159.     /**
  160.      * Returns the instance of new ChangeRecorder
  161. +    *
  162.      * @return ChangeRecorder
  163.      */
  164.     public ChangeRecorder newRecorder()
  165. @@ -662,13 +728,18 @@
  166.     {
  167.         return new ChangeRecorder(this);
  168.     }
  169. -  
  170. +
  171.     /**
  172.      * Drop item from inventory and updates database
  173. -    * @param process : String Identifier of process triggering this action
  174. -    * @param item : L2ItemInstance to be dropped
  175. -    * @param actor : L2PcInstance Player requesting the item drop
  176. -    * @param reference : L2Object Object referencing current action like NPC selling item or previous item in transformation
  177. +    *
  178. +    * @param process
  179. +    *        : String Identifier of process triggering this action
  180. +    * @param item
  181. +    *        : L2ItemInstance to be dropped
  182. +    * @param actor
  183. +    *        : L2PcInstance Player requesting the item drop
  184. +    * @param reference
  185. +    *        : L2Object Object referencing current action like NPC selling item or previous item in transformation
  186.      * @return L2ItemInstance corresponding to the destroyed item or the updated item in inventory
  187.      */
  188.     public L2ItemInstance dropItem(final String process, final L2ItemInstance item, final L2PcInstance actor, final L2Object reference)
  189. @@ -677,25 +748,31 @@
  190.         {
  191.             if (!_items.contains(item))
  192.                 return null;
  193. -          
  194. +
  195.             removeItem(item);
  196.             item.setOwnerId(process, 0, actor, reference);
  197.             item.setLocation(ItemLocation.VOID);
  198.             item.setLastChange(L2ItemInstance.REMOVED);
  199. -          
  200. +
  201.             item.updateDatabase();
  202.             refreshWeight();
  203.         }
  204.         return item;
  205.     }
  206. -  
  207. +
  208.     /**
  209.      * Drop item from inventory by using its <B>objectID</B> and updates database
  210. -    * @param process : String Identifier of process triggering this action
  211. -    * @param objectId : int Item Instance identifier of the item to be dropped
  212. -    * @param count : int Quantity of items to be dropped
  213. -    * @param actor : L2PcInstance Player requesting the item drop
  214. -    * @param reference : L2Object Object referencing current action like NPC selling item or previous item in transformation
  215. +    *
  216. +    * @param process
  217. +    *        : String Identifier of process triggering this action
  218. +    * @param objectId
  219. +    *        : int Item Instance identifier of the item to be dropped
  220. +    * @param count
  221. +    *        : int Quantity of items to be dropped
  222. +    * @param actor
  223. +    *        : L2PcInstance Player requesting the item drop
  224. +    * @param reference
  225. +    *        : L2Object Object referencing current action like NPC selling item or previous item in transformation
  226.      * @return L2ItemInstance corresponding to the destroyed item or the updated item in inventory
  227.      */
  228.     public L2ItemInstance dropItem(final String process, final int objectId, final int count, final L2PcInstance actor, final L2Object reference)
  229. @@ -703,7 +780,7 @@
  230.         L2ItemInstance item = getItemByObjectId(objectId);
  231.         if (item == null)
  232.             return null;
  233. -      
  234. +
  235.         // Adjust item quantity and create new instance to drop
  236.         if (item.getCount() > count)
  237.         {
  238. @@ -710,37 +787,41 @@
  239.             item.changeCount(process, -count, actor, reference);
  240.             item.setLastChange(L2ItemInstance.MODIFIED);
  241.             item.updateDatabase();
  242. -          
  243. +
  244.             item = ItemTable.getInstance().createItem(process, item.getItemId(), count, actor, reference);
  245. -          
  246. +
  247.             item.updateDatabase();
  248.             refreshWeight();
  249. -          
  250. +
  251.             return item;
  252.         }
  253.         // Directly drop entire item
  254.         return dropItem(process, item, actor, reference);
  255.     }
  256. -  
  257. +
  258.     /**
  259.      * Adds item to inventory for further adjustments and Equip it if necessary (itemlocation defined)<BR>
  260.      * <BR>
  261. -    * @param item : L2ItemInstance to be added from inventory
  262. +    *
  263. +    * @param item
  264. +    *        : L2ItemInstance to be added from inventory
  265.      */
  266.     @Override
  267.     protected void addItem(final L2ItemInstance item)
  268.     {
  269.         super.addItem(item);
  270. -      
  271. +
  272.         if (item.isEquipped())
  273.         {
  274.             equipItem(item);
  275.         }
  276.     }
  277. -  
  278. +
  279.     /**
  280.      * Removes item from inventory for further adjustments.
  281. -    * @param item : L2ItemInstance to be removed from inventory
  282. +    *
  283. +    * @param item
  284. +    *        : L2ItemInstance to be removed from inventory
  285.      */
  286.     @Override
  287.     protected void removeItem(final L2ItemInstance item)
  288. @@ -752,12 +833,13 @@
  289.             {
  290.                 unEquipItemInSlot(i);
  291.             }
  292. -      
  293. +
  294.         super.removeItem(item);
  295.     }
  296. -  
  297. +
  298.     /**
  299.      * Returns the item in the paperdoll slot
  300. +    *
  301.      * @param slot
  302.      * @return L2ItemInstance
  303.      */
  304. @@ -765,9 +847,10 @@
  305.     {
  306.         return _paperdoll[slot];
  307.     }
  308. -  
  309. +
  310.     /**
  311.      * Returns the item in the paperdoll L2Item slot
  312. +    *
  313.      * @param slot
  314.      * @return L2ItemInstance
  315.      */
  316. @@ -814,32 +897,34 @@
  317.         }
  318.         return null;
  319.     }
  320. -  
  321. +
  322.     /**
  323.      * Returns the ID of the item in the paperdol slot
  324. -    * @param slot : int designating the slot
  325. +    *
  326. +    * @param slot
  327. +    *        : int designating the slot
  328.      * @return int designating the ID of the item
  329.      */
  330.     public int getPaperdollItemId(final int slot)
  331.     {
  332.         L2ItemInstance item = _paperdoll[slot];
  333. -      
  334. +
  335.         if (item != null)
  336.             return item.getItemId();
  337.         else if (slot == PAPERDOLL_HAIR)
  338.         {
  339.             item = _paperdoll[PAPERDOLL_DHAIR];
  340. -          
  341. +
  342.             if (item != null)
  343.                 return item.getItemId();
  344.         }
  345.         return 0;
  346.     }
  347. -  
  348. +
  349.     public int getPaperdollAugmentationId(final int slot)
  350.     {
  351.         final L2ItemInstance item = _paperdoll[slot];
  352. -      
  353. +
  354.         if (item != null)
  355.         {
  356.             if (item.getAugmentation() != null)
  357. @@ -848,30 +933,33 @@
  358.         }
  359.         return 0;
  360.     }
  361. -  
  362. +
  363.     /**
  364.      * Returns the objectID associated to the item in the paperdoll slot
  365. -    * @param slot : int pointing out the slot
  366. +    *
  367. +    * @param slot
  368. +    *        : int pointing out the slot
  369.      * @return int designating the objectID
  370.      */
  371.     public int getPaperdollObjectId(final int slot)
  372.     {
  373.         L2ItemInstance item = _paperdoll[slot];
  374. -      
  375. +
  376.         if (item != null)
  377.             return item.getObjectId();
  378.         else if (slot == PAPERDOLL_HAIR)
  379.         {
  380.             item = _paperdoll[PAPERDOLL_DHAIR];
  381. -          
  382. +
  383.             if (item != null)
  384.                 return item.getObjectId();
  385.         }
  386.         return 0;
  387.     }
  388. -  
  389. +
  390.     /**
  391.      * Adds new inventory's paperdoll listener
  392. +    *
  393.      * @param listener
  394.      */
  395.     public synchronized void addPaperdollListener(final PaperdollListener listener)
  396. @@ -880,29 +968,34 @@
  397.         {
  398.             assert !_paperdollListeners.contains(listener);
  399.         }
  400. -      
  401. +
  402.         _paperdollListeners.add(listener);
  403.     }
  404. -  
  405. +
  406.     /**
  407.      * Removes a paperdoll listener
  408. -    * @param listener to be deleted
  409. +    *
  410. +    * @param listener
  411. +    *        to be deleted
  412.      */
  413.     public synchronized void removePaperdollListener(final PaperdollListener listener)
  414.     {
  415.         _paperdollListeners.remove(listener);
  416.     }
  417. -  
  418. +
  419.     /**
  420.      * Equips an item in the given slot of the paperdoll. <U><I>Remark :</I></U> The item <B>HAS TO BE</B> already in the inventory
  421. -    * @param slot : int pointing out the slot of the paperdoll
  422. -    * @param item : L2ItemInstance pointing out the item to add in slot
  423. +    *
  424. +    * @param slot
  425. +    *        : int pointing out the slot of the paperdoll
  426. +    * @param item
  427. +    *        : L2ItemInstance pointing out the item to add in slot
  428.      * @return L2ItemInstance designating the item placed in the slot before
  429.      */
  430.     public L2ItemInstance setPaperdollItem(final int slot, final L2ItemInstance item)
  431.     {
  432.         final L2ItemInstance old = _paperdoll[slot];
  433. -      
  434. +
  435.         if (old != item)
  436.         {
  437.             if (old != null)
  438. @@ -911,24 +1004,24 @@
  439.                 // Put old item from paperdoll slot to base location
  440.                 old.setLocation(getBaseLocation());
  441.                 old.setLastChange(L2ItemInstance.MODIFIED);
  442. -              
  443. +
  444.                 // Get the mask for paperdoll
  445.                 int mask = 0;
  446. -              
  447. +
  448.                 for (int i = 0; i < PAPERDOLL_LRHAND; i++)
  449.                 {
  450.                     L2ItemInstance pi = _paperdoll[i];
  451. -                  
  452. +
  453.                     if (pi != null)
  454.                     {
  455.                         mask |= pi.getItem().getItemMask();
  456.                     }
  457. -                  
  458. +
  459.                     pi = null;
  460.                 }
  461. -              
  462. +
  463.                 _wearedMask = mask;
  464. -              
  465. +
  466.                 // Notify all paperdoll listener in order to unequip old item in slot
  467.                 for (final PaperdollListener listener : _paperdollListeners)
  468.                 {
  469. @@ -936,19 +1029,19 @@
  470.                     {
  471.                         continue;
  472.                     }
  473. -                  
  474. +
  475.                     listener.notifyUnequiped(slot, old);
  476.                 }
  477. -              
  478. +
  479.                 if (old.isAugmented())
  480.                 {
  481.                     if (getOwner() != null && getOwner() instanceof L2PcInstance)
  482.                         old.getAugmentation().removeBoni((L2PcInstance) getOwner());
  483.                 }
  484. -              
  485. +
  486.                 old.updateDatabase();
  487.             }
  488. -          
  489. +
  490.             // Add new item in slot of paperdoll
  491.             if (item != null)
  492.             {
  493. @@ -956,20 +1049,21 @@
  494.                 item.setLocation(getEquipLocation(), slot);
  495.                 item.setLastChange(L2ItemInstance.MODIFIED);
  496.                 _wearedMask |= item.getItem().getItemMask();
  497. -              
  498. +
  499.                 for (final PaperdollListener listener : _paperdollListeners)
  500.                 {
  501.                     listener.notifyEquiped(slot, item);
  502.                 }
  503. -              
  504. +
  505.                 item.updateDatabase();
  506.             }
  507.         }
  508.         return old;
  509.     }
  510. -  
  511. +
  512.     /**
  513.      * Return the mask of weared item
  514. +    *
  515.      * @return int
  516.      */
  517.     public int getWearedMask()
  518. @@ -976,77 +1070,79 @@
  519.     {
  520.         return _wearedMask;
  521.     }
  522. -  
  523. +
  524.     public int getSlotFromItem(final L2ItemInstance item)
  525.     {
  526.         int slot = -1;
  527.         final int location = item.getEquipSlot();
  528. -      
  529. +
  530.         switch (location)
  531.         {
  532.             case PAPERDOLL_UNDER:
  533.                 slot = L2Item.SLOT_UNDERWEAR;
  534. -               break;
  535. +           break;
  536.             case PAPERDOLL_LEAR:
  537.                 slot = L2Item.SLOT_L_EAR;
  538. -               break;
  539. +           break;
  540.             case PAPERDOLL_REAR:
  541.                 slot = L2Item.SLOT_R_EAR;
  542. -               break;
  543. +           break;
  544.             case PAPERDOLL_NECK:
  545.                 slot = L2Item.SLOT_NECK;
  546. -               break;
  547. +           break;
  548.             case PAPERDOLL_RFINGER:
  549.                 slot = L2Item.SLOT_R_FINGER;
  550. -               break;
  551. +           break;
  552.             case PAPERDOLL_LFINGER:
  553.                 slot = L2Item.SLOT_L_FINGER;
  554. -               break;
  555. +           break;
  556.             case PAPERDOLL_HAIR:
  557.                 slot = L2Item.SLOT_HAIR;
  558. -               break;
  559. +           break;
  560.             case PAPERDOLL_FACE:
  561.                 slot = L2Item.SLOT_FACE;
  562. -               break;
  563. +           break;
  564.             case PAPERDOLL_DHAIR:
  565.                 slot = L2Item.SLOT_DHAIR;
  566. -               break;
  567. +           break;
  568.             case PAPERDOLL_HEAD:
  569.                 slot = L2Item.SLOT_HEAD;
  570. -               break;
  571. +           break;
  572.             case PAPERDOLL_RHAND:
  573.                 slot = L2Item.SLOT_R_HAND;
  574. -               break;
  575. +           break;
  576.             case PAPERDOLL_LHAND:
  577.                 slot = L2Item.SLOT_L_HAND;
  578. -               break;
  579. +           break;
  580.             case PAPERDOLL_GLOVES:
  581.                 slot = L2Item.SLOT_GLOVES;
  582. -               break;
  583. +           break;
  584.             // case PAPERDOLL_CHEST: slot = item.getItem().getBodyPart(); break;// fall through
  585.             case PAPERDOLL_CHEST:
  586.                 slot = L2Item.SLOT_CHEST;
  587. -               break; // TODO
  588. +           break; // TODO
  589.             case PAPERDOLL_LEGS:
  590.                 slot = L2Item.SLOT_LEGS;
  591. -               break;
  592. +           break;
  593.             case PAPERDOLL_BACK:
  594.                 slot = L2Item.SLOT_BACK;
  595. -               break;
  596. +           break;
  597.             case PAPERDOLL_FEET:
  598.                 slot = L2Item.SLOT_FEET;
  599. -               break;
  600. +           break;
  601.             case PAPERDOLL_LRHAND:
  602.                 slot = L2Item.SLOT_LR_HAND;
  603. -               break;
  604. +           break;
  605.         }
  606. -      
  607. +
  608.         return slot;
  609.     }
  610. -  
  611. +
  612.     /**
  613.      * Unequips item in body slot and returns alterations.
  614. -    * @param slot : int designating the slot of the paperdoll
  615. +    *
  616. +    * @param slot
  617. +    *        : int designating the slot of the paperdoll
  618.      * @return L2ItemInstance[] : list of changes
  619.      */
  620.     // public synchronized L2ItemInstance[] unEquipItemInBodySlotAndRecord(int slot)
  621. @@ -1053,17 +1149,17 @@
  622.     public L2ItemInstance[] unEquipItemInBodySlotAndRecord(final int slot)
  623.     {
  624.         final Inventory.ChangeRecorder recorder = newRecorder();
  625. -      
  626. +
  627.         try
  628.         {
  629.             unEquipItemInBodySlot(slot);
  630. -          
  631. +
  632.             if (getOwner() instanceof L2PcInstance)
  633.             {
  634.                 ((L2PcInstance) getOwner()).refreshExpertisePenalty();
  635.                 ((L2PcInstance) getOwner()).refreshMasteryPenality();
  636.                 ((L2PcInstance) getOwner()).refreshMasteryWeapPenality();
  637. -              
  638. +
  639.             }
  640.         }
  641.         finally
  642. @@ -1070,13 +1166,15 @@
  643.         {
  644.             removePaperdollListener(recorder);
  645.         }
  646. -      
  647. +
  648.         return recorder.getChangedItems();
  649.     }
  650. -  
  651. +
  652.     /**
  653.      * Sets item in slot of the paperdoll to null value
  654. -    * @param pdollSlot : int designating the slot
  655. +    *
  656. +    * @param pdollSlot
  657. +    *        : int designating the slot
  658.      * @return L2ItemInstance designating the item in slot before change
  659.      */
  660.     // public synchronized L2ItemInstance unEquipItemInSlot(int pdollSlot)
  661. @@ -1084,10 +1182,12 @@
  662.     {
  663.         return setPaperdollItem(pdollSlot, null);
  664.     }
  665. -  
  666. +
  667.     /**
  668.      * Unepquips item in slot and returns alterations
  669. -    * @param slot : int designating the slot
  670. +    *
  671. +    * @param slot
  672. +    *        : int designating the slot
  673.      * @return L2ItemInstance[] : list of items altered
  674.      */
  675.     // public synchronized L2ItemInstance[] unEquipItemInSlotAndRecord(int slot)
  676. @@ -1094,11 +1194,11 @@
  677.     public L2ItemInstance[] unEquipItemInSlotAndRecord(final int slot)
  678.     {
  679.         final Inventory.ChangeRecorder recorder = newRecorder();
  680. -      
  681. +
  682.         try
  683.         {
  684.             unEquipItemInSlot(slot);
  685. -          
  686. +
  687.             if (getOwner() instanceof L2PcInstance)
  688.             {
  689.                 ((L2PcInstance) getOwner()).refreshExpertisePenalty();
  690. @@ -1109,13 +1209,15 @@
  691.         {
  692.             removePaperdollListener(recorder);
  693.         }
  694. -      
  695. +
  696.         return recorder.getChangedItems();
  697.     }
  698. -  
  699. +
  700.     /**
  701.      * Unequips item in slot (i.e. equips with default value)
  702. -    * @param slot : int designating the slot
  703. +    *
  704. +    * @param slot
  705. +    *        : int designating the slot
  706.      */
  707.     private void unEquipItemInBodySlot(final int slot)
  708.     {
  709. @@ -1123,72 +1225,72 @@
  710.         {
  711.             LOGGER.debug("--- unequip body slot:" + slot);
  712.         }
  713. -      
  714. +
  715.         int pdollSlot = -1;
  716. -      
  717. +
  718.         switch (slot)
  719.         {
  720.             case L2Item.SLOT_L_EAR:
  721.                 pdollSlot = PAPERDOLL_LEAR;
  722. -               break;
  723. +           break;
  724.             case L2Item.SLOT_R_EAR:
  725.                 pdollSlot = PAPERDOLL_REAR;
  726. -               break;
  727. +           break;
  728.             case L2Item.SLOT_NECK:
  729.                 pdollSlot = PAPERDOLL_NECK;
  730. -               break;
  731. +           break;
  732.             case L2Item.SLOT_R_FINGER:
  733.                 pdollSlot = PAPERDOLL_RFINGER;
  734. -               break;
  735. +           break;
  736.             case L2Item.SLOT_L_FINGER:
  737.                 pdollSlot = PAPERDOLL_LFINGER;
  738. -               break;
  739. +           break;
  740.             case L2Item.SLOT_HAIR:
  741.                 pdollSlot = PAPERDOLL_HAIR;
  742. -               break;
  743. +           break;
  744.             case L2Item.SLOT_FACE:
  745.                 pdollSlot = PAPERDOLL_FACE;
  746. -               break;
  747. +           break;
  748.             case L2Item.SLOT_DHAIR:
  749.                 setPaperdollItem(PAPERDOLL_HAIR, null);
  750.                 setPaperdollItem(PAPERDOLL_FACE, null);// this should be the same as in DHAIR
  751.                 pdollSlot = PAPERDOLL_DHAIR;
  752. -               break;
  753. +           break;
  754.             case L2Item.SLOT_HEAD:
  755.                 pdollSlot = PAPERDOLL_HEAD;
  756. -               break;
  757. +           break;
  758.             case L2Item.SLOT_R_HAND:
  759.                 pdollSlot = PAPERDOLL_RHAND;
  760. -               break;
  761. +           break;
  762.             case L2Item.SLOT_L_HAND:
  763.                 pdollSlot = PAPERDOLL_LHAND;
  764. -               break;
  765. +           break;
  766.             case L2Item.SLOT_GLOVES:
  767.                 pdollSlot = PAPERDOLL_GLOVES;
  768. -               break;
  769. +           break;
  770.             case L2Item.SLOT_CHEST:
  771.                 pdollSlot = PAPERDOLL_CHEST;
  772. -               break; // TODO: пїЅпїЅпїЅпїЅ "пїЅпїЅпїЅпїЅпїЅ"
  773. +           break; // TODO: пїЅпїЅпїЅпїЅ "пїЅпїЅпїЅпїЅпїЅ"
  774.             case L2Item.SLOT_FULL_ARMOR:
  775.                 pdollSlot = PAPERDOLL_CHEST;
  776. -               break;
  777. +           break;
  778.             case L2Item.SLOT_LEGS:
  779.                 pdollSlot = PAPERDOLL_LEGS;
  780. -               break;
  781. +           break;
  782.             case L2Item.SLOT_BACK:
  783.                 pdollSlot = PAPERDOLL_BACK;
  784. -               break;
  785. +           break;
  786.             case L2Item.SLOT_FEET:
  787.                 pdollSlot = PAPERDOLL_FEET;
  788. -               break;
  789. +           break;
  790.             case L2Item.SLOT_UNDERWEAR:
  791.                 pdollSlot = PAPERDOLL_UNDER;
  792. -               break;
  793. +           break;
  794.             case L2Item.SLOT_LR_HAND:
  795.                 setPaperdollItem(PAPERDOLL_LHAND, null);
  796.                 setPaperdollItem(PAPERDOLL_RHAND, null);// this should be the same as in LRHAND
  797.                 pdollSlot = PAPERDOLL_LRHAND;
  798. -               break;
  799. +           break;
  800.         }
  801.         if (pdollSlot >= 0)
  802.         {
  803. @@ -1195,16 +1297,18 @@
  804.             setPaperdollItem(pdollSlot, null);
  805.         }
  806.     }
  807. -  
  808. +
  809.     /**
  810.      * Equips item and returns list of alterations
  811. -    * @param item : L2ItemInstance corresponding to the item
  812. +    *
  813. +    * @param item
  814. +    *        : L2ItemInstance corresponding to the item
  815.      * @return L2ItemInstance[] : list of alterations
  816.      */
  817.     public L2ItemInstance[] equipItemAndRecord(final L2ItemInstance item)
  818.     {
  819.         final Inventory.ChangeRecorder recorder = newRecorder();
  820. -      
  821. +
  822.         try
  823.         {
  824.             equipItem(item);
  825. @@ -1213,34 +1317,36 @@
  826.         {
  827.             removePaperdollListener(recorder);
  828.         }
  829. -      
  830. +
  831.         return recorder.getChangedItems();
  832.     }
  833. -  
  834. +
  835.     /**
  836.      * Equips item in slot of paperdoll.
  837. -    * @param item : L2ItemInstance designating the item and slot used.
  838. +    *
  839. +    * @param item
  840. +    *        : L2ItemInstance designating the item and slot used.
  841.      */
  842.     public synchronized void equipItem(final L2ItemInstance item)
  843.     {
  844.         if (getOwner() instanceof L2PcInstance && ((L2PcInstance) getOwner()).getPrivateStoreType() != 0)
  845.             return;
  846. -      
  847. +
  848.         if (getOwner() instanceof L2PcInstance)
  849.         {
  850.             final L2PcInstance player = (L2PcInstance) getOwner();
  851. -          
  852. +
  853.             // Like L2OFF weapon hero and crown aren't removed after restart
  854.             if (!player.isGM())
  855.                 if (!player.isHero())
  856.                 {
  857.                     final int itemId = item.getItemId();
  858. -                  
  859. +
  860.                     if (itemId >= 6611 && itemId <= 6621 || itemId == 6842)
  861.                         return;
  862.                 }
  863.         }
  864. -      
  865. +
  866.         final int targetSlot = item.getItem().getBodyPart();
  867.         switch (targetSlot)
  868.         {
  869. @@ -1256,10 +1362,10 @@
  870.                 {
  871.                     setPaperdollItem(PAPERDOLL_RHAND, null);
  872.                 }
  873. -              
  874. +
  875.                 setPaperdollItem(PAPERDOLL_RHAND, item);
  876.                 setPaperdollItem(PAPERDOLL_LRHAND, item);
  877. -              
  878. +
  879.                 break;
  880.             }
  881.             case L2Item.SLOT_L_HAND:
  882. @@ -1267,13 +1373,13 @@
  883.                 if (!(item.getItem() instanceof L2EtcItem) || item.getItem().getItemType() != L2EtcItemType.ARROW)
  884.                 {
  885.                     final L2ItemInstance old1 = setPaperdollItem(PAPERDOLL_LRHAND, null);
  886. -                  
  887. +
  888.                     if (old1 != null)
  889.                     {
  890.                         setPaperdollItem(PAPERDOLL_RHAND, null);
  891.                     }
  892.                 }
  893. -              
  894. +
  895.                 setPaperdollItem(PAPERDOLL_LHAND, null);
  896.                 setPaperdollItem(PAPERDOLL_LHAND, item);
  897.                 break;
  898. @@ -1290,7 +1396,7 @@
  899.                 {
  900.                     setPaperdollItem(PAPERDOLL_RHAND, null);
  901.                 }
  902. -              
  903. +
  904.                 setPaperdollItem(PAPERDOLL_RHAND, item);
  905.                 break;
  906.             }
  907. @@ -1311,7 +1417,7 @@
  908.                     setPaperdollItem(PAPERDOLL_LEAR, null);
  909.                     setPaperdollItem(PAPERDOLL_LEAR, item);
  910.                 }
  911. -              
  912. +
  913.                 break;
  914.             }
  915.             case L2Item.SLOT_L_FINGER:
  916. @@ -1331,20 +1437,20 @@
  917.                     setPaperdollItem(PAPERDOLL_LFINGER, null);
  918.                     setPaperdollItem(PAPERDOLL_LFINGER, item);
  919.                 }
  920. -              
  921. +
  922.                 break;
  923.             }
  924.             case L2Item.SLOT_NECK:
  925.                 setPaperdollItem(PAPERDOLL_NECK, item);
  926. -               break;
  927. +           break;
  928.             case L2Item.SLOT_FULL_ARMOR:
  929.                 setPaperdollItem(PAPERDOLL_CHEST, null);
  930.                 setPaperdollItem(PAPERDOLL_LEGS, null);
  931.                 setPaperdollItem(PAPERDOLL_CHEST, item);
  932. -               break;
  933. +           break;
  934.             case L2Item.SLOT_CHEST:
  935.                 setPaperdollItem(PAPERDOLL_CHEST, item);
  936. -               break;
  937. +           break;
  938.             case L2Item.SLOT_LEGS:
  939.             {
  940.                 // handle full armor
  941. @@ -1353,7 +1459,7 @@
  942.                 {
  943.                     setPaperdollItem(PAPERDOLL_CHEST, null);
  944.                 }
  945. -              
  946. +
  947.                 setPaperdollItem(PAPERDOLL_LEGS, null);
  948.                 setPaperdollItem(PAPERDOLL_LEGS, item);
  949.                 chest = null;
  950. @@ -1361,13 +1467,13 @@
  951.             }
  952.             case L2Item.SLOT_FEET:
  953.                 setPaperdollItem(PAPERDOLL_FEET, item);
  954. -               break;
  955. +           break;
  956.             case L2Item.SLOT_GLOVES:
  957.                 setPaperdollItem(PAPERDOLL_GLOVES, item);
  958. -               break;
  959. +           break;
  960.             case L2Item.SLOT_HEAD:
  961.                 setPaperdollItem(PAPERDOLL_HEAD, item);
  962. -               break;
  963. +           break;
  964.             case L2Item.SLOT_HAIR:
  965.                 if (setPaperdollItem(PAPERDOLL_DHAIR, null) != null)
  966.                 {
  967. @@ -1379,9 +1485,9 @@
  968.                 {
  969.                     setPaperdollItem(PAPERDOLL_HAIR, null);
  970.                 }
  971. -              
  972. +
  973.                 setPaperdollItem(PAPERDOLL_HAIR, item);
  974. -               break;
  975. +           break;
  976.             case L2Item.SLOT_FACE:
  977.                 if (setPaperdollItem(PAPERDOLL_DHAIR, null) != null)
  978.                 {
  979. @@ -1393,9 +1499,9 @@
  980.                 {
  981.                     setPaperdollItem(PAPERDOLL_FACE, null);
  982.                 }
  983. -              
  984. +
  985.                 setPaperdollItem(PAPERDOLL_FACE, item);
  986. -               break;
  987. +           break;
  988.             case L2Item.SLOT_DHAIR:
  989.                 if (setPaperdollItem(PAPERDOLL_HAIR, null) != null)
  990.                 {
  991. @@ -1406,20 +1512,20 @@
  992.                 {
  993.                     setPaperdollItem(PAPERDOLL_FACE, null);
  994.                 }
  995. -              
  996. +
  997.                 setPaperdollItem(PAPERDOLL_DHAIR, item);
  998. -               break;
  999. +           break;
  1000.             case L2Item.SLOT_UNDERWEAR:
  1001.                 setPaperdollItem(PAPERDOLL_UNDER, item);
  1002. -               break;
  1003. +           break;
  1004.             case L2Item.SLOT_BACK:
  1005.                 setPaperdollItem(PAPERDOLL_BACK, item);
  1006. -               break;
  1007. +           break;
  1008.             default:
  1009.                 LOGGER.warn("unknown body slot:" + targetSlot);
  1010.         }
  1011.     }
  1012. -  
  1013. +
  1014.     /**
  1015.      * Refresh the weight of equipment loaded
  1016.      */
  1017. @@ -1427,7 +1533,7 @@
  1018.     protected void refreshWeight()
  1019.     {
  1020.         int weight = 0;
  1021. -      
  1022. +
  1023.         for (final L2ItemInstance item : _items)
  1024.         {
  1025.             if (item != null && item.getItem() != null)
  1026. @@ -1435,12 +1541,13 @@
  1027.                 weight += item.getItem().getWeight() * item.getCount();
  1028.             }
  1029.         }
  1030. -      
  1031. +
  1032.         _totalWeight = weight;
  1033.     }
  1034. -  
  1035. +
  1036.     /**
  1037.      * Returns the totalWeight.
  1038. +    *
  1039.      * @return int
  1040.      */
  1041.     public int getTotalWeight()
  1042. @@ -1447,11 +1554,13 @@
  1043.     {
  1044.         return _totalWeight;
  1045.     }
  1046. -  
  1047. +
  1048.     /**
  1049.      * Return the L2ItemInstance of the arrows needed for this bow.<BR>
  1050.      * <BR>
  1051. -    * @param bow : L2Item designating the bow
  1052. +    *
  1053. +    * @param bow
  1054. +    *        : L2Item designating the bow
  1055.      * @return L2ItemInstance pointing out arrows for bow
  1056.      */
  1057.     public L2ItemInstance findArrowForBow(final L2Item bow)
  1058. @@ -1458,39 +1567,39 @@
  1059.     {
  1060.         if (bow == null)
  1061.             return null;
  1062. -      
  1063. +
  1064.         // Check if char has the bow equiped
  1065.         if (bow.getItemType() != L2WeaponType.BOW)
  1066.             return null;
  1067. -      
  1068. +
  1069.         int arrowsId = 0;
  1070. -      
  1071. +
  1072.         switch (bow.getCrystalType())
  1073.         {
  1074.             default: // broken weapon.csv ??
  1075.             case L2Item.CRYSTAL_NONE:
  1076.                 arrowsId = 17;
  1077. -               break; // Wooden arrow
  1078. +           break; // Wooden arrow
  1079.             case L2Item.CRYSTAL_D:
  1080.                 arrowsId = 1341;
  1081. -               break; // Bone arrow
  1082. +           break; // Bone arrow
  1083.             case L2Item.CRYSTAL_C:
  1084.                 arrowsId = 1342;
  1085. -               break; // Fine steel arrow
  1086. +           break; // Fine steel arrow
  1087.             case L2Item.CRYSTAL_B:
  1088.                 arrowsId = 1343;
  1089. -               break; // Silver arrow
  1090. +           break; // Silver arrow
  1091.             case L2Item.CRYSTAL_A:
  1092.                 arrowsId = 1344;
  1093. -               break; // Mithril arrow
  1094. +           break; // Mithril arrow
  1095.             case L2Item.CRYSTAL_S:
  1096.                 arrowsId = 1345;
  1097. -               break; // Shining arrow
  1098. +           break; // Shining arrow
  1099.         }
  1100.         // Get the L2ItemInstance corresponding to the item identifier and return it
  1101.         return getItemByItemId(arrowsId);
  1102.     }
  1103. -  
  1104. +
  1105.     /**
  1106.      * Get back items in inventory from database
  1107.      */
  1108. @@ -1506,40 +1615,40 @@
  1109.             statement.setString(2, getBaseLocation().name());
  1110.             statement.setString(3, getEquipLocation().name());
  1111.             ResultSet inv = statement.executeQuery();
  1112. -          
  1113. +
  1114.             L2ItemInstance item;
  1115. -          
  1116. +
  1117.             while (inv.next())
  1118.             {
  1119.                 final int objectId = inv.getInt(1);
  1120. -              
  1121. +
  1122.                 item = L2ItemInstance.restoreFromDb(objectId);
  1123. -              
  1124. +
  1125.                 if (item == null)
  1126.                 {
  1127.                     continue;
  1128.                 }
  1129. -              
  1130. +
  1131.                 if (getOwner() instanceof L2PcInstance)
  1132.                 {
  1133.                     L2PcInstance player = (L2PcInstance) getOwner();
  1134. -                  
  1135. +
  1136.                     if (!player.isGM())
  1137.                         if (!player.isHero())
  1138.                         {
  1139.                             final int itemId = item.getItemId();
  1140. -                          
  1141. +
  1142.                             if (itemId >= 6611 && itemId <= 6621 || itemId == 6842)
  1143.                             {
  1144.                                 item.setLocation(ItemLocation.INVENTORY);
  1145.                             }
  1146.                         }
  1147. -                  
  1148. +
  1149.                     player = null;
  1150.                 }
  1151. -              
  1152. +
  1153.                 L2World.getInstance().storeObject(item);
  1154. -              
  1155. +
  1156.                 // If stackable item is found in inventory just add to current quantity
  1157.                 if (item.isStackable() && getItemByItemId(item.getItemId()) != null)
  1158.                 {
  1159. @@ -1550,11 +1659,11 @@
  1160.                     addItem(item);
  1161.                 }
  1162.             }
  1163. -          
  1164. +
  1165.             inv.close();
  1166.             DatabaseUtils.close(statement);
  1167.             refreshWeight();
  1168. -          
  1169. +
  1170.             statement = null;
  1171.             inv = null;
  1172.             item = null;
  1173. @@ -1570,7 +1679,7 @@
  1174.             con = null;
  1175.         }
  1176.     }
  1177. -  
  1178. +
  1179.     /**
  1180.      * Re-notify to paperdoll listeners every equipped item
  1181.      */
  1182. @@ -1577,9 +1686,9 @@
  1183.     public void reloadEquippedItems()
  1184.     {
  1185.         L2ItemInstance item;
  1186. -      
  1187. +
  1188.         int slot;
  1189. -      
  1190. +
  1191.         for (final L2ItemInstance element : _paperdoll)
  1192.         {
  1193.             item = element;
  1194. @@ -1587,9 +1696,9 @@
  1195.             {
  1196.                 continue;
  1197.             }
  1198. -          
  1199. +
  1200.             slot = item.getEquipSlot();
  1201. -          
  1202. +
  1203.             for (final PaperdollListener listener : _paperdollListeners)
  1204.             {
  1205.                 if (listener == null)
  1206. @@ -1596,12 +1705,12 @@
  1207.                 {
  1208.                     continue;
  1209.                 }
  1210. -              
  1211. +
  1212.                 listener.notifyUnequiped(slot, item);
  1213.                 listener.notifyEquiped(slot, item);
  1214.             }
  1215.         }
  1216. -      
  1217. +
  1218.         item = null;
  1219.     }
  1220.  }
  1221. Index: head-src/com/l2jfrozen/gameserver/datatables/sql/ArmorSetsTable.java
  1222. ===================================================================
  1223. --- head-src/com/l2jfrozen/gameserver/datatables/sql/ArmorSetsTable.java    (revision 1132)
  1224. +++ head-src/com/l2jfrozen/gameserver/datatables/sql/ArmorSetsTable.java    (working copy)
  1225. @@ -64,7 +64,7 @@
  1226.         try
  1227.         {
  1228.             con = L2DatabaseFactory.getInstance().getConnection(false);
  1229. -           final PreparedStatement statement = con.prepareStatement("SELECT id, chest, legs, head, gloves, feet, skill_id, shield, shield_skill_id, enchant6skill FROM armorsets");
  1230. +           final PreparedStatement statement = con.prepareStatement("SELECT id, chest, legs, head, gloves, feet, skill_id, shield, shield_skill_id, enchant6skill, enchant12skill, enchant16skill FROM armorsets");
  1231.             final ResultSet rset = statement.executeQuery();
  1232.            
  1233.             while (rset.next())
  1234. @@ -79,8 +79,10 @@
  1235.                 final int shield = rset.getInt("shield");
  1236.                 final int shield_skill_id = rset.getInt("shield_skill_id");
  1237.                 final int enchant6skill = rset.getInt("enchant6skill");
  1238. +               final int enchant12skill = rset.getInt("enchant12skill");
  1239. +               final int enchant16skill = rset.getInt("enchant16skill");
  1240.                
  1241. -               armorSets.put(chest, new L2ArmorSet(chest, legs, head, gloves, feet, skill_id, shield, shield_skill_id, enchant6skill));
  1242. +               armorSets.put(chest, new L2ArmorSet(chest, legs, head, gloves, feet, skill_id, shield, shield_skill_id, enchant6skill, enchant12skill, enchant16skill));
  1243.                 cusArmorSets.put(id, new ArmorDummy(chest, legs, head, gloves, feet, skill_id, shield));
  1244.             }
  1245.            
  1246. Index: head-src/com/l2jfrozen/gameserver/datatables/sql/CustomArmorSetsTable.java
  1247. ===================================================================
  1248. --- head-src/com/l2jfrozen/gameserver/datatables/sql/CustomArmorSetsTable.java  (revision 1132)
  1249. +++ head-src/com/l2jfrozen/gameserver/datatables/sql/CustomArmorSetsTable.java  (working copy)
  1250. @@ -53,7 +53,7 @@
  1251.         try
  1252.         {
  1253.             con = L2DatabaseFactory.getInstance().getConnection(false);
  1254. -           final PreparedStatement statement = con.prepareStatement("SELECT chest, legs, head, gloves, feet, skill_id, shield, shield_skill_id, enchant6skill FROM custom_armorsets");
  1255. +           final PreparedStatement statement = con.prepareStatement("SELECT chest, legs, head, gloves, feet, skill_id, shield, shield_skill_id, enchant6skill, enchant12skill, enchant16skill FROM custom_armorsets");
  1256.             final ResultSet rset = statement.executeQuery();
  1257.            
  1258.             while (rset.next())
  1259. @@ -67,7 +67,9 @@
  1260.                 final int shield = rset.getInt("shield");
  1261.                 final int shield_skill_id = rset.getInt("shield_skill_id");
  1262.                 final int enchant6skill = rset.getInt("enchant6skill");
  1263. -               ArmorSetsTable.getInstance().addObj(chest, new L2ArmorSet(chest, legs, head, gloves, feet, skill_id, shield, shield_skill_id, enchant6skill));
  1264. +               final int enchant12skill = rset.getInt("enchant12skill");
  1265. +               final int enchant16skill = rset.getInt("enchant16skill");
  1266. +               ArmorSetsTable.getInstance().addObj(chest, new L2ArmorSet(chest, legs, head, gloves, feet, skill_id, shield, shield_skill_id, enchant6skill, enchant12skill, enchant16skill));
  1267.             }
  1268.             LOGGER.info("ArmorSetsTable: Loaded custom armor sets.");
  1269.            
  1270. Index: head-src/com/l2jfrozen/gameserver/model/L2ArmorSet.java
  1271. ===================================================================
  1272. --- head-src/com/l2jfrozen/gameserver/model/L2ArmorSet.java (revision 1132)
  1273. +++ head-src/com/l2jfrozen/gameserver/model/L2ArmorSet.java (working copy)
  1274. @@ -40,8 +40,10 @@
  1275.     private final int _shieldSkillId;
  1276.    
  1277.     private final int _enchant6Skill;
  1278. +   private final int _enchant12Skill;
  1279. +   private final int _enchant16Skill;
  1280.    
  1281. -   public L2ArmorSet(final int chest, final int legs, final int head, final int gloves, final int feet, final int skill_id, final int shield, final int shield_skill_id, final int enchant6skill)
  1282. +   public L2ArmorSet(final int chest, final int legs, final int head, final int gloves, final int feet, final int skill_id, final int shield, final int shield_skill_id, final int enchant6skill, final int enchant12skill, final int enchant16skill)
  1283.     {
  1284.         _chest = chest;
  1285.         _legs = legs;
  1286. @@ -54,6 +56,8 @@
  1287.         _shieldSkillId = shield_skill_id;
  1288.        
  1289.         _enchant6Skill = enchant6skill;
  1290. +       _enchant12Skill = enchant12skill;
  1291. +       _enchant16Skill = enchant16skill;
  1292.     }
  1293.    
  1294.     /**
  1295. @@ -173,7 +177,17 @@
  1296.     {
  1297.         return _enchant6Skill;
  1298.     }
  1299. -  
  1300. +    
  1301. +    public int getEnchant12skillId()
  1302. +    {
  1303. +        return _enchant12Skill;
  1304. +    }
  1305. +    
  1306. +    public int getEnchant16skillId()
  1307. +    {
  1308. +        return _enchant16Skill;
  1309. +    }
  1310. +  
  1311.     /**
  1312.      * Checks if all parts of set are enchanted to +6 or more
  1313.      * @param player
  1314. @@ -212,4 +226,59 @@
  1315.        
  1316.         return true;
  1317.     }
  1318. +    
  1319. +    public boolean isEnchanted12(L2PcInstance player)
  1320. +    {
  1321. +        // Player don't have full set
  1322. +        if (!containAll(player))
  1323. +            return false;
  1324. +        
  1325. +        Inventory inv = player.getInventory();
  1326. +        
  1327. +        L2ItemInstance chestItem = inv.getPaperdollItem(Inventory.PAPERDOLL_CHEST);
  1328. +        L2ItemInstance legsItem = inv.getPaperdollItem(Inventory.PAPERDOLL_LEGS);
  1329. +        L2ItemInstance headItem = inv.getPaperdollItem(Inventory.PAPERDOLL_HEAD);
  1330. +        L2ItemInstance glovesItem = inv.getPaperdollItem(Inventory.PAPERDOLL_GLOVES);
  1331. +        L2ItemInstance feetItem = inv.getPaperdollItem(Inventory.PAPERDOLL_FEET);
  1332. +        
  1333. +        if (chestItem == null || chestItem.getEnchantLevel() < 12)
  1334. +            return false;
  1335. +        if (_legs != 0 && (legsItem == null || legsItem.getEnchantLevel() < 12))
  1336. +            return false;
  1337. +        if (_gloves != 0 && (glovesItem == null || glovesItem.getEnchantLevel() < 12))
  1338. +            return false;
  1339. +        if (_head != 0 && (headItem == null || headItem.getEnchantLevel() < 12))
  1340. +            return false;
  1341. +        if (_feet != 0 && (feetItem == null || feetItem.getEnchantLevel() < 12))
  1342. +            return false;
  1343. +        
  1344. +        return true;
  1345. +    }
  1346. +    public boolean isEnchanted16(L2PcInstance player)
  1347. +    {
  1348. +        // Player don't have full set
  1349. +        if (!containAll(player))
  1350. +            return false;
  1351. +        
  1352. +        Inventory inv = player.getInventory();
  1353. +        
  1354. +        L2ItemInstance chestItem = inv.getPaperdollItem(Inventory.PAPERDOLL_CHEST);
  1355. +        L2ItemInstance legsItem = inv.getPaperdollItem(Inventory.PAPERDOLL_LEGS);
  1356. +        L2ItemInstance headItem = inv.getPaperdollItem(Inventory.PAPERDOLL_HEAD);
  1357. +        L2ItemInstance glovesItem = inv.getPaperdollItem(Inventory.PAPERDOLL_GLOVES);
  1358. +        L2ItemInstance feetItem = inv.getPaperdollItem(Inventory.PAPERDOLL_FEET);
  1359. +        
  1360. +        if (chestItem == null || chestItem.getEnchantLevel() < 16)
  1361. +            return false;
  1362. +        if (_legs != 0 && (legsItem == null || legsItem.getEnchantLevel() < 16))
  1363. +            return false;
  1364. +        if (_gloves != 0 && (glovesItem == null || glovesItem.getEnchantLevel() < 16))
  1365. +            return false;
  1366. +        if (_head != 0 && (headItem == null || headItem.getEnchantLevel() < 16))
  1367. +            return false;
  1368. +        if (_feet != 0 && (feetItem == null || feetItem.getEnchantLevel() < 16))
  1369. +            return false;
  1370. +        
  1371. +        return true;
  1372. +    }
  1373.  }
  1374. #P L2jFrozen_DataPack
  1375. Index: sql/armorsets.sql
  1376. ===================================================================
  1377. --- sql/armorsets.sql   (revision 1132)
  1378. +++ sql/armorsets.sql   (working copy)
  1379. @@ -12,88 +12,90 @@
  1380.   shield decimal(11,0) NOT NULL default '0',
  1381.   shield_skill_id decimal(11,0) NOT NULL default '0',
  1382.   enchant6skill decimal(11,0) NOT NULL default '0',
  1383. + enchant12skill decimal(11,0) NOT NULL default '0',
  1384. + enchant16skill decimal(11,0) NOT NULL default '0',
  1385.   PRIMARY KEY (id,chest)
  1386.  ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  1387.  
  1388.  --                 NO GRADE              -------------
  1389. --- ######################## id chest  legs head gloves feet    skill  shield sh_skill enchant6
  1390. -INSERT INTO armorsets VALUES(1,  23,   2386, 43,   0,    0,      3500,   0,    0,    0);        -- Wooden Breastplate set (heavy)
  1391. -INSERT INTO armorsets VALUES(2,  1101, 1104, 44,   0,    0,      3501,   0,    0,    0);        -- Devotion robe set (robe)
  1392. +-- ######################## id chest  legs head gloves feet    skill  shield sh_skill enchant6 enchant12 enchant16
  1393. +INSERT INTO armorsets VALUES(1,  23,   2386, 43,   0,    0,      3500,   0,    0,    0,    0,    0);        -- Wooden Breastplate set (heavy)
  1394. +INSERT INTO armorsets VALUES(2,  1101, 1104, 44,   0,    0,      3501,   0,    0,    0,    0,    0);        -- Devotion robe set (robe)
  1395.  
  1396.  --                 D GRADE              -------------
  1397. --- ######################## id chest  legs head gloves feet    skill  shield sh_skill enchant6
  1398. -INSERT INTO armorsets VALUES(3,  58,   59,   47,   0,    0,      3502,   628,  3543,  3611);    -- Mithril Breastplate set(heavy)
  1399. -INSERT INTO armorsets VALUES(4,  352,  2378, 2411, 0,    0,      3506,   2493, 3544,  3611);    -- Brigandine Armor set
  1400. +-- ######################## id chest  legs head gloves feet    skill  shield sh_skill enchant6 enchant12 enchant16
  1401. +INSERT INTO armorsets VALUES(3,  58,   59,   47,   0,    0,      3502,   628,  3543,  3611,    0,    0);    -- Mithril Breastplate set(heavy)
  1402. +INSERT INTO armorsets VALUES(4,  352,  2378, 2411, 0,    0,      3506,   2493, 3544,  3611,    0,    0);    -- Brigandine Armor set
  1403.  
  1404. -INSERT INTO armorsets VALUES(5,  394,  416,  0,    0,    2422,   3503,   0,    0,     3612);    -- Reinforced leather set
  1405. -INSERT INTO armorsets VALUES(6,  395,  417,  0,    0,    2424,   3505,   0,    0,     3612);    -- Manticore skin set
  1406. +INSERT INTO armorsets VALUES(5,  394,  416,  0,    0,    2422,   3503,   0,    0,     3612,    0,    0);    -- Reinforced leather set
  1407. +INSERT INTO armorsets VALUES(6,  395,  417,  0,    0,    2424,   3505,   0,    0,     3612,    0,    0);    -- Manticore skin set
  1408.  
  1409. -INSERT INTO armorsets VALUES(7,  436,  469,  0,    2447, 0,      3504,   0,    0,     3613);    -- Tunic of knowledge set
  1410. -INSERT INTO armorsets VALUES(8,  437,  470,  0,    2450, 0,      3507,   0,    0,     3613);    -- Mithril Tunic
  1411. +INSERT INTO armorsets VALUES(7,  436,  469,  0,    2447, 0,      3504,   0,    0,     3613,    0,    0);    -- Tunic of knowledge set
  1412. +INSERT INTO armorsets VALUES(8,  437,  470,  0,    2450, 0,      3507,   0,    0,     3613,    0,    0);    -- Mithril Tunic
  1413.  
  1414.  --                 C GRADE              -------------
  1415. --- ######################## id chest  legs head gloves feet    skill  shield sh_skill enchant6
  1416. -INSERT INTO armorsets VALUES(9,  354,  381,  2413, 0,    0,      3509,   2495, 3545,  3614);    -- Chain Mail Shirt set
  1417. -INSERT INTO armorsets VALUES(10, 60,   0,    517,  0,    0,      3512,   107,  3546,  3614);    -- Composite Armor set
  1418. -INSERT INTO armorsets VALUES(11, 356,  0,    2414, 0,    0,      3516,   2497, 3547,  3614);    -- Full Plate Armor set
  1419. +-- ######################## id chest  legs head gloves feet    skill  shield sh_skill enchant6 enchant12 enchant16
  1420. +INSERT INTO armorsets VALUES(9,  354,  381,  2413, 0,    0,      3509,   2495, 3545,  3614,    0,    0);    -- Chain Mail Shirt set
  1421. +INSERT INTO armorsets VALUES(10, 60,   0,    517,  0,    0,      3512,   107,  3546,  3614,    0,    0);    -- Composite Armor set
  1422. +INSERT INTO armorsets VALUES(11, 356,  0,    2414, 0,    0,      3516,   2497, 3547,  3614,    0,    0);    -- Full Plate Armor set
  1423.  
  1424. -INSERT INTO armorsets VALUES(12, 397,  2387, 0,    0,    62,     3508,   0,    0,     3615);    -- Mithrill shirt set
  1425. -INSERT INTO armorsets VALUES(13, 398,  418,  0,    0,    2431,   3511,   0,    0,     3615);    -- Plated leather set
  1426. -INSERT INTO armorsets VALUES(14, 400,  420,  0,    0,    2436,   3514,   0,    0,     3615);    -- Theca leather set
  1427. -INSERT INTO armorsets VALUES(15, 401,  0,    0,    0,    2437,   3515,   0,    0,     3615);    -- Drake leather set
  1428. +INSERT INTO armorsets VALUES(12, 397,  2387, 0,    0,    62,     3508,   0,    0,     3615,    0,    0);    -- Mithrill shirt set
  1429. +INSERT INTO armorsets VALUES(13, 398,  418,  0,    0,    2431,   3511,   0,    0,     3615,    0,    0);    -- Plated leather set
  1430. +INSERT INTO armorsets VALUES(14, 400,  420,  0,    0,    2436,   3514,   0,    0,     3615,    0,    0);    -- Theca leather set
  1431. +INSERT INTO armorsets VALUES(15, 401,  0,    0,    0,    2437,   3515,   0,    0,     3615,    0,    0);    -- Drake leather set
  1432.  
  1433. -INSERT INTO armorsets VALUES(16, 439,  471,  0,    2454, 0,      3510,   0,    0,     3616);    -- Karmian robe set
  1434. -INSERT INTO armorsets VALUES(17, 441,  472,  0,    2459, 0,      3513,   0,    0,     3616);    -- Demon robe set
  1435. -INSERT INTO armorsets VALUES(18, 442,  473,  0,    2463, 0,      3517,   0,    0,     3616);    -- Divine robe set
  1436. +INSERT INTO armorsets VALUES(16, 439,  471,  0,    2454, 0,      3510,   0,    0,     3616,    0,    0);    -- Karmian robe set
  1437. +INSERT INTO armorsets VALUES(17, 441,  472,  0,    2459, 0,      3513,   0,    0,     3616,    0,    0);    -- Demon robe set
  1438. +INSERT INTO armorsets VALUES(18, 442,  473,  0,    2463, 0,      3517,   0,    0,     3616,    0,    0);    -- Divine robe set
  1439.  
  1440.  --                 B GRADE              -------------
  1441. --- ######################## id chest  legs head gloves feet    skill  shield sh_skill enchant6
  1442. -INSERT INTO armorsets VALUES(19, 357,  383,  503,  5710, 5726,   3518,   0,    0,     3617);    -- Zubei's Breastplate set
  1443. -INSERT INTO armorsets VALUES(20, 2384, 2388, 503,  5711, 5727,   3520,   0,    0,     3618);    -- Zubei's leather set
  1444. -INSERT INTO armorsets VALUES(21, 2397, 2402, 503,  5712, 5728,   3522,   0,    0,     3619);    -- Zubei robe set
  1445. +-- ######################## id chest  legs head gloves feet    skill  shield sh_skill enchant6 enchant12 enchant16
  1446. +INSERT INTO armorsets VALUES(19, 357,  383,  503,  5710, 5726,   3518,   0,    0,     3617,    0,    0);    -- Zubei's Breastplate set
  1447. +INSERT INTO armorsets VALUES(20, 2384, 2388, 503,  5711, 5727,   3520,   0,    0,     3618,    0,    0);    -- Zubei's leather set
  1448. +INSERT INTO armorsets VALUES(21, 2397, 2402, 503,  5712, 5728,   3522,   0,    0,     3619,    0,    0);    -- Zubei robe set
  1449.  
  1450. -INSERT INTO armorsets VALUES(22, 2376, 2379, 2415, 5714, 5730,   3519,   673,  3548,  3617);    -- Avadon heavy set
  1451. -INSERT INTO armorsets VALUES(23, 2390, 0,    2415, 5715, 5731,   3521,   0,    0,     3618);    -- Avadon leather set
  1452. -INSERT INTO armorsets VALUES(24, 2406, 0,    2415, 5716, 5732,   3523,   0,    0,     3619);    -- Avadon robe set
  1453. +INSERT INTO armorsets VALUES(22, 2376, 2379, 2415, 5714, 5730,   3519,   673,  3548,  3617,    0,    0);    -- Avadon heavy set
  1454. +INSERT INTO armorsets VALUES(23, 2390, 0,    2415, 5715, 5731,   3521,   0,    0,     3618,    0,    0);    -- Avadon leather set
  1455. +INSERT INTO armorsets VALUES(24, 2406, 0,    2415, 5716, 5732,   3523,   0,    0,     3619,    0,    0);    -- Avadon robe set
  1456.  
  1457. -INSERT INTO armorsets VALUES(25, 358,  2380, 2416, 5718, 5734,   3524,   0,    0,     3617);    -- Blue Wolf's Breastplate set
  1458. -INSERT INTO armorsets VALUES(26, 2391, 0,    2416, 5719, 5735,   3526,   0,    0,     3618);    -- Blue wolf leather set
  1459. -INSERT INTO armorsets VALUES(27, 2398, 2403, 2416, 5720, 5736,   3528,   0,    0,     3619);    -- Blue Wolf robe set
  1460. +INSERT INTO armorsets VALUES(25, 358,  2380, 2416, 5718, 5734,   3524,   0,    0,     3617,    0,    0);    -- Blue Wolf's Breastplate set
  1461. +INSERT INTO armorsets VALUES(26, 2391, 0,    2416, 5719, 5735,   3526,   0,    0,     3618,    0,    0);    -- Blue wolf leather set
  1462. +INSERT INTO armorsets VALUES(27, 2398, 2403, 2416, 5720, 5736,   3528,   0,    0,     3619,    0,    0);    -- Blue Wolf robe set
  1463.  
  1464. -INSERT INTO armorsets VALUES(28, 2381, 0,    2417, 5722, 5738,   3525,   110,  3549,  3617);    -- Doom plate heavy set
  1465. -INSERT INTO armorsets VALUES(29, 2392, 0,    2417, 5723, 5739,   3527,   0,    0,     3618);    -- Doom leather set
  1466. -INSERT INTO armorsets VALUES(30, 2399, 2404, 2417, 5724, 5740,   3529,   0,    0,     3619);    -- Doom robe set
  1467. +INSERT INTO armorsets VALUES(28, 2381, 0,    2417, 5722, 5738,   3525,   110,  3549,  3617,    0,    0);    -- Doom plate heavy set
  1468. +INSERT INTO armorsets VALUES(29, 2392, 0,    2417, 5723, 5739,   3527,   0,    0,     3618,    0,    0);    -- Doom leather set
  1469. +INSERT INTO armorsets VALUES(30, 2399, 2404, 2417, 5724, 5740,   3529,   0,    0,     3619,    0,    0);    -- Doom robe set
  1470.  
  1471.  --                 A GRADE              -------------
  1472. --- ######################## id chest  legs head gloves feet    skill  shield sh_skill enchant6
  1473. -INSERT INTO armorsets VALUES(31, 365,  388,  512,  5765, 5777,   3530,   641,  3550,  3620);    -- Dark Crystal Breastplate set
  1474. -INSERT INTO armorsets VALUES(32, 2385, 2389, 512,  5766, 5778,   3532,   0,    0,     3621);    -- Dark Crystal leather set
  1475. -INSERT INTO armorsets VALUES(33, 2407, 0,    512,  5767, 5779,   3535,   0,    0,     3622);    -- Dark Crystal robe set
  1476. +-- ######################## id chest  legs head gloves feet    skill  shield sh_skill enchant6 enchant12 enchant16
  1477. +INSERT INTO armorsets VALUES(31, 365,  388,  512,  5765, 5777,   3530,   641,  3550,  3620,    0,    0);    -- Dark Crystal Breastplate set
  1478. +INSERT INTO armorsets VALUES(32, 2385, 2389, 512,  5766, 5778,   3532,   0,    0,     3621,    0,    0);    -- Dark Crystal leather set
  1479. +INSERT INTO armorsets VALUES(33, 2407, 0,    512,  5767, 5779,   3535,   0,    0,     3622,    0,    0);    -- Dark Crystal robe set
  1480.  
  1481.  INSERT INTO armorsets VALUES(34, 2382, 0,    547,  5768, 5780,   3531,   0,    0,     3620);    -- Tallum plate heavy set
  1482.  INSERT INTO armorsets VALUES(35, 2393, 0,    547,  5769, 5781,   3533,   0,    0,     3621);    -- Tallum leather set
  1483.  INSERT INTO armorsets VALUES(36, 2400, 2405, 547,  5770, 5782,   3534,   0,    0,     3622);    -- Tallum robe set
  1484.  
  1485. -INSERT INTO armorsets VALUES(37, 374,  0,    2418, 5771, 5783,   3536,   2498, 3551,  3620);    -- Nightmare heavy set
  1486. -INSERT INTO armorsets VALUES(38, 2394, 0,    2418, 5772, 5784,   3538,   0,    0,     3621);    -- Nightmare leather set
  1487. -INSERT INTO armorsets VALUES(39, 2408, 0,    2418, 5773, 5785,   3540,   0,    0,     3622);    -- Robe of nightmare set
  1488. +INSERT INTO armorsets VALUES(37, 374,  0,    2418, 5771, 5783,   3536,   2498, 3551,  3620),    0,    0;    -- Nightmare heavy set
  1489. +INSERT INTO armorsets VALUES(38, 2394, 0,    2418, 5772, 5784,   3538,   0,    0,     3621,    0,    0);    -- Nightmare leather set
  1490. +INSERT INTO armorsets VALUES(39, 2408, 0,    2418, 5773, 5785,   3540,   0,    0,     3622,    0,    0);    -- Robe of nightmare set
  1491.  
  1492. -INSERT INTO armorsets VALUES(40, 2383, 0,    2419, 5774, 5786,   3537,   0,    0,     3620);    -- Majestic plate heavy set
  1493. -INSERT INTO armorsets VALUES(41, 2395, 0,    2419, 5775, 5787,   3539,   0,    0,     3621);    -- Majestic leather set
  1494. -INSERT INTO armorsets VALUES(42, 2409, 0,    2419, 5776, 5788,   3541,   0,    0,     3622);    -- Majestic robe set
  1495. +INSERT INTO armorsets VALUES(40, 2383, 0,    2419, 5774, 5786,   3537,   0,    0,     3620,    0,    0);    -- Majestic plate heavy set
  1496. +INSERT INTO armorsets VALUES(41, 2395, 0,    2419, 5775, 5787,   3539,   0,    0,     3621,    0,    0);    -- Majestic leather set
  1497. +INSERT INTO armorsets VALUES(42, 2409, 0,    2419, 5776, 5788,   3541,   0,    0,     3622,    0,    0);    -- Majestic robe set
  1498.  
  1499.  --                 S GRADE              -------------
  1500. --- ######################## id chest  legs head gloves feet    skill  shield sh_skill enchant6
  1501. -INSERT INTO armorsets VALUES(43, 6373, 6374, 6378, 6375, 6376,   3553,   6377, 3554,  3623);    -- Imperial crusader set
  1502. -INSERT INTO armorsets VALUES(44, 6379, 0,    6382, 6380, 6381,   3555,   0,    0,     3624);    -- Draconic leather set
  1503. -INSERT INTO armorsets VALUES(45, 6383, 0,    6386, 6384, 6385,   3556,   0,    0,     3625);    -- Major arcana robe set
  1504. +-- ######################## id chest  legs head gloves feet    skill  shield sh_skill enchant6 enchant12 enchant16
  1505. +INSERT INTO armorsets VALUES(43, 6373, 6374, 6378, 6375, 6376,   3553,   6377, 3554,  3623,    0,    0);    -- Imperial crusader set
  1506. +INSERT INTO armorsets VALUES(44, 6379, 0,    6382, 6380, 6381,   3555,   0,    0,     3624,    0,    0);    -- Draconic leather set
  1507. +INSERT INTO armorsets VALUES(45, 6383, 0,    6386, 6384, 6385,   3556,   0,    0,     3625,    0,    0);    -- Major arcana robe set
  1508.  
  1509.  --                Clan Sets              -------------
  1510. --- ######################## id chest  legs head gloves feet    skill  shield sh_skill enchant6
  1511. -INSERT INTO armorsets VALUES(46, 7851, 0,    7850, 7852, 7853,   3605,   0,    0,     3611);    -- Clan oath Armor set (heavy)
  1512. -INSERT INTO armorsets VALUES(47, 7854, 0,    7850, 7855, 7856,   3606,   0,    0,     3612);    -- Clan Oath Brigandine set (light)
  1513. -INSERT INTO armorsets VALUES(48, 7857, 0,    7850, 7858, 7859,   3607,   0,    0,     3613);    -- Clan Oath Aketon set (robe)
  1514. +-- ######################## id chest  legs head gloves feet    skill  shield sh_skill enchant6 enchant12 enchant16
  1515. +INSERT INTO armorsets VALUES(46, 7851, 0,    7850, 7852, 7853,   3605,   0,    0,     3611,    0,    0);    -- Clan oath Armor set (heavy)
  1516. +INSERT INTO armorsets VALUES(47, 7854, 0,    7850, 7855, 7856,   3606,   0,    0,     3612,    0,    0);    -- Clan Oath Brigandine set (light)
  1517. +INSERT INTO armorsets VALUES(48, 7857, 0,    7850, 7858, 7859,   3607,   0,    0,     3613,    0,    0);    -- Clan Oath Aketon set (robe)
  1518.  
  1519. -INSERT INTO armorsets VALUES(49, 7861, 0,    7860, 7862, 7863,   3608,   0,    0,     3620);    -- Apella plate armor set (heavy)
  1520. -INSERT INTO armorsets VALUES(50, 7864, 0,    7860, 7865, 7866,   3609,   0,    0,     3621);    -- Apella Brigandine set (light)
  1521. -INSERT INTO armorsets VALUES(51, 7867, 0,    7860, 7868, 7869,   3610,   0,    0,     3622);    -- Apella Doublet set (robe)
  1522. +INSERT INTO armorsets VALUES(49, 7861, 0,    7860, 7862, 7863,   3608,   0,    0,     3620,    0,    0);    -- Apella plate armor set (heavy)
  1523. +INSERT INTO armorsets VALUES(50, 7864, 0,    7860, 7865, 7866,   3609,   0,    0,     3621,    0,    0);    -- Apella Brigandine set (light)
  1524. +INSERT INTO armorsets VALUES(51, 7867, 0,    7860, 7868, 7869,   3610,   0,    0,     3622,    0,    0);    -- Apella Doublet set (robe)
Advertisement
Add Comment
Please, Sign In to add comment