L2SkillLearn.java 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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. private final boolean _isTransfer;
  35. private final boolean _isAutoGet;
  36. public L2SkillLearn(int id, int lvl, int minLvl, String name, int cost, int costid, int costcount, boolean npc, boolean fs, boolean transfer, boolean autoget)
  37. {
  38. _id = id;
  39. _level = lvl;
  40. _minLevel = minLvl;
  41. _name = name.intern();
  42. _spCost = cost;
  43. _costid = costid;
  44. _costcount = costcount;
  45. _learnedByNpc = npc;
  46. _learnedByFs = fs;
  47. _isTransfer = transfer;
  48. _isAutoGet = autoget;
  49. }
  50. /**
  51. * @return Returns the id.
  52. */
  53. public int getId()
  54. {
  55. return _id;
  56. }
  57. /**
  58. * @return Returns the level.
  59. */
  60. public int getLevel()
  61. {
  62. return _level;
  63. }
  64. /**
  65. * @return Returns the minLevel.
  66. */
  67. public int getMinLevel()
  68. {
  69. return _minLevel;
  70. }
  71. /**
  72. * @return Returns the name.
  73. */
  74. public String getName()
  75. {
  76. return _name;
  77. }
  78. /**
  79. * @return Returns the spCost.
  80. */
  81. public int getSpCost()
  82. {
  83. return _spCost;
  84. }
  85. public int getIdCost()
  86. {
  87. return _costid;
  88. }
  89. public int getCostCount()
  90. {
  91. return _costcount;
  92. }
  93. /**
  94. * Return true if skill can be learned by teachers
  95. */
  96. public boolean isLearnedByNPC()
  97. {
  98. return _learnedByNpc;
  99. }
  100. /**
  101. * Return true if skill can be learned by forgotten scroll
  102. */
  103. public boolean isLearnedByFS()
  104. {
  105. return _learnedByFs;
  106. }
  107. public boolean isTransferSkill()
  108. {
  109. return _isTransfer;
  110. }
  111. public boolean isAutoGetSkill()
  112. {
  113. return _isAutoGet;
  114. }
  115. }