CharSelectInfoPackage.java 6.6 KB

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