2
0

L2HennaInstance.java 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  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. import com.l2jserver.gameserver.templates.item.L2Henna;
  17. /**
  18. * This class represents a Non-Player-Character in the world. it can be
  19. * a monster or a friendly character.
  20. * it also uses a template to fetch some static values.
  21. * the templates are hardcoded in the client, so we can rely on them.
  22. *
  23. * @version $Revision$ $Date$
  24. */
  25. public class L2HennaInstance
  26. {
  27. //private static Logger _log = Logger.getLogger(L2HennaInstance.class.getName());
  28. private L2Henna _template;
  29. private int _symbolId;
  30. private int _itemIdDye;
  31. private int _price;
  32. private int _statINT;
  33. private int _statSTR;
  34. private int _statCON;
  35. private int _statMEM;
  36. private int _statDEX;
  37. private int _statWIT;
  38. private int _amountDyeRequire;
  39. public L2HennaInstance(L2Henna template)
  40. {
  41. _template = template;
  42. _symbolId = _template.getSymbolId();
  43. _itemIdDye = _template.getDyeId();
  44. _amountDyeRequire = _template.getAmountDyeRequire();
  45. _price = _template.getPrice();
  46. _statINT = _template.getStatINT();
  47. _statSTR = _template.getStatSTR();
  48. _statCON = _template.getStatCON();
  49. _statMEM = _template.getStatMEM();
  50. _statDEX = _template.getStatDEX();
  51. _statWIT = _template.getStatWIT();
  52. }
  53. public String getName(){
  54. String res = "";
  55. if (_statINT>0)res = res + "INT +"+_statINT;
  56. else if (_statSTR>0)res = res + "STR +"+_statSTR;
  57. else if (_statCON>0)res = res + "CON +"+_statCON;
  58. else if (_statMEM>0)res = res + "MEN +"+_statMEM;
  59. else if (_statDEX>0)res = res + "DEX +"+_statDEX;
  60. else if (_statWIT>0)res = res + "WIT +"+_statWIT;
  61. if (_statINT<0)res = res + ", INT "+_statINT;
  62. else if (_statSTR<0)res = res + ", STR "+_statSTR;
  63. else if (_statCON<0)res = res + ", CON "+_statCON;
  64. else if (_statMEM<0)res = res + ", MEN "+_statMEM;
  65. else if (_statDEX<0)res = res + ", DEX "+_statDEX;
  66. else if (_statWIT<0)res = res + ", WIT "+_statWIT;
  67. return res;
  68. }
  69. public L2Henna getTemplate()
  70. {
  71. return _template;
  72. }
  73. public int getSymbolId()
  74. {
  75. return _symbolId;
  76. }
  77. public void setSymbolId(int SymbolId)
  78. {
  79. _symbolId = SymbolId;
  80. }
  81. public int getItemIdDye()
  82. {
  83. return _itemIdDye;
  84. }
  85. public void setItemIdDye(int ItemIdDye)
  86. {
  87. _itemIdDye = ItemIdDye;
  88. }
  89. public int getAmountDyeRequire()
  90. {
  91. return _amountDyeRequire;
  92. }
  93. public void setAmountDyeRequire(int AmountDyeRequire)
  94. {
  95. _amountDyeRequire = AmountDyeRequire;
  96. }
  97. public int getPrice()
  98. {
  99. return _price;
  100. }
  101. public void setPrice(int Price)
  102. {
  103. _price = Price;
  104. }
  105. public int getStatINT()
  106. {
  107. return _statINT;
  108. }
  109. public void setStatINT(int StatINT)
  110. {
  111. _statINT = StatINT;
  112. }
  113. public int getStatSTR()
  114. {
  115. return _statSTR;
  116. }
  117. public void setStatSTR(int StatSTR)
  118. {
  119. _statSTR = StatSTR;
  120. }
  121. public int getStatCON()
  122. {
  123. return _statCON;
  124. }
  125. public void setStatCON(int StatCON)
  126. {
  127. _statCON = StatCON;
  128. }
  129. public int getStatMEM()
  130. {
  131. return _statMEM;
  132. }
  133. public void setStatMEM(int StatMEM)
  134. {
  135. _statMEM = StatMEM;
  136. }
  137. public int getStatDEX()
  138. {
  139. return _statDEX;
  140. }
  141. public void setStatDEX(int StatDEX)
  142. {
  143. _statDEX = StatDEX;
  144. }
  145. public int getStatWIT()
  146. {
  147. return _statWIT;
  148. }
  149. public void setStatWIT(int StatWIT)
  150. {
  151. _statWIT = StatWIT;
  152. }
  153. }