CharSelectInfoPackage.java 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  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 net.sf.l2j.gameserver.model;
  16. import net.sf.l2j.gameserver.model.itemcontainer.Inventory;
  17. import net.sf.l2j.gameserver.model.itemcontainer.PcInventory;
  18. /**
  19. * Used to Store data sent to Client for Character
  20. * Selection screen.
  21. *
  22. * @version $Revision: 1.2.2.2.2.4 $ $Date: 2005/03/27 15:29:33 $
  23. */
  24. public class CharSelectInfoPackage
  25. {
  26. private String _name;
  27. private int _objectId = 0;
  28. private int _charId = 0x00030b7a;
  29. private long _exp =0;
  30. private int _sp =0;
  31. private int _clanId=0;
  32. private int _race=0;
  33. private int _classId=0;
  34. private int _baseClassId=0;
  35. private long _deleteTimer=0L;
  36. private long _lastAccess=0L;
  37. private int _face=0;
  38. private int _hairStyle=0;
  39. private int _hairColor=0;
  40. private int _sex=0;
  41. private int _level = 1;
  42. private int _maxHp=0;
  43. private double _currentHp=0;
  44. private int _maxMp=0;
  45. private double _currentMp=0;
  46. private int[][] _paperdoll;
  47. private int _karma=0;
  48. private int _pkKills=0;
  49. private int _augmentationId=0;
  50. private int _transformId = 0;
  51. /**
  52. * @param int1
  53. */
  54. public CharSelectInfoPackage(int objectId, String name)
  55. {
  56. setObjectId(objectId);
  57. _name = name;
  58. _paperdoll = PcInventory.restoreVisibleInventory(objectId);
  59. }
  60. public int getObjectId()
  61. {
  62. return _objectId;
  63. }
  64. public void setObjectId(int objectId)
  65. {
  66. _objectId = objectId;
  67. }
  68. public int getCharId()
  69. {
  70. return _charId;
  71. }
  72. public void setCharId(int charId)
  73. {
  74. _charId = charId;
  75. }
  76. public int getClanId()
  77. {
  78. return _clanId;
  79. }
  80. public void setClanId(int clanId)
  81. {
  82. _clanId = clanId;
  83. }
  84. public int getClassId()
  85. {
  86. return _classId;
  87. }
  88. public int getBaseClassId()
  89. {
  90. return _baseClassId;
  91. }
  92. public void setClassId(int classId)
  93. {
  94. _classId = classId;
  95. }
  96. public void setBaseClassId(int baseClassId)
  97. {
  98. _baseClassId = baseClassId;
  99. }
  100. public double getCurrentHp()
  101. {
  102. return _currentHp;
  103. }
  104. public void setCurrentHp(double currentHp)
  105. {
  106. _currentHp = currentHp;
  107. }
  108. public double getCurrentMp()
  109. {
  110. return _currentMp;
  111. }
  112. public void setCurrentMp(double currentMp)
  113. {
  114. _currentMp = currentMp;
  115. }
  116. public long getDeleteTimer()
  117. {
  118. return _deleteTimer;
  119. }
  120. public void setDeleteTimer(long deleteTimer)
  121. {
  122. _deleteTimer = deleteTimer;
  123. }
  124. public long getLastAccess()
  125. {
  126. return _lastAccess;
  127. }
  128. public void setLastAccess(long lastAccess)
  129. {
  130. _lastAccess = lastAccess;
  131. }
  132. public long getExp()
  133. {
  134. return _exp;
  135. }
  136. public void setExp(long exp)
  137. {
  138. _exp = exp;
  139. }
  140. public int getFace()
  141. {
  142. return _face;
  143. }
  144. public void setFace(int face)
  145. {
  146. _face = face;
  147. }
  148. public int getHairColor()
  149. {
  150. return _hairColor;
  151. }
  152. public void setHairColor(int hairColor)
  153. {
  154. _hairColor = hairColor;
  155. }
  156. public int getHairStyle()
  157. {
  158. return _hairStyle;
  159. }
  160. public void setHairStyle(int hairStyle)
  161. {
  162. _hairStyle = hairStyle;
  163. }
  164. public int getPaperdollObjectId(int slot)
  165. {
  166. return _paperdoll[slot][0];
  167. }
  168. public int getPaperdollItemId(int slot)
  169. {
  170. return _paperdoll[slot][1];
  171. }
  172. public int getLevel()
  173. {
  174. return _level;
  175. }
  176. public void setLevel(int level)
  177. {
  178. _level = level;
  179. }
  180. public int getMaxHp()
  181. {
  182. return _maxHp;
  183. }
  184. public void setMaxHp(int maxHp)
  185. {
  186. _maxHp = maxHp;
  187. }
  188. public int getMaxMp()
  189. {
  190. return _maxMp;
  191. }
  192. public void setMaxMp(int maxMp)
  193. {
  194. _maxMp = maxMp;
  195. }
  196. public String getName()
  197. {
  198. return _name;
  199. }
  200. public void setName(String name)
  201. {
  202. _name = name;
  203. }
  204. public int getRace()
  205. {
  206. return _race;
  207. }
  208. public void setRace(int race)
  209. {
  210. _race = race;
  211. }
  212. public int getSex()
  213. {
  214. return _sex;
  215. }
  216. public void setSex(int sex)
  217. {
  218. _sex = sex;
  219. }
  220. public int getSp()
  221. {
  222. return _sp;
  223. }
  224. public void setSp(int sp)
  225. {
  226. _sp = sp;
  227. }
  228. public int getEnchantEffect()
  229. {
  230. if (_paperdoll[Inventory.PAPERDOLL_RHAND][2] > 0)
  231. return _paperdoll[Inventory.PAPERDOLL_RHAND][2];
  232. return _paperdoll[Inventory.PAPERDOLL_LRHAND][2];
  233. }
  234. public void setKarma(int k)
  235. {
  236. _karma = k;
  237. }
  238. public int getKarma()
  239. {
  240. return _karma;
  241. }
  242. public void setAugmentationId(int augmentationId)
  243. {
  244. _augmentationId = augmentationId;
  245. }
  246. public int getAugmentationId()
  247. {
  248. return _augmentationId;
  249. }
  250. public void setPkKills(int PkKills)
  251. {
  252. _pkKills = PkKills;
  253. }
  254. public int getPkKills()
  255. {
  256. return _pkKills;
  257. }
  258. public int getTransformId()
  259. {
  260. return _transformId;
  261. }
  262. public void setTransformId(int id)
  263. {
  264. _transformId = id;
  265. }
  266. }