L2HelperBuff.java 2.8 KB

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