L2SkillLearn.java 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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 ...
  18. *
  19. * @version $Revision: 1.2.4.2 $ $Date: 2005/03/27 15:29:33 $
  20. */
  21. public final class L2SkillLearn
  22. {
  23. // these two build the primary key
  24. private final int _id;
  25. private final int _level;
  26. // not needed, just for easier debug
  27. private final String _name;
  28. private final int _spCost;
  29. private final int _minLevel;
  30. private final int _costid;
  31. private final int _costcount;
  32. private final boolean _learnedByNpc;
  33. private final boolean _learnedByFs;
  34. public L2SkillLearn(int id, int lvl, int minLvl, String name, int cost, int costid, int costcount, boolean npc, boolean fs)
  35. {
  36. _id = id;
  37. _level = lvl;
  38. _minLevel = minLvl;
  39. _name = name.intern();
  40. _spCost = cost;
  41. _costid = costid;
  42. _costcount = costcount;
  43. _learnedByNpc = npc;
  44. _learnedByFs = fs;
  45. }
  46. /**
  47. * @return Returns the id.
  48. */
  49. public int getId()
  50. {
  51. return _id;
  52. }
  53. /**
  54. * @return Returns the level.
  55. */
  56. public int getLevel()
  57. {
  58. return _level;
  59. }
  60. /**
  61. * @return Returns the minLevel.
  62. */
  63. public int getMinLevel()
  64. {
  65. return _minLevel;
  66. }
  67. /**
  68. * @return Returns the name.
  69. */
  70. public String getName()
  71. {
  72. return _name;
  73. }
  74. /**
  75. * @return Returns the spCost.
  76. */
  77. public int getSpCost()
  78. {
  79. return _spCost;
  80. }
  81. public int getIdCost()
  82. {
  83. return _costid;
  84. }
  85. public int getCostCount()
  86. {
  87. return _costcount;
  88. }
  89. /**
  90. * Return true if skill can be learned by teachers
  91. */
  92. public boolean isLearnedByNPC()
  93. {
  94. return _learnedByNpc;
  95. }
  96. /**
  97. * Return true if skill can be learned by forgotten scroll
  98. */
  99. public boolean isLearnedByFS()
  100. {
  101. return _learnedByFs;
  102. }
  103. }