L2HelperBuff.java 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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
  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. private boolean _forSummon = false;
  35. /**
  36. * Constructor of L2HelperBuff.<BR><BR>
  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. _forSummon = true;
  47. if ("false".equals(set.getString("isMagicClass")))
  48. _isMagicClass = false;
  49. else
  50. _isMagicClass = true;
  51. }
  52. /**
  53. * Returns the lower level that the L2PcInstance must achieve in order to obtain this buff
  54. * @return int
  55. */
  56. public int getLowerLevel()
  57. {
  58. return _lowerLevel;
  59. }
  60. /**
  61. * Returns the upper level that the L2PcInstance mustn't exceed in order to obtain this buff
  62. * @return int
  63. */
  64. public int getUpperLevel()
  65. {
  66. return _upperLevel;
  67. }
  68. /**
  69. * Returns the ID of the buff that the L2PcInstance will receive
  70. * @return int
  71. */
  72. public int getSkillID()
  73. {
  74. return _skillID;
  75. }
  76. /**
  77. * Returns the Level of the buff that the L2PcInstance will receive
  78. * @return int
  79. */
  80. public int getSkillLevel()
  81. {
  82. return _skillLevel;
  83. }
  84. /**
  85. * Returns if this Buff can be cast on a fighter or a mystic
  86. * @return boolean : False if it's a fighter class Buff
  87. */
  88. public boolean isMagicClassBuff()
  89. {
  90. return _isMagicClass;
  91. }
  92. public boolean isForSummon()
  93. {
  94. return _forSummon;
  95. }
  96. }