Ejemplo n.º 1
0
  public ArmorRating getRating() {
    ServerArmorTemplate base = null;

    if (baseData instanceof ServerArmorTemplate) base = (ServerArmorTemplate) baseData;

    if (!rating.isLoaded()) {
      if (base == null) {
        return ArmorRating.from(0);
      } else {
        return base.getRating();
      }
    }

    return ArmorRating.from(rating.getValue());
  }
Ejemplo n.º 2
0
    public DamageType getType() {
      SpecialProtectionObjectTemplate base = null;

      if (baseData instanceof SpecialProtectionObjectTemplate)
        base = (SpecialProtectionObjectTemplate) baseData;

      if (!type.isLoaded()) {
        if (base == null) {
          return DamageType.from(0);
        } else {
          return base.getType();
        }
      }

      return DamageType.from(type.getValue());
    }