mia pio pro ekdosh tou parapanw kodika
public synchronized boolean setActiveClass(int classIndex)
{
+int[] armorType =
+{
+ Inventory.PAPERDOLL_RHAND, Inventory.PAPERDOLL_LHAND,
+ Inventory.PAPERDOLL_LRHAND, Inventory.PAPERDOLL_LRHAND,
+ Inventory.PAPERDOLL_CHEST, Inventory.PAPERDOLL_HEAD,
+ Inventory.PAPERDOLL_LEGS, Inventory.PAPERDOLL_GLOVES,
+ Inventory.PAPERDOLL_FEET, Inventory.PAPERDOLL_BACK,
+ Inventory.PAPERDOLL_DHAIR, Inventory.PAPERDOLL_HAIR,
+ Inventory.PAPERDOLL_LEAR, Inventory.PAPERDOLL_REAR,
+ Inventory.PAPERDOLL_RFINGER, Inventory.PAPERDOLL_LFINGER,
+ Inventory.PAPERDOLL_NECK, Inventory.PAPERDOLL_UNDER
+};
+
+for (int items : armorType)
+{
+ L2ItemInstance parmorInstance = getInventory().getPaperdollItem(items);
+ if (parmorInstance != null)
+ {
+ L2ItemInstance[] unequipped = getInventory().unEquipItemInBodySlotAndRecord(parmorInstance.getItem().getBodyPart());
+ InventoryUpdate iu = new InventoryUpdate();
+ for (L2ItemInstance element : unequipped)
+ iu.addModifiedItem(element);
+ sendPacket(iu);
+ }
+ }