L2PetLevelData.java 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  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. * Stats definition for each pet level.
  18. * @author JIV, Zoey76
  19. */
  20. public class L2PetLevelData
  21. {
  22. private final int _ownerExpTaken;
  23. private final int _petFeedBattle;
  24. private final int _petFeedNormal;
  25. private final float _petMAtk;
  26. private final long _petMaxExp;
  27. private final int _petMaxFeed;
  28. private final float _petMaxHP;
  29. private final float _petMaxMP;
  30. private final float _petMDef;
  31. private final float _petPAtk;
  32. private final float _petPDef;
  33. private final float _petRegenHP;
  34. private final float _petRegenMP;
  35. private final short _petSoulShot;
  36. private final short _petSpiritShot;
  37. public L2PetLevelData(StatsSet set)
  38. {
  39. _ownerExpTaken = set.getInteger("get_exp_type");
  40. _petMaxExp = set.getLong("exp");
  41. _petMaxHP = set.getFloat("org_hp");
  42. _petMaxMP = set.getFloat("org_mp");
  43. _petPAtk = set.getFloat("org_pattack");
  44. _petPDef = set.getFloat("org_pdefend");
  45. _petMAtk = set.getFloat("org_mattack");
  46. _petMDef = set.getFloat("org_mdefend");
  47. _petMaxFeed = set.getInteger("max_meal");
  48. _petFeedBattle = set.getInteger("consume_meal_in_battle");
  49. _petFeedNormal = set.getInteger("consume_meal_in_normal");
  50. _petRegenHP = set.getFloat("org_hp_regen");
  51. _petRegenMP = set.getFloat("org_mp_regen");
  52. _petSoulShot = set.getShort("soulshot_count");
  53. _petSpiritShot = set.getShort("spiritshot_count");
  54. }
  55. /**
  56. * @return the owner's experience points consumed by the pet.
  57. */
  58. public int getOwnerExpTaken()
  59. {
  60. return _ownerExpTaken;
  61. }
  62. /**
  63. * @return the pet's food consume rate at battle state.
  64. */
  65. public int getPetFeedBattle()
  66. {
  67. return _petFeedBattle;
  68. }
  69. /**
  70. * @return the pet's food consume rate at normal state.
  71. */
  72. public int getPetFeedNormal()
  73. {
  74. return _petFeedNormal;
  75. }
  76. /**
  77. * @return the pet's Magical Attack.
  78. */
  79. public float getPetMAtk()
  80. {
  81. return _petMAtk;
  82. }
  83. /**
  84. * @return the pet's maximum experience points.
  85. */
  86. public long getPetMaxExp()
  87. {
  88. return _petMaxExp;
  89. }
  90. /**
  91. * @return the pet's maximum feed points.
  92. */
  93. public int getPetMaxFeed()
  94. {
  95. return _petMaxFeed;
  96. }
  97. /**
  98. * @return the pet's maximum HP.
  99. */
  100. public float getPetMaxHP()
  101. {
  102. return _petMaxHP;
  103. }
  104. /**
  105. * @return the pet's maximum MP.
  106. */
  107. public float getPetMaxMP()
  108. {
  109. return _petMaxMP;
  110. }
  111. /**
  112. * @return the pet's Magical Defense.
  113. */
  114. public float getPetMDef()
  115. {
  116. return _petMDef;
  117. }
  118. /**
  119. * @return the pet's Physical Attack.
  120. */
  121. public float getPetPAtk()
  122. {
  123. return _petPAtk;
  124. }
  125. /**
  126. * @return the pet's Physical Defense.
  127. */
  128. public float getPetPDef()
  129. {
  130. return _petPDef;
  131. }
  132. /**
  133. * @return the pet's HP regeneration rate.
  134. */
  135. public float getPetRegenHP()
  136. {
  137. return _petRegenHP;
  138. }
  139. /**
  140. * @return the pet's MP regeneration rate.
  141. */
  142. public float getPetRegenMP()
  143. {
  144. return _petRegenMP;
  145. }
  146. /**
  147. * @return the pet's soulshot use count.
  148. */
  149. public short getPetSoulShot()
  150. {
  151. return _petSoulShot;
  152. }
  153. /**
  154. * @return the pet's spiritshot use count.
  155. */
  156. public short getPetSpiritShot()
  157. {
  158. return _petSpiritShot;
  159. }
  160. }