CostyKiller

Feature that will show which multisells have lower price tha

Mar 29th, 2020
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Index: java/org/l2jmobius/gameserver/data/xml/impl/MultisellData.java
  2. ===================================================================
  3. --- java/org/l2jmobius/gameserver/data/xml/impl/MultisellData.java   (revision 7038)
  4. +++ java/org/l2jmobius/gameserver/data/xml/impl/MultisellData.java   (working copy)
  5. @@ -162,22 +162,7 @@
  6.                             LOGGER.warning("Invalid product id or count for itemId: " + product.getId() + ", count: " + product.getCount() + " in list: " + listId);
  7.                             continue;
  8.                          }
  9. +                        final int listmultisellname = Integer.parseInt(f.getName().substring(0, f.getName().length() - 4));
  10. +                        if ((entry.getIngredients().size() == 1) && (entry.getProducts().size() == 1) && (entry.getIngredients().get(0).getId() == 57))
  11. +                        {
  12. +                           Item item = ItemTable.getInstance().getTemplate(entry.getProducts().get(0).getId());
  13. +                           if (item == null)
  14. +                           {
  15. +                              LOGGER.warning(getClass().getSimpleName() + ": [" + listmultisellname + "] Production [" + entry.getProducts().get(0).getId() + "] not found!");
  16. +                              continue;
  17. +                           }
  18. +                          
  19. +                           if (item.getReferencePrice() > (entry.getIngredients().get(0).getCount() / entry.getProducts().get(0).getCount()))
  20. +                           {
  21. +                              LOGGER.warning(getClass().getSimpleName() + ": [" + listmultisellname + "] Production '" + item.getName() + "' [" + entry.getProducts().get(0).getId() + "] price is lower than referenced | " + item.getReferencePrice() + " / " + entry.getIngredients().get(0).getCount() + " should be " + (item.getReferencePrice() * entry.getProducts().get(0).getCount()));
  22. +                              continue;
  23. +                           }
  24. +                        }
  25. +                        
  26.                       }
  27.                    }
Add Comment
Please, Sign In to add comment