Beispiel #1
0
  public List<ItemSpecification> getSpecifications() {
    if (itemSpecs.isEmpty()) {
      if (weaponSpecsHelper != null) itemSpecs.addAll(weaponSpecsHelper);
      if (shieldSpecsHelper != null) itemSpecs.addAll(shieldSpecsHelper);
      if (distanceWeaponSpecsHelper != null) itemSpecs.addAll(distanceWeaponSpecsHelper);
      if (armorSpecsHelper != null) itemSpecs.addAll(armorSpecsHelper);
      if (miscSpecsHelper != null) itemSpecs.addAll(miscSpecsHelper);

      if (itemSpecs.isEmpty()) {
        addSpecification(new MiscSpecification(this, ItemType.Sonstiges));
      }
    }

    return Collections.unmodifiableList(itemSpecs);
  }