L2HelperBuff.java 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  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 net.sf.l2j.gameserver.templates;
  16. /**
  17. * This class represents a Newbie Helper Buff
  18. *
  19. * Author: Ayor
  20. */
  21. public class L2HelperBuff
  22. {
  23. /** Min level that the player must achieve to obtain this buff from Newbie Helper */
  24. private int _lowerLevel;
  25. /** Max level that the player mustn't exceed if it want to obtain this buff from Newbie Helper */
  26. private int _upperLevel;
  27. /** Identifier of the skill (buff) that the Newbie Helper must cast */
  28. private int _skillID;
  29. /** Level of the skill (buff) that the Newbie Helper must cast */
  30. private int _skillLevel;
  31. /** If True only Magus class will obtain this Buff <BR>
  32. * If False only Fighter class will obtain this Buff */
  33. private boolean _isMagicClass;
  34. /**
  35. * Constructor of L2HelperBuff.<BR><BR>
  36. */
  37. public L2HelperBuff(StatsSet set)
  38. {
  39. _lowerLevel = set.getInteger("lowerLevel");
  40. _upperLevel = set.getInteger("upperLevel");
  41. _skillID = set.getInteger("skillID");
  42. _skillLevel = set.getInteger("skillLevel");
  43. if("false".equals(set.getString("isMagicClass")))
  44. _isMagicClass = false;
  45. else
  46. _isMagicClass = true;
  47. }
  48. /**
  49. * Returns the lower level that the L2PcInstance must achieve in order to obtain this buff
  50. * @return int
  51. */
  52. public int getLowerLevel()
  53. {
  54. return _lowerLevel;
  55. }
  56. /**
  57. * Sets the lower level that the L2PcInstance must achieve in order to obtain this buff
  58. * @param itemId : int designating the lower level
  59. */
  60. public void setLowerLevel(int lowerLevel)
  61. {
  62. _lowerLevel = lowerLevel;
  63. }
  64. /**
  65. * Returns the upper level that the L2PcInstance mustn't exceed in order to obtain this buff
  66. * @return int
  67. */
  68. public int getUpperLevel()
  69. {
  70. return _upperLevel;
  71. }
  72. /**
  73. * Sets the upper level that the L2PcInstance mustn't exceed in order to obtain this buff
  74. * @param itemId : int designating the upper level
  75. */
  76. public void setUpperLevel(int upperLevel)
  77. {
  78. _upperLevel = upperLevel;
  79. }
  80. /**
  81. * Returns the ID of the buff that the L2PcInstance will receive
  82. * @return int
  83. */
  84. public int getSkillID()
  85. {
  86. return _skillID;
  87. }
  88. /**
  89. * Sets the ID of the buff that the L2PcInstance will receive
  90. * @param itemId : int designating the skill Identifier
  91. */
  92. public void setSkillID(int skillID)
  93. {
  94. _skillID = skillID;
  95. }
  96. /**
  97. * Returns the Level of the buff that the L2PcInstance will receive
  98. * @return int
  99. */
  100. public int getSkillLevel()
  101. {
  102. return _skillLevel;
  103. }
  104. /**
  105. * Sets the Level of the buff that the L2PcInstance will receive
  106. * @param itemId : int designating the level of the skill
  107. */
  108. public void setSkillLevel(int skillLevel)
  109. {
  110. _skillLevel = skillLevel;
  111. }
  112. /**
  113. * Returns if this Buff can be cast on a fighter or a mystic
  114. * @return boolean : False if it's a fighter class Buff
  115. */
  116. public boolean isMagicClassBuff()
  117. {
  118. return _isMagicClass;
  119. }
  120. /**
  121. * Sets if this Buff can be cast on a fighter or a mystic
  122. * @param sweep
  123. */
  124. public void setIsMagicClass(boolean isMagicClass)
  125. {
  126. _isMagicClass = isMagicClass;
  127. }
  128. }