L2RecipeStatInstance.java 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. */
  39. public L2RecipeStatInstance(String type, int value)
  40. {
  41. try {
  42. _type = Enum.valueOf(StatType.class, type);
  43. } catch (Exception e) {
  44. throw new IllegalArgumentException();
  45. }
  46. _value = value;
  47. }
  48. /**
  49. * Return the the type of the L2RecipeStatInstance.<BR><BR>
  50. */
  51. public StatType getType()
  52. {
  53. return _type;
  54. }
  55. /**
  56. * Return the value of the L2RecipeStatInstance.<BR><BR>
  57. */
  58. public int getValue()
  59. {
  60. return _value;
  61. }
  62. }