L2ExtractableProduct.java 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. * This program is free software: you can redistribute it and/or modify it under
  3. * the terms of the GNU General Public License as published by the Free Software
  4. * Foundation, either version 3 of the License, or (at your option) any later
  5. * version.
  6. *
  7. * This program is distributed in the hope that it will be useful, but WITHOUT
  8. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  9. * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  10. * details.
  11. *
  12. * You should have received a copy of the GNU General Public License along with
  13. * this program. If not, see <http://www.gnu.org/licenses/>.
  14. */
  15. package com.l2jserver.gameserver.model;
  16. /**
  17. *
  18. * @author JIV
  19. */
  20. public class L2ExtractableProduct
  21. {
  22. private final int _id;
  23. private final int _min;
  24. private final int _max;
  25. private final int _chance;
  26. /**
  27. * Create Extractable product
  28. * @param id crete item id
  29. * @param min item count max
  30. * @param max item count min
  31. * @param chance chance for creating
  32. */
  33. public L2ExtractableProduct(int id, int min, int max, double chance)
  34. {
  35. _id = id;
  36. _min = min;
  37. _max = max;
  38. _chance = (int) (chance * 1000);
  39. }
  40. public int getId()
  41. {
  42. return _id;
  43. }
  44. public int getMin()
  45. {
  46. return _min;
  47. }
  48. public int getMax()
  49. {
  50. return _max;
  51. }
  52. public int getChance()
  53. {
  54. return _chance;
  55. }
  56. }