CharSelectInfoPackage.java 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402
  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. import com.l2jserver.gameserver.model.itemcontainer.Inventory;
  21. import com.l2jserver.gameserver.model.itemcontainer.PcInventory;
  22. /**
  23. * Used to Store data sent to Client for Character.<br>
  24. * Selection screen.
  25. * @version $Revision: 1.2.2.2.2.4 $ $Date: 2005/03/27 15:29:33 $
  26. */
  27. public class CharSelectInfoPackage
  28. {
  29. private String _name;
  30. private int _objectId = 0;
  31. private int _charId = 0x00030b7a;
  32. private long _exp = 0;
  33. private int _sp = 0;
  34. private int _clanId = 0;
  35. private int _race = 0;
  36. private int _classId = 0;
  37. private int _baseClassId = 0;
  38. private long _deleteTimer = 0L;
  39. private long _lastAccess = 0L;
  40. private int _face = 0;
  41. private int _hairStyle = 0;
  42. private int _hairColor = 0;
  43. private int _sex = 0;
  44. private int _level = 1;
  45. private int _maxHp = 0;
  46. private double _currentHp = 0;
  47. private int _maxMp = 0;
  48. private double _currentMp = 0;
  49. private final int[][] _paperdoll;
  50. private int _karma = 0;
  51. private int _pkKills = 0;
  52. private int _pvpKills = 0;
  53. private int _augmentationId = 0;
  54. private int _x = 0;
  55. private int _y = 0;
  56. private int _z = 0;
  57. private String _htmlPrefix = null;
  58. private int _vitalityPoints = 0;
  59. private int _accessLevel = 0;
  60. /**
  61. * Constructor for CharSelectInfoPackage.
  62. * @param objectId character object Id.
  63. * @param name the character's name.
  64. */
  65. public CharSelectInfoPackage(int objectId, String name)
  66. {
  67. setObjectId(objectId);
  68. _name = name;
  69. _paperdoll = PcInventory.restoreVisibleInventory(objectId);
  70. }
  71. /**
  72. * @return the character object Id.
  73. */
  74. public int getObjectId()
  75. {
  76. return _objectId;
  77. }
  78. public void setObjectId(int objectId)
  79. {
  80. _objectId = objectId;
  81. }
  82. /**
  83. * @return the character's access level.
  84. */
  85. public int getAccessLevel()
  86. {
  87. return _accessLevel;
  88. }
  89. /**
  90. * @param level the character's access level to be set.
  91. */
  92. public void setAccessLevel(int level)
  93. {
  94. _accessLevel = level;
  95. }
  96. public int getCharId()
  97. {
  98. return _charId;
  99. }
  100. public void setCharId(int charId)
  101. {
  102. _charId = charId;
  103. }
  104. public int getClanId()
  105. {
  106. return _clanId;
  107. }
  108. public void setClanId(int clanId)
  109. {
  110. _clanId = clanId;
  111. }
  112. public int getClassId()
  113. {
  114. return _classId;
  115. }
  116. public int getBaseClassId()
  117. {
  118. return _baseClassId;
  119. }
  120. public void setClassId(int classId)
  121. {
  122. _classId = classId;
  123. }
  124. public void setBaseClassId(int baseClassId)
  125. {
  126. _baseClassId = baseClassId;
  127. }
  128. public double getCurrentHp()
  129. {
  130. return _currentHp;
  131. }
  132. public void setCurrentHp(double currentHp)
  133. {
  134. _currentHp = currentHp;
  135. }
  136. public double getCurrentMp()
  137. {
  138. return _currentMp;
  139. }
  140. public void setCurrentMp(double currentMp)
  141. {
  142. _currentMp = currentMp;
  143. }
  144. public long getDeleteTimer()
  145. {
  146. return _deleteTimer;
  147. }
  148. public void setDeleteTimer(long deleteTimer)
  149. {
  150. _deleteTimer = deleteTimer;
  151. }
  152. public long getLastAccess()
  153. {
  154. return _lastAccess;
  155. }
  156. public void setLastAccess(long lastAccess)
  157. {
  158. _lastAccess = lastAccess;
  159. }
  160. public long getExp()
  161. {
  162. return _exp;
  163. }
  164. public void setExp(long exp)
  165. {
  166. _exp = exp;
  167. }
  168. public int getFace()
  169. {
  170. return _face;
  171. }
  172. public void setFace(int face)
  173. {
  174. _face = face;
  175. }
  176. public int getHairColor()
  177. {
  178. return _hairColor;
  179. }
  180. public void setHairColor(int hairColor)
  181. {
  182. _hairColor = hairColor;
  183. }
  184. public int getHairStyle()
  185. {
  186. return _hairStyle;
  187. }
  188. public void setHairStyle(int hairStyle)
  189. {
  190. _hairStyle = hairStyle;
  191. }
  192. public int getPaperdollObjectId(int slot)
  193. {
  194. return _paperdoll[slot][0];
  195. }
  196. public int getPaperdollItemId(int slot)
  197. {
  198. return _paperdoll[slot][1];
  199. }
  200. public int getLevel()
  201. {
  202. return _level;
  203. }
  204. public void setLevel(int level)
  205. {
  206. _level = level;
  207. }
  208. public int getMaxHp()
  209. {
  210. return _maxHp;
  211. }
  212. public void setMaxHp(int maxHp)
  213. {
  214. _maxHp = maxHp;
  215. }
  216. public int getMaxMp()
  217. {
  218. return _maxMp;
  219. }
  220. public void setMaxMp(int maxMp)
  221. {
  222. _maxMp = maxMp;
  223. }
  224. public String getName()
  225. {
  226. return _name;
  227. }
  228. public void setName(String name)
  229. {
  230. _name = name;
  231. }
  232. public int getRace()
  233. {
  234. return _race;
  235. }
  236. public void setRace(int race)
  237. {
  238. _race = race;
  239. }
  240. public int getSex()
  241. {
  242. return _sex;
  243. }
  244. public void setSex(int sex)
  245. {
  246. _sex = sex;
  247. }
  248. public int getSp()
  249. {
  250. return _sp;
  251. }
  252. public void setSp(int sp)
  253. {
  254. _sp = sp;
  255. }
  256. public int getEnchantEffect()
  257. {
  258. if (_paperdoll[Inventory.PAPERDOLL_RHAND][2] > 0)
  259. {
  260. return _paperdoll[Inventory.PAPERDOLL_RHAND][2];
  261. }
  262. return _paperdoll[Inventory.PAPERDOLL_RHAND][2];
  263. }
  264. public void setKarma(int k)
  265. {
  266. _karma = k;
  267. }
  268. public int getKarma()
  269. {
  270. return _karma;
  271. }
  272. public void setAugmentationId(int augmentationId)
  273. {
  274. _augmentationId = augmentationId;
  275. }
  276. public int getAugmentationId()
  277. {
  278. return _augmentationId;
  279. }
  280. public void setPkKills(int PkKills)
  281. {
  282. _pkKills = PkKills;
  283. }
  284. public int getPkKills()
  285. {
  286. return _pkKills;
  287. }
  288. public void setPvPKills(int PvPKills)
  289. {
  290. _pvpKills = PvPKills;
  291. }
  292. public int getPvPKills()
  293. {
  294. return _pvpKills;
  295. }
  296. public int getX()
  297. {
  298. return _x;
  299. }
  300. public int getY()
  301. {
  302. return _y;
  303. }
  304. public int getZ()
  305. {
  306. return _z;
  307. }
  308. public void setX(int x)
  309. {
  310. _x = x;
  311. }
  312. public void setY(int y)
  313. {
  314. _y = y;
  315. }
  316. public void setZ(int z)
  317. {
  318. _z = z;
  319. }
  320. public String getHtmlPrefix()
  321. {
  322. return _htmlPrefix;
  323. }
  324. public void setHtmlPrefix(String s)
  325. {
  326. _htmlPrefix = s;
  327. }
  328. public void setVitalityPoints(int points)
  329. {
  330. _vitalityPoints = points;
  331. }
  332. public int getVitalityPoints()
  333. {
  334. return _vitalityPoints;
  335. }
  336. }