L2HelperBuff.java 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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 represents a Newbie Helper Buff Author: Ayor
  18. */
  19. public class L2HelperBuff
  20. {
  21. /** Min level that the player must achieve to obtain this buff from Newbie Helper */
  22. private final int _lowerLevel;
  23. /** Max level that the player mustn't exceed if it want to obtain this buff from Newbie Helper */
  24. private final int _upperLevel;
  25. /** Identifier of the skill (buff) that the Newbie Helper must cast */
  26. private final int _skillID;
  27. /** Level of the skill (buff) that the Newbie Helper must cast */
  28. private final int _skillLevel;
  29. /**
  30. * If True only Magus class will obtain this Buff <BR>
  31. * If False only Fighter class will obtain this Buff
  32. */
  33. private boolean _isMagicClass;
  34. private boolean _forSummon = false;
  35. /**
  36. * Constructor of L2HelperBuff.
  37. * @param set
  38. */
  39. public L2HelperBuff(StatsSet set)
  40. {
  41. _lowerLevel = set.getInteger("lowerLevel");
  42. _upperLevel = set.getInteger("upperLevel");
  43. _skillID = set.getInteger("skillID");
  44. _skillLevel = set.getInteger("skillLevel");
  45. if ("true".equals(set.getString("forSummon")))
  46. {
  47. _forSummon = true;
  48. }
  49. if ("false".equals(set.getString("isMagicClass")))
  50. {
  51. _isMagicClass = false;
  52. }
  53. else
  54. {
  55. _isMagicClass = true;
  56. }
  57. }
  58. /**
  59. * Returns the lower level that the L2PcInstance must achieve in order to obtain this buff
  60. * @return int
  61. */
  62. public int getLowerLevel()
  63. {
  64. return _lowerLevel;
  65. }
  66. /**
  67. * Returns the upper level that the L2PcInstance mustn't exceed in order to obtain this buff
  68. * @return int
  69. */
  70. public int getUpperLevel()
  71. {
  72. return _upperLevel;
  73. }
  74. /**
  75. * Returns the ID of the buff that the L2PcInstance will receive
  76. * @return int
  77. */
  78. public int getSkillID()
  79. {
  80. return _skillID;
  81. }
  82. /**
  83. * Returns the Level of the buff that the L2PcInstance will receive
  84. * @return int
  85. */
  86. public int getSkillLevel()
  87. {
  88. return _skillLevel;
  89. }
  90. /**
  91. * Returns if this Buff can be cast on a fighter or a mystic
  92. * @return boolean : False if it's a fighter class Buff
  93. */
  94. public boolean isMagicClassBuff()
  95. {
  96. return _isMagicClass;
  97. }
  98. public boolean isForSummon()
  99. {
  100. return _forSummon;
  101. }
  102. }