L2HelperBuff.java 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. /*
  2. * Copyright (C) 2004-2013 L2J Server
  3. *
  4. * This file is part of L2J Server.
  5. *
  6. * L2J Server is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * L2J Server is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. package com.l2jserver.gameserver.model;
  20. /**
  21. * This class represents a Newbie Helper Buff Author: Ayor
  22. */
  23. public class L2HelperBuff
  24. {
  25. /** Min level that the player must achieve to obtain this buff from Newbie Helper */
  26. private final int _lowerLevel;
  27. /** Max level that the player mustn't exceed if it want to obtain this buff from Newbie Helper */
  28. private final int _upperLevel;
  29. /** Identifier of the skill (buff) that the Newbie Helper must cast */
  30. private final int _skillID;
  31. /** Level of the skill (buff) that the Newbie Helper must cast */
  32. private final int _skillLevel;
  33. /**
  34. * If True only Magus class will obtain this Buff <BR>
  35. * If False only Fighter class will obtain this Buff
  36. */
  37. private boolean _isMagicClass;
  38. private boolean _forSummon = false;
  39. /**
  40. * Constructor of L2HelperBuff.
  41. * @param set
  42. */
  43. public L2HelperBuff(StatsSet set)
  44. {
  45. _lowerLevel = set.getInteger("lowerLevel");
  46. _upperLevel = set.getInteger("upperLevel");
  47. _skillID = set.getInteger("skillID");
  48. _skillLevel = set.getInteger("skillLevel");
  49. if ("true".equals(set.getString("forSummon")))
  50. {
  51. _forSummon = true;
  52. }
  53. if ("false".equals(set.getString("isMagicClass")))
  54. {
  55. _isMagicClass = false;
  56. }
  57. else
  58. {
  59. _isMagicClass = true;
  60. }
  61. }
  62. /**
  63. * Returns the lower level that the L2PcInstance must achieve in order to obtain this buff
  64. * @return int
  65. */
  66. public int getLowerLevel()
  67. {
  68. return _lowerLevel;
  69. }
  70. /**
  71. * Returns the upper level that the L2PcInstance mustn't exceed in order to obtain this buff
  72. * @return int
  73. */
  74. public int getUpperLevel()
  75. {
  76. return _upperLevel;
  77. }
  78. /**
  79. * Returns the ID of the buff that the L2PcInstance will receive
  80. * @return int
  81. */
  82. public int getSkillID()
  83. {
  84. return _skillID;
  85. }
  86. /**
  87. * Returns the Level of the buff that the L2PcInstance will receive
  88. * @return int
  89. */
  90. public int getSkillLevel()
  91. {
  92. return _skillLevel;
  93. }
  94. /**
  95. * Returns if this Buff can be cast on a fighter or a mystic
  96. * @return boolean : False if it's a fighter class Buff
  97. */
  98. public boolean isMagicClassBuff()
  99. {
  100. return _isMagicClass;
  101. }
  102. public boolean isForSummon()
  103. {
  104. return _forSummon;
  105. }
  106. }