private boolean characterStillHasCorrespondingSpecialty(IEquipmentStatsOption option) {
   try {
     AbilityType trait = AbilityType.valueOf(option.getType());
     INamedGenericTrait[] specialties = dataProvider.getSpecialties(trait);
     ArrayUtilities.indexOf(specialties, option.getUnderlyingTrait());
     return true;
   } catch (IllegalArgumentException e) {
     return false;
   }
 }
 private EquipmentStatsPto createStatsPto(IEquipmentItem item, IEquipmentStats stats) {
   EquipmentStatsPto statsPto = new EquipmentStatsPto();
   statsPto.id = stats.getId();
   IEquipmentStats stat = item.getStat(stats.getId());
   EquipmentOptionsProvider optionProvider = heroModel.getOptionProvider();
   IEquipmentStatsOption[] enabledStatOptions = optionProvider.getEnabledStatOptions(item, stat);
   for (IEquipmentStatsOption option : enabledStatOptions) {
     EquipmentOptionPto optionPto = new EquipmentOptionPto();
     optionPto.name = option.getName();
     optionPto.type = option.getType();
   }
   return statsPto;
 }
Example #3
0
 private boolean characterStillHasCorrespondingSpecialty(IEquipmentStatsOption option) {
   AbilityType trait = AbilityType.valueOf(option.getType());
   Specialty[] specialties = dataProvider.getSpecialties(trait);
   return ArrayUtils.contains(specialties, option.getUnderlyingTrait());
 }