L2RecipeStatInstance.java 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. * This class describes a RecipeList statUse and altStatChange component.<BR><BR>
  18. */
  19. public class L2RecipeStatInstance
  20. {
  21. public static enum StatType
  22. {
  23. HP,
  24. MP,
  25. XP,
  26. SP,
  27. GIM // grab item modifier:
  28. // GIM: the default function uses only the skilllevel to determine
  29. // how many item is grabbed in each step
  30. // with this stat changer you can multiple this
  31. }
  32. /** The Identifier of the statType */
  33. private StatType _type;
  34. /** The value of the statType */
  35. private int _value;
  36. /**
  37. * Constructor of L2RecipeStatInstance.<BR><BR>
  38. * @param type
  39. * @param value
  40. */
  41. public L2RecipeStatInstance(String type, int value)
  42. {
  43. try {
  44. _type = Enum.valueOf(StatType.class, type);
  45. } catch (Exception e) {
  46. throw new IllegalArgumentException();
  47. }
  48. _value = value;
  49. }
  50. /**
  51. * @return the the type of the L2RecipeStatInstance.
  52. */
  53. public StatType getType()
  54. {
  55. return _type;
  56. }
  57. /**
  58. * @return the value of the L2RecipeStatInstance.
  59. */
  60. public int getValue()
  61. {
  62. return _value;
  63. }
  64. }