CharSelectInfoPackage.java 6.4 KB

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