/**
  * Filter stats based on the following rules:<br>
  * 1) don't include fusioned stats which will be taken only from 1 weapon <br>
  * 2) wrap stats which are different for MAIN and OFF hands<br>
  * 3) add the rest<br>
  *
  * @param item
  * @param modifiers
  * @return
  */
 private static List<StatFunction> wrapModifiers(Item item, List<StatFunction> modifiers) {
   List<StatFunction> allModifiers = new ArrayList<StatFunction>();
   for (StatFunction modifier : modifiers) {
     switch (modifier.getName()) {
         // why they are removed look at DuplicateStatFunction
       case ATTACK_SPEED:
       case PVP_ATTACK_RATIO:
       case BOOST_CASTING_TIME:
         continue;
       default:
         allModifiers.add(modifier);
     }
   }
   return allModifiers;
 }
  private static List<StatFunction> wrapModifiersW(Item item, List<StatFunction> modifiers) {
    List<StatFunction> allModifiers = new ArrayList<StatFunction>();
    ItemTemplate itemTemplate = item.getItemTemplate();
    WeaponStats weaponStats = itemTemplate.getWeaponStats();
    for (StatFunction modifier : modifiers) {
      switch (modifier.getName()) {
        default:
          allModifiers.add(modifier);
      }
    }
    allModifiers.add(new StatAddFunction(StatEnum.PARRY, weaponStats.getParry(), false));
    allModifiers.add(
        new StatAddFunction(StatEnum.MAGICAL_ACCURACY, weaponStats.getMagicalAccuracy(), false));
    allModifiers.add(
        new StatAddFunction(StatEnum.PHYSICAL_ACCURACY, weaponStats.getPhysicalAccuracy(), false));

    return allModifiers;
  }