Package l2p.gameserver.model

Examples of l2p.gameserver.model.L2ArmorSet


    if(chestItem == null)
    {
      return;
    }
    // checks if there is armorset for chest item that player worns
    L2ArmorSet armorSet = ArmorSetsTable.getInstance().getSet(chestItem.getItemId());
    if(armorSet == null)
    {
      return;
    }
    boolean update = false;
    // checks if equipped item is part of set
    if(armorSet.containItem(slot, item.getItemId()))
    {
      if(armorSet.containAll(player))
      {
        L2Skill skill = armorSet.getSkill();
        if(skill != null)
        {
          player.addSkill(skill, false);
          player.addSkill(COMMON_SET_SKILL, false);
          update = true;
        }
        if(armorSet.containShield(player)) // has shield from set
        {
          L2Skill skills = armorSet.getShieldSkill();
          if(skills != null)
          {
            player.addSkill(skills, false);
            update = true;
          }
        }
        if(armorSet.isEnchanted6(player)) // has all parts of set enchanted to 6 or more
        {
          L2Skill skille = armorSet.getEnchant6skill();
          if(skille != null)
          {
            player.addSkill(skille, false);
            update = true;
          }
        }
      }
    }
    else if(armorSet.containShield(item.getItemId()))
    {
      if(armorSet.containAll(player))
      {
        L2Skill skills = armorSet.getShieldSkill();
        if(skills != null)
        {
          player.addSkill(skills, false);
          update = true;
        }
View Full Code Here


    L2Skill removeSkillId1 = null; // set skill
    L2Skill removeSkillId2 = null; // shield skill
    L2Skill removeSkillId3 = null; // enchant +6 skill
    if(slot == Inventory.PAPERDOLL_CHEST)
    {
      L2ArmorSet armorSet = ArmorSetsTable.getInstance().getSet(item.getItemId());
      if(armorSet == null)
      {
        return;
      }
      remove = true;
      removeSkillId1 = armorSet.getSkill();
      removeSkillId2 = armorSet.getShieldSkill();
      removeSkillId3 = armorSet.getEnchant6skill();
    }
    else
    {
      L2ItemInstance chestItem = _inv.getPaperdollItem(Inventory.PAPERDOLL_CHEST);
      if(chestItem == null)
      {
        return;
      }
      L2ArmorSet armorSet = ArmorSetsTable.getInstance().getSet(chestItem.getItemId());
      if(armorSet == null)
      {
        return;
      }
      if(armorSet.containItem(slot, item.getItemId())) // removed part of set
      {
        remove = true;
        removeSkillId1 = armorSet.getSkill();
        removeSkillId2 = armorSet.getShieldSkill();
        removeSkillId3 = armorSet.getEnchant6skill();
      }
      else if(armorSet.containShield(item.getItemId())) // removed shield
      {
        remove = true;
        removeSkillId2 = armorSet.getShieldSkill();
      }
    }
    L2Player player = _inv.getOwner().getPlayer();
    boolean update = false;
    if(remove)
View Full Code Here

        }
        if(_armorSets.containsKey(chest))
        {
          _log.warning("Duplicate set for chest: " + chest);
        }
        _armorSets.put(chest, new L2ArmorSet(chest, legs, head, gloves, feet, skill, shield, shield_skill, enchant6skill));
        int[] analog = ItemTable.getInstance().getArmorEx()[chest];
        if(analog != null)
        {
          if(analog[ItemTable.AEX_SEALED_RARE_1] > 0)
          {
            _armorSets.put(analog[ItemTable.AEX_SEALED_RARE_1], new L2ArmorSet(analog[ItemTable.AEX_SEALED_RARE_1], legs, head, gloves, feet, skill, shield, shield_skill, enchant6skill));
          }
        }
        else
        {
          for(int[] arr : ItemTable.getInstance().getArmorEx())
          {
            if(arr != null && arr[ItemTable.AEX_UNSEALED_1] == chest)
            {
              if(arr[ItemTable.AEX_UNSEALED_RARE_1] > 0)
              {
                _armorSets.put(arr[ItemTable.AEX_UNSEALED_RARE_1], new L2ArmorSet(arr[ItemTable.AEX_UNSEALED_RARE_1], legs, head, gloves, feet, skill, shield, shield_skill, enchant6skill));
              }
              break;
            }
          }
        }
View Full Code Here

TOP

Related Classes of l2p.gameserver.model.L2ArmorSet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.